Lecture 24: Duality
Overview
Burton Ma explains Lagrangian duality as a way to turn a constrained minimization problem into a maximization over multipliers, where the dual function supplies a lower bound on the primal minimum. He derives the dual for a quadratic objective with linear equality constraints, works through a one-dimensional example where both optima equal -5/2, and introduces strong duality and the geometric intuition behind KKT conditions for inequality constraints.
Key takeaways
- For equality constraints h(W) = 0, minimizing the Lagrangian over all W produces a dual value that is a lower bound on the constrained primal minimum.
- The dual function for a quadratic objective can be derived by minimizing the Lagrangian over W for each multiplier μ, then substituting the minimizing W back into the Lagrangian.
- In the scalar example f(W) = 1/2 W² + 2W - 1 with -W - 3 = 0, the primal solution is W = -3 with value -5/2, and the dual maximum occurs at μ = -1 with the same value.
- Strong duality means the optimal dual bound equals the primal minimum; Ma identifies convex objectives with affine constraints as an important setting where this equality holds under suitable conditions.
- For the disk constraint w₁² + w₂² - 2 ≤ 0 and objective w₁ + w₂, the optimum (-1, -1) is characterized geometrically by the absence of any feasible direction that decreases the objective.
- KKT conditions extend Lagrange multiplier methods to inequality constraints; the historical account credits William Karush's 1939 thesis with stating conditions later published by Harold Kuhn and Albert Tucker in 1951.
Chapters
- The primal is the original constrained minimization problem; its dual is a maximization problem over a different set of variables.
- Burton Ma connects George Dantzig's linear programming work to John von Neumann's minimax theorem, describing their problems as primal and dual counterparts.
- Solving a dual can reveal a bound or, under suitable conditions, the solution value of the primal.
- For equality constraints h(W) = 0, the Lagrangian is L(W, μ) = f(W) + μᵀh(W).
- On the feasible set, every constraint term vanishes, so minimizing the Lagrangian there is equivalent to minimizing f(W).
- Minimizing L over all W, including infeasible points, can only produce a value no greater than the constrained minimum; this defines the dual function.
- Ma writes multiple linear equalities together as MW = D and assumes M has full rank, so the constraints are linearly independent.
- For a quadratic objective, form L(W, μ), differentiate with respect to W only, set the gradient to zero, and solve for the minimizing W as a function of μ.
- Substituting that W back into L removes W and yields a dual function of the multipliers; maximizing it gives the tightest available lower bound.
- The example uses a scalar quadratic objective with K = 1, Q = 2, and C = -1, giving f(W) = 1/2 W² + 2W - 1.
- Its equality constraint uses M = -1 and D = 3, so h(W) = -W - 3 = 0 and the feasible value is W = -3.
- Using the Lagrange multiplier method, Ma evaluates the constrained objective at W = -3 and obtains the minimum -5/2.
- For the same example, differentiating the Lagrangian with respect to W gives W + 2 - μ = 0, hence W*(μ) = μ - 2.
- Substituting W*(μ) into the Lagrangian gives a concave dual function, which Ma writes as -1/2 μ² - μ - 3.
- The dual reaches its maximum at μ = -1, where its value is -5/2, matching the constrained primal minimum.
- Ma calls this equality of optimal primal and dual values strong duality.
- Ma states that strong duality holds for convex objectives with affine or linear constraints under the relevant conditions.
- Least-squares objectives are convex, so adding linear constraints preserves the setting in which the dual can recover the primal optimum.
- Dantzig's linear programming work is another duality example; Ma notes that the simplex method remains an efficient way to solve such problems.
- The lecture flags support vector machines as a later application of duality.
- The lecture shifts from equality constraints h(W) = 0 to inequality constraints g(W) ≤ 0 and mixed constraint problems.
- Karush-Kuhn-Tucker conditions extend Lagrange multiplier reasoning and describe necessary conditions for a local minimum.
- Ma recounts that Harold Kuhn and Albert Tucker published the conditions in 1951, while William Karush had presented the same conditions in a 1939 master's thesis.
- The original Kuhn-Tucker formulation needed additional conditions after an error was identified.
- The geometric example minimizes f(w₁, w₂) = w₁ + w₂ inside a disk of radius √2.
- The disk is described by g(w) = w₁² + w₂² - 2 ≤ 0, and its feasible region includes the circle's interior.
- The objective gradient is (1, 1), while the constraint gradient (2w₁, 2w₂) points radially outward on the boundary.
- The minimum occurs at (-1, -1), where the objective value is -2 and the point lies on the disk boundary.
- At a boundary point, a direction v is locally feasible when it points inward or tangent to the disk, rather than outside the feasible set.
- The objective decreases along v when ∇f · v < 0; for f(w₁, w₂) = w₁ + w₂, ∇f = (1, 1).
- At (-1, -1), there is no direction that both stays inside the disk and decreases the objective, providing the geometric intuition for a constrained optimum.
- Ma pauses the KKT discussion at this point and asks students to review the feasible-direction questions before the continuation.
Transcript excerpt
0:03 All right. Good morning, everybody. Um, so today's lecture um is about this concept called duality. All right. And so in optimization uh this concept called duality um states that an optimization problem can be viewed from two different perspectives. So we've been viewing everything as a minimization problem. Um and so if you think about the problems where we have a minimize some objective function F under some constraints H um we can call that the the primal problem. So the primal problem is just your original statement of the problem, right? And we're always framing things in terms of minimization. Uh it turns out you can view these
0:51 minimization problems from a second perspective uh which is called the dual problem. Right? So if your primal problem is a minimization problem, then your dual problem is a maximization problem. So it's still an optimization problem um but it becomes maximization instead of minimization. So uh this says in many cases, but I would I don't think this is true. So in some cases, it's easier to solve the dual problem. Uh if you solve the dual problem, that might tell you something about the primal problem. And under certain conditions, the solutions for the dual and the primal are equal. Uh and so this concept of duality um is thought to have originated from John von Neumann. Uh and so if you remember George
1:38 Dantzig, uh I told you about him a little bit. Um so he came up with the simplex method for solving uh constrained linear optimization problems. Um so he came up with this uh with the algorithm. Never actually he couldn't prove that it was um that it actually worked. Right? It seemed to work, but he couldn't prove that it actually worked. Uh, and so, he met von Neumann one day
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.