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.
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
Let (the objective) and (the constraint) be continuously differentiable. The problem is to find local extrema of subject to
Derivation hint: this defines the feasible set as the level set (hypersurface) where the constraint vanishes. The feasible set is , a hypersurface of dimension where .
The Lagrangian combines objective and constraint with a scalar multiplier :
Derivation hint: subtract times the constraint so that stationarity in recovers . Here and is the Lagrange multiplier, an auxiliary unknown.
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
Derivation hint: the objective gradient must lie in the line spanned by the constraint gradient — i.e., orthogonal to every tangent direction of . Equivalently, is a stationary point of :
Derivation hint: setting all partials of the Lagrangian to zero reproduces equation [3] plus the constraint [1].
For constraints , the result generalizes (with linearly independent gradients):
Derivation hint: must lie in the span of all active constraint gradients, the normal space to the intersection surface.
Why It Holds
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 :
Derivation hint: apply the multivariable chain rule; the result says is orthogonal to every tangent vector of . Thus spans the tangent space , the orthogonal complement of .
Step 3. Because is an extremum of (a function of ), its derivative vanishes:
Derivation hint: a one-variable extremum has zero derivative; chain rule converts this to a dot product.
Step 4. Equation [7] holds for every tangent vector . Therefore is orthogonal to the entire tangent space — it lies in the normal line, which is spanned by (nonzero by regularity).
Step 5. Hence is a scalar multiple of :
Derivation hint: two vectors both orthogonal to the same -dimensional hyperplane must be collinear in . establishing [3]. Uniqueness of follows since .
∎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.
Worked Examples
Given: Maximize the area of a rectangle subject to fixed perimeter , with m.
Step 1. Form the gradient equations from [3]:
Derivation hint: compute partials of and , then set them proportional component-wise.
Step 2. From the components: and , so .
Step 3. Substitute into the constraint m, hence m.
Step 4. The multiplier: m. The optimum is a square. The maximal area is:
The multiplier predicts that increasing by m raises max area by (check: ). ✓
Given: Minimize squared distance subject to the plane .
Step 1. Gradients: , . Set :
Derivation hint: each component of equals times the corresponding component of .
Step 2. Solve: .
Step 3. Substitute into the constraint:
Step 4. Therefore . The minimal squared distance is , so the distance is .
This matches the formula . ✓
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).
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
Historical Development
Subtleties & Limits
Second-order conditions and degenerate constraints. While the first-order multiplier equation is clean, classifying stationary points requires the bordered Hessian restricted to the tangent space — a subtle test that fails in degenerate cases. When constraint qualifications break down (non-smooth, redundant, or tangent constraints), multipliers may fail to exist or become non-unique, and the active research field of non-smooth and variational analysis (subdifferentials, Mordukhovich calculus) provides generalized multiplier rules. For global constrained optimization over non-convex sets, the local nature of multiplier conditions leaves open the hard problem of certifying global optimality, which connects to ongoing work in polynomial optimization and the moment/sum-of-squares hierarchies.
See Also
Gradient and Directional Derivatives · Karush-Kuhn-Tucker Conditions · Duality (Optimization) · Convex Optimization · Calculus of Variations · Bordered Hessian · Lagrangian Mechanics · Critical Points and Extrema