multivariable calculus
Lagrange Multipliers
You should know: gradient, multivariable functions
Overview
Lagrange multipliers solve constrained optimization problems: find the maximum or minimum of f(x,y) subject to a constraint g(x,y)=c. Rather than solving the constraint for one variable and substituting (often messy or impossible), the method exploits a beautiful geometric fact — at a constrained extremum, the gradients of f and g must be parallel.
Intuition
Picture the level curves of f(x,y) as contour lines on a map, and the constraint g(x,y)=c as a fixed path you must walk along. As you walk along the path, you cross different contour lines (different values of f) — except at the extremum, where the path is momentarily TANGENT to a contour line rather than crossing it. Tangent curves have parallel gradients, which is exactly the condition ∇f = λ∇g.
Interactive Graph
Formal Definition
To find extrema of f(x,y) subject to g(x,y)=c, solve the system:
λ (lambda) is the Lagrange multiplier — an auxiliary unknown
Setting ∇ℒ=0 (with respect to x, y, and λ) reproduces exactly the conditions above
Notation
| Notation | Meaning |
|---|---|
| The Lagrange multiplier — a scalar relating ∇f and ∇g at the constrained extremum | |
| The Lagrangian, whose unconstrained critical points solve the constrained problem |
Derivation
Why ∇f = λ∇g at a constrained extremum: parametrize the constraint curve g(x,y)=c as r(t), and consider h(t)=f(r(t)) restricted to that curve.
Chain rule for f restricted to the constraint curve
Necessary condition for an extremum of the restricted function
The constraint's gradient is also always perpendicular to the constraint curve's tangent
In the plane, two vectors both perpendicular to the same nonzero vector must be parallel to each other
Properties
Multiple constraints
Condition: One multiplier per constraint
λ as a shadow price
Condition: λ measures the sensitivity of the optimal value f* to a small relaxation of the constraint c — the 'shadow price' interpretation in economics
Applications
Worked Examples
Set up ∇f = λ∇g with g(x,y)=x+y.
This forces x = y. Combine with the constraint x+y=10.
Evaluate f at the critical point.
Answer: Maximum value 25 at (x,y)=(5,5)
Practice Problems
Minimize f(x,y)=x²+y² subject to x+2y=5.
A rectangle has perimeter 20. Use Lagrange multipliers to maximize its area A=xy subject to 2x+2y=20.
Common Mistakes
Forgetting to check that the solution actually satisfies the ORIGINAL constraint equation, not just ∇f=λ∇g.
The system requires BOTH ∇f=λ∇g AND g(x,y)=c. Solving only the gradient-parallel condition without imposing the constraint leaves an underdetermined system with a free parameter.
Assuming the first critical point found via Lagrange multipliers is automatically the maximum (or minimum).
The method finds ALL critical points satisfying the necessary condition; you must evaluate f at every candidate point (and consider boundary behavior for unbounded constraint sets) to determine which is the true max/min.
Quiz
Historical Background
Joseph-Louis Lagrange introduced the method in his 1788 work Mécanique analytique, developing it as part of his broader reformulation of mechanics using generalized coordinates and constraints. The technique generalizes naturally to any number of variables and constraints and became a cornerstone of the calculus of variations and, later, of mathematical optimization and economics.
- 1788
Lagrange publishes Mécanique analytique, introducing the multiplier method for constrained systems
Joseph-Louis Lagrange
Summary
- Lagrange multipliers optimize f(x,y) subject to a constraint g(x,y)=c by solving ∇f=λ∇g together with the constraint itself.
- Geometrically, at a constrained extremum the level curve of f is tangent to the constraint curve, forcing parallel gradients.
- λ has an economic interpretation as a 'shadow price' — the sensitivity of the optimal value to relaxing the constraint.
- Multiple constraints require one multiplier per constraint: ∇f = Σλᵢ∇gᵢ.
- Must evaluate f at all candidate critical points to identify the actual maximum/minimum, since the method only finds necessary conditions.
References
- BookLagrange, J.-L. (1788). Mécanique analytique.
Mathematics