Lagrange Multipliers
Lagrange multipliers find the extrema of a function subject to one or more constraints by solving . Key result: at a constrained extremum, the gradient of the objective is a linear combination of the constraint gradients. Applies to: optimization under equality constraints in economics, physics, machine learning, and engineering. Who/when: Joseph-Louis Lagrange, ~1788, in his Mécanique analytique.The method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints. Given a differentiable objective and a constraint , the method asserts that at any constrained extremum the gradient must be parallel to ; the scalar proportionality constant is the Lagrange multiplier. This converts a constrained optimization problem in variables into an unconstrained system of equations. The method matters because countless real problems — maximizing utility under a budget, minimizing energy under a fixed length, fitting models under norm constraints — are naturally constrained. The surprising fact is that the multiplier is not merely an algebraic bookkeeping device: it equals the sensitivity (shadow price) of the optimal value to relaxation of the constraint.
The Core Insight
At a constrained extremum, you cannot increase by moving along the constraint surface. This means has no component tangent to the surface — it points entirely normal to it. Since is also normal to the surface , the two gradients must be parallel: . The multiplier measures how much normal force the constraint exerts.
Formal Statement
Constrained Optimization Problem
Let (the objective) and (the constraint) be continuously differentiable. The problem is to find local extrema of subject to
The feasible set is , a hypersurface of dimension where .
Lagrangian Function
The Lagrangian combines objective and constraint with a scalar multiplier :
Here and is the Lagrange multiplier, an auxiliary unknown.
Lagrange Multiplier Theorem
Let be near a point with and (the regularity or constraint qualification). If is a local extremum of restricted to , then there exists a unique such that
Equivalently, is a stationary point of :
For constraints , the result generalizes (with linearly independent gradients):
Why It Holds
Geometric Derivation via Tangent Spaces
Step 1. Let be a local extremum of . Consider any smooth curve lying in with . Since for all , we have identically. Step 2. Differentiate the constraint along the curve at :Thus spans the tangent space , the orthogonal complement of .
Step 3. Because is an extremum of (a function of ), its derivative vanishes:establishing [3]. Uniqueness of follows since .
Joseph-Louis Lagrange | 1736–1813
Born Giuseppe Lodovico Lagrangia in Turin, Lagrange was a towering figure in analysis, number theory, and celestial mechanics. He developed the method of multipliers while reformulating mechanics in his masterwork Mécanique analytique (1788), where he famously boasted the book contained no diagrams — reducing physics to pure analysis. The multiplier technique arose from his treatment of constrained systems and the principle of virtual work, where reaction forces play the role the multipliers do in optimization. He succeeded Euler at the Berlin Academy and later moved to Paris, surviving the Revolution and becoming a senator under Napoleon.
Building Intuition
Imagine hiking on a mountain whose elevation is , but you are forced to stay on a fenced trail . You reach the highest point on the trail when the trail runs tangent to a contour line of the mountain. At that moment, walking forward along the trail neither gains nor loses elevation — the trail is level to first order. Geometrically, the contour of and the trail are tangent, which means their normal directions and point the same way (up to sign and scale). The multiplier tells you how steeply the elevation contours are bunched relative to the trail's contour — i.e., how much higher you could climb if the fence were moved outward slightly.
At a constrained maximum, the contour of $f$ is tangent to the constraint curve $g=0$, so $\nabla f \parallel \nabla g$.
Worked Examples
Maximizing Area for Fixed Perimeter
Given: Maximize the area of a rectangle subject to fixed perimeter , with m. Step 1. Form the gradient equations from [3]:The optimum is a square. The maximal area is:
Closest Point on a Plane to the Origin
Given: Minimize squared distance subject to the plane . Step 1. Gradients: , . Set :Common Misconceptions
The condition is necessary but not sufficient. It locates stationary (critical) points of the constrained problem — these may be maxima, minima, or saddle points. You must compare -values across all solutions, examine boundaries, or use the bordered Hessian second-order test to classify them. Also note: can be negative or zero; its sign carries meaning (the direction of the constraint's pull), not an error.
The regularity condition (constraint qualification) is essential. If vanishes at a candidate point, the theorem provides no , and a constrained extremum can occur there without satisfying . Always check that constraint gradients are nonzero (and, for multiple constraints, linearly independent).
Regularity Failure
Minimize subject to (a cusp curve). The constrained minimum of on this curve occurs at the cusp , where vanishes. Here cannot be written as for any . The method fails precisely because regularity is violated — a vivid reminder to verify constraint qualification before trusting the multiplier equations.
Connections
Lagrange multipliers sit at the crossroads of several major frameworks. They generalize to inequality constraints via the Karush-Kuhn-Tucker Conditions, where multipliers must satisfy sign and complementary-slackness conditions. The Lagrangian itself is the bridge to Convex Optimization and Duality (Optimization), where the dual function is the infimum of over . The geometric core — gradients orthogonal to level sets — is pure Gradient and Directional Derivatives, and the tangent/normal decomposition foreshadows Differential Geometry of submanifolds. In physics, multipliers reappear as constraint forces in the Calculus of Variations and Lagrangian mechanics.
Real-World Applications
- Economics — Utility maximization: A consumer maximizes utility subject to a budget . The multiplier is the marginal utility of income (the shadow price of relaxing the budget).
- Machine Learning — Support Vector Machines: Training an SVM maximizes the margin subject to classification constraints; the dual formulation via Lagrange multipliers yields the support vectors (nonzero multipliers).
- Thermodynamics — Maximum entropy: Deriving the Boltzmann distribution maximizes entropy subject to fixed total probability and energy; multipliers become temperature and normalization (partition function).
- Engineering — Structural design: Minimizing material (weight) subject to a fixed load-bearing or stress constraint uses multipliers to find optimal cross-sections.
- Portfolio Optimization (Markowitz): Minimizing variance subject to a target return and budget produces the efficient frontier via multipliers.
- Quantum chemistry — Hartree–Fock: Minimizing energy subject to orbital orthonormality introduces multipliers that become orbital energies (eigenvalues).
- Image processing — Constrained denoising: Total-variation minimization subject to a noise-level constraint uses multipliers to balance smoothing against fidelity.
Historical Development
- 1755: Euler and the young Lagrange correspond on the calculus of variations; Lagrange introduces the "-calculus" of variations, the seed of constrained extremization.
- 1760s: Lagrange develops virtual-work principles for mechanics, where reaction forces anticipate multipliers.
- 1788: Publication of Mécanique analytique; the multiplier method appears systematically for constrained mechanical systems.
- 1797–1813: Lagrange's lectures at the École Polytechnique disseminate the analytic, diagram-free approach to constrained problems.
- 19th century: The method becomes standard in textbooks of advanced calculus and rational mechanics across Europe.
- 1939: William Karush, in his Master's thesis, derives optimality conditions for inequality constraints — the first form of KKT.
- 1951: Harold Kuhn and Albert Tucker independently publish the inequality-constrained generalization, founding nonlinear programming.
- 1950s–60s: Duality theory and convex analysis (Fenchel, Rockafellar) embed Lagrange multipliers in a rigorous modern framework.
- 1970s–present: Multipliers become central to numerical optimization (augmented Lagrangian, interior-point, ADMM methods) powering large-scale machine learning and engineering design.