Constrained Optimization and Lagrange Multipliers
Optimizing subject to equality constraints, the geometry of parallel gradients, and the multiplier as a shadow price.
Leads to: Lagrangian duality generalizes this to inequalities in Phase 10; the minimum-variance portfolio uses it directly.
Learning Objectives
Click a status chip to cycle: Not started → In progress → Studied → Practiced → Needs review → Mastered.
- State the Lagrange condition \(\nabla f=\lambda\nabla g\) and explain its geometry.
- Solve equality-constrained optimization problems using the Lagrangian.
- Interpret the multiplier \(\lambda\) as the sensitivity of the optimum to the constraint level.
- Derive the minimum-variance portfolio as a constrained quadratic program.
Key Vocabulary
- Constraint set
- The feasible region \(\{x: g(x)=c\}\) over which \(f\) is optimized.
- Lagrange multiplier
- The scalar \(\lambda\) linking objective and constraint gradients at an optimum.
- Lagrangian
- The function \(\mathcal{L}(x,\lambda)=f(x)-\lambda\,(g(x)-c)\) whose stationarity encodes the conditions.
- Shadow price
- The rate \(d f^*/dc=\lambda\) at which the optimal value improves as the constraint loosens.
- Binding constraint
- One satisfied with equality at the optimum, so its gradient enters the stationarity condition.
- Minimum-variance portfolio
- Weights minimizing \(w^\top\Sigma w\) subject to \(\mathbf{1}^\top w=1\).
Intuition & Motivation
The Lagrange condition
The recipe: form \(\mathcal{L}\), set \(\nabla_x\mathcal{L}=0\) and \(\partial_\lambda\mathcal{L}=0\) (the latter just restores the constraint), and solve the combined system. With several constraints, add one multiplier each: \(\nabla f=\sum_k\lambda_k\nabla g_k\).
The multiplier as a shadow price
Envelope theorem: at the optimum, \(\dfrac{d f^*}{dc}=\lambda\). In portfolio terms \(\lambda\) is a marginal cost/benefit - the improvement in the objective per unit relaxation of the constraint. This is why multipliers are called shadow prices and reappear as dual variables in Phase 10.
Application: the minimum-variance portfolio
Let \(\Sigma\succ 0\) be the covariance matrix of \(n\) assets’ returns and \(\mathbf 1\) the all-ones vector. The minimum-variance portfolio solves:
- Forgetting the constraint equation - \(\partial_\lambda\mathcal L=0\) must be part of the system, or you lose it.
- Assuming \(\lambda\) has a fixed sign; for equality constraints it can be positive or negative.
- Applying the method when \(\nabla g=0\) at the candidate (constraint qualification fails).
- Interpreting a Lagrange stationary point as automatically a minimum; check second-order/convexity as in 3.4.
- Set gradients proportional, then use the constraint to pin down \(\lambda\) - two steps, always.
- Read \(\lambda\) as a price: it is the marginal value of loosening the constraint, the dual variable of Phase 10.
- For quadratic objective + linear constraints the system is linear; solve it as one matrix equation (the min-variance closed form).
Knowledge Check
Practical Exercise
Maximize \(f(x,y)=xy\) subject to \(x+y=10\) (allocate a fixed budget of 10 across two uses to maximize their product). Solve with a multiplier and interpret \(\lambda\).
Lagrangian \(\mathcal L=xy-\lambda(x+y-10)\). Stationarity: \(y=\lambda,\ x=\lambda\), so \(x=y\).
Constraint \(x+y=10\) gives \(x=y=5\) and \(\lambda=5\), with maximum \(f=25\).
Interpretation: \(\lambda=5=df^*/dc\). Increasing the budget from 10 to \(c\) gives optimum \(f^*=(c/2)^2=c^2/4\), so \(df^*/dc=c/2=5\) at \(c=10\). Each extra unit of budget adds about 5 to the product at the margin. The symmetric split \(x=y\) is the classic AM–GM result.
Lesson Summary
Formula Sheet Additions
Retrieval Practice
Close the lesson and answer from memory before checking. This is deliberate, effortful recall - the single highest-yield study action.
A: At the constrained optimum the constraint curve is tangent to a level set of f, so their gradients (normals) are parallel.
A: A shadow price: the marginal change df*/dc in the optimal value per unit relaxation of the constraint.
Completion Checklist
- I can explain the core ideas in my own words
- I worked the derivations/examples by hand
- I completed the interactive workbench(es)
- I passed the knowledge check
Source References
This lesson synthesizes and paraphrases concepts from the sources below. No copyrighted text, problem sets, or solutions are reproduced. Return to the originals for full depth.
- Calculus, Vol. II (Tom Apostol, 2nd ed., 1969) foundational - Ch. 9 - Vol. II, Ch. 9: extrema with constraints and the Lagrange multiplier theorem.
- Additional Exercises for Convex Optimization (Boyd & Vandenberghe, 2016) current - Ch. 4-5 exercises - Lagrangians, multipliers as dual variables, and quadratic programs like min-variance.