Lagrange Multipliers
Lagrange multipliers turn constrained optimization into an unconstrained stationarity condition by pricing the constraint with a multiplier.
1. The idea
To maximize subject to , form the Lagrangian and set its gradient to zero. The condition says that at the optimum, the gradients of the objective and constraint are parallel — you cannot improve without violating .
The multiplier has an economic interpretation as the shadow price of the constraint: it measures how much the optimal value of would change per unit relaxation of .
Multiple constraints add multiple multipliers, one per constraint, each contributing its own gradient term; inequality constraints extend this to KKT conditions, though most interview problems use equality constraints.
2. Why it matters
Mean-variance portfolio optimization, minimum-variance hedging and PCA are all solved with Lagrange multipliers, making this the standard optimization tool in quant finance.
3. Core mathematics
Lagrangian
Stationarity
Shadow price interpretation
4. How to recognize it
Think of this when…
- 'Minimize risk subject to a target return' or similar constrained wording
- Any optimization with an explicit equality constraint like
- Deriving the minimum-variance portfolio weights
5. Worked example
Worked example
Minimize subject to .
- 1
Form the Lagrangian.
- 2
Set partial derivatives to zero.
- 3
Apply the constraint.
- Answer: Minimum is f = 8 at (x,y) = (2,2).
6. Common mistakes
- Forgetting to check the sign/type of critical point (min vs max) since Lagrange only gives stationarity
- Mismatching the number of multipliers to the number of constraints
- Dropping the constraint equation itself when solving the system
7. Quick check
At a constrained optimum, the Lagrange condition states:
The multiplier can be interpreted as:
8. Practice
4 QuantSolve questions use this concept.
Practice this concept9. Related methods
Create a free account to save lesson progress.
Recommended next lessonConvexity & the Hessian →