Chapter 5: Duality
Duality is a central concept in optimization theory. It associates with every optimization problem (the primal) a companion dual problem whose optimal value provides a lower bound on the primal optimal value. Under convexity and suitable regularity conditions, the two optimal values coincide (strong duality), giving rise to powerful optimality conditions known as the KKT conditions.
5.1 Motivation: From Constrained to Unconstrained
Consider the single-inequality problem
Constrained problems are difficult to optimize directly. The key idea is to absorb the constraint into the objective using an indicator function:
Then the problem becomes unconstrained:
5.1.1 Linearizing the Indicator
Key Claim
Explanation: If
Thus the indicator function can be expressed as a linear supremum.
5.1.2 Min–Max Reformulation
Substituting, we obtain
Hence the original problem becomes an unconstrained min–max problem:
Game interpretation: Player A (the minimizer) chooses
The order of play matters—this motivates the fundamental inequality of duality.
5.2 The Weak Max–Min Inequality
Theorem (Weak Max–Min Inequality)
For any function
,
Proof sketch: For any fixed
Taking
Applying this inequality to the Lagrangian
5.3 Definitions: Lagrangian, Dual Function, Dual Problem
For the single-inequality problem, we define:
Definition (Lagrangian, Single-Inequality Case)
is called the Lagrange multiplier (or dual variable).
Definition (Dual Function)
Definition (Dual Problem)
Definition (Weak Duality)
The difference
is called the duality gap (always ).
Definition (Strong Duality)
. This holds for convex problems under appropriate regularity conditions (e.g., Slater's condition).
Example: Unit Circle Constraint
Consider
Lagrangian:
Dual function: For
, Dual problem:
Verification: The primal solution is
on the unit circle, giving . Strong duality holds.
5.4 The General Optimization Problem
Extend the idea to the standard form:
- Inequality constraints require
(nonnegative multipliers). - Equality constraints require no sign restriction on
.
Definition (Lagrangian, General Case)
Let
and . The Lagrangian is
Definition (Lagrange Dual Function)
where
is the domain of the primal problem. Properties:
is a concave function of . can be for some , which defines its effective domain. - Lower bound property: If
, then .
Proof of lower bound property: If
Minimizing over all feasible
Definition (Lagrange Dual Problem)
- Always a convex optimization problem (maximization of a concave function), even when the primal is nonconvex.
- Optimal value denoted
. is dual feasible if and . if the problem is infeasible; if unbounded above.
Why the Dual Problem is Always Convex
This is the (negative) pointwise supremum of affine functions in
5.5 Weak and Strong Duality
Theorem (Weak Duality)
This holds always—for convex and nonconvex problems alike. It can be used to find nontrivial lower bounds for difficult problems.
For example, solving the SDP dual of the two-way partitioning problem provides a lower bound on its (NP-hard) primal.
Theorem (Strong Duality)
does not hold in general, but (usually) holds for convex problems. Sufficient conditions that guarantee strong duality in convex problems are called constraint qualifications.
5.6 Slater's Constraint Qualification
Consider a convex problem:
Definition (Slater's Condition)
The problem is strictly feasible, i.e., there exists
such that
Theorem (Slater's Theorem)
If the primal is convex and Slater's condition holds, then:
- Strong duality holds:
. - If
, the dual optimum is attained: there exist dual optimal .
Refinements:
can be replaced with (relative interior). - Linear inequalities do not need to hold with strict inequality.
- Many other constraint qualifications exist.
5.7 Complementary Slackness
Assume
Equality
- First inequality:
minimizes over . - Second inequality:
for .
Definition (Complementary Slackness)
Equivalently,
for all .
The name reflects that at least one of
5.8 KKT (Karush–Kuhn–Tucker) Conditions
Assume strong duality holds,
- Primal feasibility:
for and for . - Dual feasibility:
. - Complementary slackness:
for . - Stationarity:
is a minimizer of .
Conversely, these four conditions imply optimality of
If the problem is convex and the functions
Definition (KKT Conditions for Differentiable Problems)
A point
satisfies the KKT conditions if:
- Primal feasibility:
- Dual feasibility:
- Complementary slackness:
- Stationarity:
Role of the KKT Conditions
Theorem (KKT Necessity and Sufficiency)
Necessity: If
is a primal optimal solution and Slater's condition holds, then there exist such that satisfies all KKT conditions. Sufficiency: If the problem is convex and
satisfies the KKT conditions, then is a globally optimal solution.
In summary: for a convex problem satisfying Slater's condition,
5.9 Dual of Standard Problem Classes
5.9.1 Linear Program (LP) — Standard Form
Primal:
Lagrangian:
Since
Dual problem:
From Slater's condition:
5.9.2 Linear Program (LP) — Inequality Form
Primal:
Lagrangian:
Dual function:
Dual problem:
From Slater's condition:
5.9.3 Quadratic Program (QP)
Assume
Primal:
Lagrangian:
Dual function: Minimizing over
Dual problem:
From Slater's condition:
5.9.4 Equality-Constrained QP
Primal:
where
KKT system:
Since the problem is convex, the KKT solution
5.9.5 SDP Connection (Two-Way Partitioning)
Primal (nonconvex):
The feasible set is
Lagrangian:
Dual function:
Dual problem (SDP):
Lower bound:
5.10 Geometric Interpretation of Duality
The relationship between the primal and dual problems can be understood geometrically as a min–max exchange. The primal problem minimizes over
The duality gap
for all
Epigraph Interpretation
Define the set
The primal optimal value is
When
5.11 Sensitivity Analysis
Dual variables carry economic meaning: they measure the sensitivity of the optimal value to perturbations in the constraints.
5.11.1 Single Perturbation
Consider perturbing a single inequality constraint
Global Lower Bound
where
is the optimal dual variable for the original ( ) problem, assuming strong duality holds.
- If
is large and (tightening the constraint): increases greatly. - If
is small and (loosening the constraint): does not decrease much.
Local Sensitivity
For small
, .
Economic interpretation:
5.11.2 General Case (Multiple Perturbations)
Perturb both inequality and equality constraints:
Global Lower Bound
Interpretation of dual variables:
| Sign of | Effect of perturbation |
|---|---|
| Large | |
| Small | |
| Large positive | |
| Large negative | |
| Small $ | \nu_i^* |
Local Sensitivity (General Case)
5.12 Worked Examples
5.12.1 Least-Norm Solution of Linear Equations
Primal:
Lagrangian:
Set gradient to zero:
Plug into
This is a concave function of
5.12.2 Water-Filling (Power Allocation)
Primal (reformulated):
where
Lagrangian:
KKT conditions:
, , - Stationarity:
, .
Solution:
- If
: and . - If
: and .
These combine to
Determine
Interpretation: Think of
5.12.3 Projection onto the 1-Norm Ball
Primal:
KKT conditions:
minimizes
The problem is separable. For
Hence
- If
, solution is , . - Otherwise, solve the piecewise-linear equation in
:
5.13 Summary
| Concept | Key Idea |
|---|---|
| Lagrangian | Weighted sum of objective and constraints |
| Dual function | Infimum of Lagrangian over primal variables; always concave |
| Dual problem | Maximize dual function over |
| Weak duality | |
| Strong duality | |
| Slater's condition | Existence of a strictly feasible point guarantees strong duality |
| Complementary slackness | |
| KKT conditions | Necessary and sufficient optimality conditions for convex problems under Slater |
| Sensitivity |