A minimisation problem is only half solved by a candidate point, since the candidate is worthless without a proof that nothing does better. Convex duality builds that proof, pairing the original problem with a dual whose every value is a lower bound on the primal optimum, and under a mild condition the best lower bound matches the optimum exactly, certifying it. The mechanism is the supporting hyperplane of the previous post, and the certificate it produces is the system of Karush-Kuhn-Tucker conditions. This post proves duality and derives those conditions [1], [2]. The problem is the convex program
with and the convex and differentiable on , optimal value .
#The Lagrangian and weak duality
The Lagrangian of Equation (1) is for multipliers , and the dual function is .
The dual function is concave, being a pointwise infimum of affine functions of , hence concave regardless of any convexity of .
For every , .
Let be any feasible point, so . Since , the penalty , so . The infimum over is at most the value at the particular , so . Minimising the right side over feasible gives .
The best dual bound is the dual optimum , and the gap is the duality gap. For convex programs satisfying a regularity condition the gap is zero.
#Strong duality
If the convex program Equation (1) has a strictly feasible point, one with for all , and is finite, then and the dual optimum is attained.
Consider the set of constraint-and-objective values that can be dominated,
The set is convex, because if is witnessed by and by , then convexity of and the makes any convex combination witnessed by the same combination , and is closed under increasing and , because a witness for with and also witnesses any . It has nonempty interior, since for any the open set is witnessed by and so contained in . The point lies on the boundary of , since it is in the closure but no point with is in , that being the definition of . Since is convex with nonempty interior and , the nonempty-interior version of the supporting hyperplane theorem gives a nonzero supporting at that point, and since the support inequality holds on itself,
Letting or forces and , since otherwise the left side is unbounded below. The multiplier is strictly positive, for if then on , and the strictly feasible gives a point of with , so with forces , contradicting . Dividing Equation (3) by and writing for , every contributes the point , so . Taking the infimum over gives , and with weak duality this is , attained.
Strong duality makes the dual optimum an exact certificate, a multiplier whose dual value equals . The certificate is encoded in a system of equations and inequalities at the optimal point.
#The Karush-Kuhn-Tucker conditions
Suppose Equation (1) is convex with a strictly feasible point. A feasible is optimal if and only if there is with
the stationarity and complementary slackness conditions.
Suppose is optimal. By strong duality there is a dual optimal with . Then
the last inequality because and . The chain is therefore an equality throughout. Equality on the right forces , a sum of nonpositive terms, so each , complementary slackness. Equality on the left says minimises the convex function , whose gradient there must vanish, stationarity. Conversely, suppose is feasible and satisfies Equation (4). Stationarity makes a minimiser of the convex , since a convex function with zero gradient is at its global minimum, so for any feasible ,
using complementary slackness on the left and , on the right. So is optimal.
The Karush-Kuhn-Tucker conditions are the computational form of optimality, a square system pairing each constraint with a multiplier and demanding stationarity of the Lagrangian, complementary slackness, and feasibility. For a convex program they are exactly equivalent to optimality, so solving them solves the problem. The mean-variance portfolio minimises a quadratic risk subject to a linear return target, and its Karush-Kuhn-Tucker system is linear and solvable in closed form, the multiplier becoming the price of risk. The Almgren-Chriss execution problem minimises a quadratic cost of trading against a schedule, and its system is solvable the same way, the multiplier becoming the urgency of execution.