WHY this form? Any problem can be massaged into it: g(x)≥0 becomes −g(x)≤0; maximizing f is minimizing −f. So this single template covers all smooth constrained optimization.
With only hj(x)=0, the minimum sits where the gradient of f is a combination of constraint gradients:
∇f(x∗)+∑jμj∇hj(x∗)=0.
Why? If ∇f had any component along the constraint surface, you could slide that way and decrease f while staying feasible. So at a minimum ∇f must be ⟂ to the surface, i.e. a combination of the ∇hj (the normals).
Inactive (gi(x∗)<0, strictly inside): the fence isn't touched. Locally it's as if the constraint doesn't exist → its multiplier must be 0.
Active (gi(x∗)=0, on the fence): it behaves like an equality, but with a sign restriction.
Why the sign? To stay feasible we can only move where gi decreases or stays (gi≤0). For x∗ to be a minimum, f must not decrease in any feasible direction. Pushing into the fence, −∇gi points to the feasible interior; ∇f must point "outward" to block escape. This forces the multiplier λi≥0.
WHY needed? If the active gradients are degenerate (e.g. two fences meeting in a cusp), the multipliers may not exist even though x∗ is optimal. LICQ guarantees the multipliers exist and are unique.
λi≥0?
Because a feasible move keeps gi≤0; for x∗ to be a min, ∇f must oppose escape into the feasible region, forcing the multiplier non-negative. Equality multipliers have no such restriction.
Recall When are KKT sufficient for a global min?
When the problem is convex (f, gi convex; hj affine).
Recall Feynman: explain to a 12-year-old
You roll a marble in a bowl, but there are walls. The marble stops at the lowest spot it can reach. If it stops away from a wall, the ground there is flat. If it stops against a wall, the wall is pushing on it — and a wall only pushes when you're touching it (that's "complementary slackness"). KKT is just the rulebook that says: at the stopping place, the downhill pull is exactly balanced by flat ground plus the walls you're leaning on.
Socho tum ek ball ho jo cost ko minimize karna chahti ho — yaani neeche girna chahti ho. Lekin tum ek playground ke andar ho jiske around fences (inequality constraints g≤0) aur kuch wires (equality constraints h=0) hain. Ball kahan rukegi? Ya to wahan jahan ground bilkul flat hai (unconstrained minimum), ya phir kisi fence se chipak ke jahan se aage badhna possible hi nahi. KKT conditions bas isi "rukne wali jagah" ka precise mathematical rulebook hain.
Char conditions yaad rakho — S P D C: Stationarity (∇xL=0, yaani downhill pull aur fences ka push balance ho jaye), Primal feasibility (constraints satisfy ho), Dual feasibility (λi≥0, sirf inequality wale multipliers), aur Complementary slackness (λigi=0). Slackness ka matlab simple hai: ek fence tabhi push karta hai jab tum usse touch kar rahe ho. Agar tum fence se door ho (g<0), to uska multiplier λ=0.
Sabse common galti: log socht hain saare multipliers non-negative hone chahiye. Galat! Sirf λ (inequality) ≥0 hota hai, μ (equality) kisi bhi sign ka ho sakta hai — bilkul normal Lagrange ki tarah. Doosri galti: har constraint ko active maan ke solve karna. Hamesha cases test karo — agar tumhe λ<0 mile, to samajh jao tumhara active-set guess galat tha.
Kyun matter karta hai? Convex problems mein (jaise SVM, machine learning ke optimization) KKT conditions necessary aur sufficient hoti hain — yaani inhe solve kar lo to global minimum guaranteed mil jaata hai. Isiliye SVM mein "support vectors" wahi points hote hain jinka constraint active hai aur λ>0. KKT poori modern optimization ki backbone hai.