KKT Conditions
Statement
At a local minimum of subject to inequality constraints , the Karush–Kuhn–Tucker (KKT) conditions must hold (under suitable regularity):
The third condition is complementary slackness: either (constraint is inactive) or (constraint is active).
Equality-constrained example. Minimize subject to .
The Lagrangian is:
Setting : and , so . Combined with : the optimum is with multiplier .
Visualization
Contours of (concentric circles) and the constraint line :
y
1 | *
| / constraint: x + y = 1
0.5 |* optimum (1/2, 1/2)
| \
0 +----*---- x
0 0.5 1
The optimum is the point on the line closest to the origin — the circle is tangent to the line exactly at .
| feasible? | |||
|---|---|---|---|
| 1.00 | 1 | yes | |
| 0.50 | 1 | yes (opt) | |
| 1.00 | 1 | yes | |
| 0.00 | 0 | no |
Complementary slackness: the equality constraint is active ().
Proof Sketch
- Form the Lagrangian .
- First-order stationarity: gives .
- Primal feasibility: for all .
- Dual feasibility: for all .
- Complementary slackness: — active constraints have positive multipliers; inactive constraints have zero multiplier.
For s.t. : the symmetry follows from , and feasibility pins down .
Connections
- Lagrange MultipliersLagrange MultipliersAt a constrained extremum, the gradient of the objective is proportional to the gradient of the constraintRead more → — KKT generalises Lagrange multipliers from equalities to mixed equality/inequality constraints
- Convex FunctionConvex FunctionA function is convex when the chord between any two points lies above the graphRead more → — for convex and convex feasible sets, KKT conditions are also sufficient
- AM–GM InequalityAM–GM InequalityThe arithmetic mean is always at least as large as the geometric meanRead more → — AM–GM is itself an instance of a constrained optimality result recoverable via KKT
- Cauchy–Schwarz InequalityCauchy–Schwarz InequalityThe inner product of two vectors is bounded by the product of their normsRead more → — Cauchy–Schwarz can be derived by KKT applied to a unit-sphere constraint
Lean4 Proof
import Mathlib.Analysis.InnerProductSpace.Basic
/-- At the KKT optimum of min x²+y² s.t. x+y=1, the minimiser is (1/2, 1/2)
and the objective value is 1/2. Verified by nlinarith. -/
theorem kkt_min_sum_sq :
∀ x y : ℝ, x + y = 1 → (1 : ℝ) / 2 ≤ x ^ 2 + y ^ 2 := by
intro x y hxy
nlinarith [sq_nonneg (x - y), sq_nonneg (x + y)]Referenced by
- Convex FunctionOptimization
- Linear Programming DualityOptimization
- Lagrange MultipliersOptimization