How do you solve subject to using the KKT conditions, and what does each condition mean?
Linear algebra and optimisation, Constrained optimisation
Level L3 Intermediate. Length Medium. Nature Mat Mathematical.
What's being asked
Whether you can write the KKT conditions with the right signs, split into the active and inactive cases, and interpret the multiplier.
Key idea
Form the Lagrangian , where is the multiplier for the constraint. The KKT conditions are: stationarity (), primal feasibility (), dual feasibility (), and complementary slackness (). The unconstrained minimum breaks the constraint, so the constraint must be active and .
Steps
- Write the constraint as , form the Lagrangian, and list the four conditions. Say what each means: stationarity is “no downhill direction that stays feasible”; complementary slackness is “either the constraint is tight or its multiplier is zero”.
- Stationarity: and , so .
- Case (constraint not active): , but , which is infeasible. So , and complementary slackness forces . Then , so and , with objective value .
- Check the remaining conditions: and is feasible. The objective is convex and the constraint is linear, and some point satisfies the constraint strictly (e.g. , which is Slater's condition). So KKT is sufficient, and is the global minimum. Geometrically, it is the closest point to in the half-plane.
- Interpret as a price. With the constraint (for ), the optimum is with value . Its slope at is , so : loosening the constraint by a small lowers the cost by about .
- Link to ML. In the SVM, complementary slackness means only points exactly on the margin (the support vectors) can have .
Common mistakes
- Getting the sign of the multiplier wrong. For a constraint , add with .
- Skipping the case split (constraint active or not) and assuming the answer.
- Claiming KKT is sufficient without convexity. For non-convex problems it is only necessary, and only under a constraint qualification.
How long your answer should be
Half a page; about 5 minutes.
Last checked on 4 December 2026.
Read this
Previous in Linear algebra and optimisation: What is the Adam update, why does it need bias correction, and how large is its very first step?
Next in Linear algebra and optimisation: Using the Gram–Schmidt process, how do you turn the columns of into an orthonormal basis, and how do you write the resulting factorisation?