Let x⋆ and (λ⋆,ν⋆) be primal and dual optimal, respectively. Then
f0(x⋆)=g(λ⋆,ν⋆)=xinf(f0(x)+i=1∑mλi⋆fi(x)+i=1∑pνi⋆hi(x))≤f0(x⋆)+i=1∑mλi⋆fi(x⋆)+i=1∑pνi⋆hi(x⋆)≤f0(x⋆)(strong duality)(def of g)(inf property)(x⋆,λ⋆ are feasible)
Since by definition, ∑i=1mλi⋆fi(x⋆)≤0, we conclude that ∑i=1mλi⋆fi(x⋆)=0 and since each term in the sum is negative, one has the complementary slackness property
This means that the i-th optimal Lagrange multiplier λi⋆ is zero as long as the associated inequality constraint is inactive (fi(x⋆)<0). Conversely, if λi⋆>0, this means the constraint is active (fi(x⋆)=0).
Under the assumptions above, we can formulate two KKT conditions for nonconvex and convex problems, respectively.
Hence, for any (differentiable) optimization problem where strong duality holds, KKT conditions are necessary conditions for optimality of the triplet (x⋆,λ⋆,ν⋆).
For convex problems, the KKT conditions become sufficient. Recall that a general convex problem can be put into the form
In other words, for a convex problem, if the triplet (x~,λ~,ν~) satisfies KKT conditions then we have found optimal points and strong duality holds.
Understanding why KKT works:
the first two condition ensures that x~ is primal feasible and (λ~,ν~) are dual feasible
complementary slackness implies that f0(x~)=L(x~,λ~,ν~)
stationarity of the Lagrangian with the fact that L(⋅,λ~,ν~) is convex show that x~ minimizes the Lagrangian over x. Thus by definition g(λ~,ν~)=L(x~,λ~,ν~).
hence f0(x~)=g(λ~,ν~). Strong duality follows and (x~,λ~,ν~) are optimal.
In general, for convex problems KKT conditions are only sufficient. However, provided that strong duality holds, they become necessary and sufficient.
In particular, Slater’s condition implies strong duality and that the dual optimum is attained.
Proposition 1 generalizes the necessary and sufficient condition of unconstrained convex problems (∇f0(x)=0) to the general constrained convex case.
strong duality (almost always) holds for convex problems
the dual problem may help to solve the primal problem very efficiently
duality and dual methods are abundant in optimization and play a very important role in modern optimization; this course is just a rough sketch of the tip of the iceberg!