For a differentiable convex optimisation problem min⁡xf0(x) subject to fi(x)≤0 (fi convex) and hj(x)=aj⊤x−bj=0 (affine), how do you prove that any point (x∗,λ∗,ν∗) satisfying the KKT conditions is globally primal-dual optimal and achieves zero duality gap?

Linear algebra and optimisation, Constrained optimisation
Level L5 Expert. Length Long. Nature Mat Mathematical.

What's being asked

Whether you can prove why KKT conditions are sufficient for global optimality on convex problems and why affine equality constraints are essential.

Key idea

At (λ∗,ν∗) with λ∗≥0, the Lagrangian x↦L(x,λ∗,ν∗) is convex in x. KKT stationarity says its gradient at x∗ is zero, so x∗ minimises the Lagrangian globally, which collapses g(λ∗,ν∗) to f0(x∗) via complementary slackness and closes the duality gap.

Steps

  1. Check convexity of the Lagrangian in x: L(x,λ∗,ν∗)=f0(x)+∑iλi∗fi(x)+∑jνj∗(aj⊤x−bj). Since f0 and each fi are convex, each λi∗≥0 (by KKT dual feasibility), and each νj∗(aj⊤x−bj) is affine (hence convex even if νj∗<0), x↦L(x,λ∗,ν∗) is a non-negative combination of convex functions, so it is convex.
  2. Use KKT stationarity: ∇xL(x∗,λ∗,ν∗)=∇f0(x∗)+∑iλi∗∇fi(x∗)+∑jνj∗aj=0. For a differentiable convex function, a zero gradient implies a global unconstrained minimum, so x∗ minimises L(⋅,λ∗,ν∗) over all x∈Rd.
  3. Evaluate the dual function at (λ∗,ν∗): g(λ∗,ν∗)=inf⁡xL(x,λ∗,ν∗)=L(x∗,λ∗,ν∗)=f0(x∗)+∑iλi∗fi(x∗)+∑jνj∗hj(x∗).
  4. Apply KKT complementary slackness (λi∗fi(x∗)=0) and primal feasibility (hj(x∗)=0): all constraint terms vanish, leaving g(λ∗,ν∗)=f0(x∗).
  5. Finish with weak duality: since x∗ is primal feasible (fi(x∗)≤0,hj(x∗)=0), f0(x∗)≥p∗. By weak duality, d∗≥g(λ∗,ν∗)=f0(x∗)≥p∗≥d∗. Hence f0(x∗)=p∗=d∗=g(λ∗,ν∗), proving x∗ is globally primal optimal, (λ∗,ν∗) is dual optimal, and the duality gap is zero.

Common mistakes

How long your answer should be

One page; 7–8 minutes.

Last checked on 4 December 2026.

Read this

Previous in Linear algebra and optimisation: Let f:Rd→R be convex with minimiser x∗, and suppose stochastic gradients gt satisfy E[gt∣xt]=∇f(xt) and E[∥gt∥22∣xt]≤G2. How do you prove that SGD with fixed step size η satisfies E[f(xˉT)−f(x∗)]≤∥x0−x∗∥222ηT+ηG22 for xˉT=1T∑t=0T−1xt, and what step size gives the optimal O(1/T) rate?
Next in Linear algebra and optimisation: none