Duality gap 2026-10-18
For finite primal and dual optimal values in a minimization problem, the duality gap is . Strong duality means this difference is zero.
Lagrangian duality Created 2026-10-06 Updated 2026-10-18
A feasible point gives an upper bound on a minimization problem's best value; a suitable Lagrange multiplier gives a lower bound. Lagrangian duality searches for the strongest bound obtainable this way. Matching bounds certify a global minimum.
Let be a nonempty decision domain on which the objective function and the constraint functions are finite. Write the primal problem and its optimization Lagrangian as
The inequality Lagrange multipliers obey ; the equality Lagrange multipliers are unrestricted real numbers. Define the Lagrange dual function and dual optimal value by
The inner infimum keeps , but releases the displayed optimization constraints. It can be , giving an uninformative lower bound. A different domain changes the bound.[ref]
Here is the entire weak duality argument. For any feasible point and allowable Lagrange multipliers,
The first inequality is the definition of an infimum; the second uses and . Taking the infimum over feasible , then the supremum over allowable Lagrange multipliers, gives . No convexity is used.
The Lagrange dual function is a concave function, since each fixed decision makes an affine function of the Lagrange multipliers.[ref] Explicitly, write and choose two points where is finite. For and every ,
Taking the infimum over proves the defining concavity inequality. Thus even a difficult primal problem supplies a dual with useful geometry, although evaluating can itself be difficult.
For finite optimal values, strong duality means , or zero duality gap. It need not imply dual attainment. For convex optimization, Slater's condition is a sufficient constraint qualification for both when is finite.[ref] The Strong Lagrangian property requires an actual finite Lagrange multiplier achieving equality. Convex perturbation duality interprets such a bound as a supporting slope of the perturbed value function.
A nonconvex primal problem can have a positive duality gap even when both optima are attained. Choose the finite set , the objective function values , , , and the equality optimization constraint . The only feasible point is , so .
With unrestricted equality Lagrange multiplier , the three possible optimization Lagrangian values and their minimum are
The concave Lagrange dual function has unique maximizer , with . Thus the duality gap is . At the optimal Lagrange multiplier, both inner minimizers and violate the equality; the dual optimum does not recover a primal optimizer.
Figure 1.
A feasible finite problem has a duality gap of 3 despite dual attainment
. Left: three allowed decisions shown as cost versus equality residual. For each indicated Lagrange multiplier, the line lies below every allowed cost. The dotted segment joining the two zero-cost points contains cost-residual pairs unavailable to any allowed decision. Right: maximizing gives 0, below the primal value 3. Details.
Why can no slope close the gap? Any affine function lying below the two endpoint costs obeys and . Adding gives , so its value at residual zero cannot reach the feasible cost . A convex combination of the endpoint cost-residual pairs with equal weights has residual zero and average cost zero. This averaged pair is unattainable: the actual decision costs . This geometry explains precisely what the dual bounds fail to distinguish. Nonconvexity does not force a positive duality gap: changing only to makes both optimal values zero on the same nonconvex domain.
Consider an objective function that is a quadratic polynomial, with a singular optimization constraint:
Its only feasible point is , giving . For , completing the square yields
Every finite Lagrange multiplier gives , but as . Thus : strong duality holds, and the primal optimum is attained, yet dual attainment fails. The inner minimizers approach without ever becoming feasible at finite .
Both the objective function and the constraint function are convex functions. However, Slater's condition fails because is impossible. At the optimum, stationarity would require , which no finite Lagrange multiplier satisfies. Compare KKT regularity at a local minimum: a zero gradient of an active constraint can prevent a multiplier certificate. This example has zero duality gap without the Strong Lagrangian property.