Lecture 26: KKT geometry
Overview
Burton Ma uses geometric examples to explain how KKT conditions connect active inequality constraints to constrained minima: if the unconstrained optimum is feasible, it remains optimal; otherwise, active constraints and their gradients determine the solution. Examples progress from a six-constraint chairs-and-tables problem, where checking every active-set combination would require up to 2^6 cases, to quadratic problems solved geometrically and with MATLAB's fmincon.
Key takeaways
- For a convex quadratic with a feasible unconstrained minimizer, that point already solves the constrained problem; constraints strictly inside their feasible regions are inactive.
- An active inequality constraint has zero constraint value at the solution, and its multiplier must be nonnegative; inactive constraints have zero multipliers.
- At a constrained minimum, stationarity requires ∇f + Σ λᵢ∇gᵢ = 0, so the objective gradient is balanced by a nonnegative weighted combination of active constraint gradients.
- In the chairs-and-tables example, six inequalities create up to 2^6 = 64 possible active-set combinations, illustrating why manual enumeration does not scale well.
- Intersections of convex half-spaces are convex, and MATLAB's fmincon can represent linear inequalities as A w ≤ b while also supporting equality and nonlinear constraints.
Chapters
- The candidate solution, approximately (300, 275), lies where two inequality boundaries meet, so those two constraints are active and the others are inactive.
- Substituting the candidate into the six constraints shows that all are satisfied and two equal zero.
- Setting the active constraints to equality recovers the candidate, but finding it without being given the answer could require checking up to 2^6 active-set combinations.
- For the objective 1/2 wᵀw, the unconstrained minimum is the origin (0, 0).
- With the linear constraint w1 ≤ 2, the origin is feasible, so it is also the constrained minimum and the constraint is inactive.
- The feasible region for a linear inequality is a half-space, which is convex.
- The constraint w2 + 1 ≤ 0 excludes the unconstrained minimum (0, 0), so the minimum lies on the boundary w2 = -1.
- The closest feasible point to the origin is (0, -1), with inequality multiplier λ = 1.
- At the solution, ∇f = (0, -1) and ∇g = (0, 1), so the gradients are anti-parallel as required by stationarity.
- For w1 + w2 + 3 ≤ 0, the origin is infeasible, and the single inequality is active at the minimum.
- The boundary is a line with slope -1 and y-intercept -3; minimizing 1/2 wᵀw finds its closest point to the origin.
- The Lagrange multiplier is positive, consistent with the KKT requirement λ ≥ 0 for an inequality constraint.
- Combining w1 ≤ 2, w2 ≤ -1, and w1 + w2 + 3 ≤ 0 produces a feasible region that is the intersection of three convex half-spaces.
- The origin violates the constraints, while the closest feasible point lies on the boundary of the third constraint; the first two are inactive.
- The active constraint has gradient (1, 1), which is opposite the objective gradient at the minimum.
- MATLAB's fmincon accepts an objective function and linear inequalities in the form A w ≤ b.
- The example encodes the three constraints with rows (1, 0), (0, 1), and (1, 1), and uses an initial estimate of (0, 0).
- Additional inputs specify linear equalities or nonlinear constraint functions; fmincon selects an appropriate optimization procedure.
- For the quadratic objective 1/2 wᵀKw with K = diag(2, 8), the unconstrained minimum remains (0, 0), but the objective weights the w2 direction more heavily.
- Under w2 ≤ -2, the solution is (0, -2), and the inequality multiplier is 16.
- For the oblique constraint -w1 + 2w2 + 5 ≤ 0, the same weighted objective changes the boundary projection; the example yields a positive multiplier of 5.
- With both linear constraints active, the solution is their intersection, (1, -2), and the multipliers are 12 and 2.
- At that point, ∇f = (2, -16), while the constraint gradients are (0, 1) and (-1, 2); the weighted gradient sum is the negative objective gradient.
- For inequality problems, first test whether the unconstrained solution is feasible; if not, identify active constraints and enforce KKT conditions, while equality-constrained problems go directly to Lagrange multipliers.
Transcript excerpt
0:02 Okay, good morning, everybody. Uh, so let me remind you where we left off at the end of last class. Uh, so we were looking uh so we had just studied the KKT conditions. Um, we saw that there were several conditions um that need to be satisfied for a solution to be a minimizer um given some uh constraints, right? Both inequality and equality constraints. Uh, and so we went back and looked at this problem uh the chairs and tables problem where we have a straight a linear optimization problem with linear inequality constraints. Uh, and previously um you were told well the solution is right there. So it's at like uh well I forget the exact numbers. We'll Oh, 300 and 275. Um, so it's sitting right there at that cusp of the corner there,
0:49 right? And if you um look at the picture uh you can determine that um uh you're at the intersection of two lines, right? So you're at the intersection of that inequality constraint uh and the intersection of this inequality constraint. Uh, and so if you trust that the solution is correct uh there are there will be um two uh active inequality constraints, right? All the other constraints are inactive. Right? For example, the one in the yellow is um what is the one in the yellow again? Is uh this one, the upholstery constraint, I believe. Uh, so it's basically W1 is less than is less than 900. Right? And so everything to the left
1:37 of the rightmost edge here um would be the feasible set for that constraint, right? And so you're inside the feasible set, so you know that the yellow constraint is not an active constraint uh if the solution is correct, right? Okay, so to verify uh
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Burton Ma.