Lagrange Multipliers and Constrained Optimization
Lagrange multipliers turn a constrained optimization problem into an unconstrained one: to extremize subject to , find points where . The key result is that at a constrained extremum, the gradient of the objective is parallel to the gradient of the constraint. Used throughout calculus, physics (mechanics, thermodynamics), economics, machine learning, and engineering design. Introduced by Joseph-Louis Lagrange in his 1788 Mécanique analytique.
At a constrained extremum, you cannot improve by moving along the constraint surface. Any allowed movement is tangent to the surface , and along every such tangent direction must be momentarily flat. This forces to have no component along the surface — it must point purely perpendicular to it. But is also perpendicular to the surface. Therefore and must be parallel:
Derivation hint: project onto the tangent space of ; vanishing of the tangential component leaves only the normal direction, which is spanned by .
Formal Statement
Given a objective function and constraint functions for (with ), the equality-constrained problem is
Derivation hint: this is the canonical form; any constraint is rewritten as . Symbols: is the decision vector; is the quantity to maximize or minimize; each defines a hypersurface; is the number of constraints; the feasible set is , generically a manifold of dimension .
The Lagrangian function augments the objective with one multiplier per constraint:
Derivation hint: subtract a weighted sum of constraints; the weights are unknowns to be solved for so that recovers each constraint. Symbols: are the Lagrange multipliers. The sign convention (subtract vs. add) does not affect the located points, only the sign of .
Let be continuously differentiable near a point . Suppose the constraint gradients are linearly independent (the constraint qualification, also called regularity). If is a local extremum of restricted to , then there exist unique scalars such that
Derivation hint: equivalent to ; the multipliers are the coordinates of in the basis of constraint normals. Equivalently, together with is a stationary point of the Lagrangian:
Derivation hint: the -gradient gives equation [4]; the -gradient gives , recovering feasibility.
Why It Holds / Derivation
We prove at a constrained extremum of on .
Step 1 — Parametrize feasible motion. Let be any smooth curve lying entirely in with . Feasibility means for all .
Step 2 — Differentiate the constraint. Applying the chain rule at :
Derivation hint: multivariable chain rule; constancy of along the curve forces its derivative to zero. This says is orthogonal to every tangent vector — i.e. is normal to .
Step 3 — Use the extremum condition. Since extremizes on , the scalar function has a local extremum at , so :
Derivation hint: stationarity of a 1-D function at an interior extremum, plus the chain rule.
Step 4 — Combine. Equation [7] holds for every feasible tangent direction . Thus is also orthogonal to the entire tangent space of . The orthogonal complement of that tangent space (under regularity) is one-dimensional, spanned by . Therefore must be a scalar multiple of :
Derivation hint: two vectors orthogonal to the same -dimensional subspace must be collinear.
Step 5 — Multi-constraint generalization. With regular constraints, the tangent space is the common kernel of all , with dimension . Its orthogonal complement is the -dimensional span of , and lying in that span gives equation [4].
∎Born Giuseppe Luigi Lagrangia in Turin, Lagrange became the dominant analyst of the late 18th century. In his monumental Mécanique analytique (1788) he reformulated all of mechanics without a single diagram, deriving the equations of motion from a variational principle and introducing the multipliers that bear his name to handle constraint forces — the tension in a string, the normal force of a surface. His genius was recognizing that constraints could be incorporated algebraically rather than by geometric elimination. He succeeded Euler at the Berlin Academy, later moved to Paris, survived the Revolution, and was made a count by Napoleon. The multiplier method, devised to keep a pendulum on its arc, now underlies optimization across all of quantitative science.
Building Intuition
Picture the contour map of — concentric level curves — and overlay the constraint curve as a winding trail. As you walk along the trail, you cross higher and lower contours of . You are climbing as long as the trail cuts across contours. The highest point on your trail occurs exactly where the trail runs tangent to a contour line — there, locally, you are neither gaining nor losing altitude. At that tangency the contour of and the constraint curve share the same tangent direction, so their normals and point the same way (up to sign and length). The multiplier is just the ratio of those gradient lengths. A second picture: is a price. If a constraint says "spend exactly $100," then tells you how much extra you would gain per extra dollar of budget. A large means the constraint is biting hard; means the constraint is, at that point, not limiting you at all.
Worked Examples
Given: Maximize subject to (a fixed perimeter-like budget). All quantities in arbitrary units; .
Step 1 — Form the gradient equations. , . Setting :
Derivation hint: component-wise equality of .
Step 2 — Solve. From [9], . Substitute into the constraint :
Derivation hint: plug into .
Step 3 — Evaluate the objective. .
Step 4 — Interpret . Since , relaxing the budget to should raise the optimum by about units. Check: , an increase of . ✓
Given: Find the point on the plane nearest the origin. Minimize squared distance subject to . Lengths in metres.
Step 1 — Gradient condition. , . Then gives:
Derivation hint: equate components of .
Step 2 — Express in terms of . .
Step 3 — Apply the constraint.
Derivation hint: substitute the -expressions into and collect terms.
Step 4 — Recover the point. . Distance:
Derivation hint: evaluate the Euclidean norm at the optimal point.
This matches the known formula . ✓
Common Misconceptions
The method finds stationary points, not maxima. Equation [4] is a necessary condition, not sufficient. It locates candidates — maxima, minima, and saddle points all satisfy it. You must afterward (a) evaluate at every candidate and compare, or (b) apply the bordered Hessian second-order test. Also: always check the constraint qualification. If at a feasible point (a singular point of the constraint surface), the theorem can fail and an extremum may exist with no valid . Finally, on unbounded feasible sets you must verify a maximum or minimum actually exists before trusting a critical point.
Minimize subject to (a cusp curve). The feasible set is a curve with a sharp cusp at the origin, where the minimum of occurs (). At the origin — the constraint gradient vanishes, violating regularity. Meanwhile . There is no scalar satisfying . The constrained minimum genuinely exists at the origin, yet the Lagrange equations have no solution there. The cure: the Fritz John conditions allow a multiplier on itself, , permitting at irregular points.
Connections
Lagrange multipliers sit at the crossroads of several frameworks. They are the equality-constraint special case of the <span class="wiki-link-missing">Karush-Kuhn-Tucker Conditions</span>, which add inequality constraints via complementary slackness. The multiplier appears as the dual variable in <span class="wiki-link-missing">Convex Optimization Duality</span>, where the Lagrangian generates the dual problem. The geometric core — gradient orthogonality to a level set — is precisely the statement of <span class="wiki-link-missing">Gradient and Directional Derivative</span>. In the calculus of variations the discrete multiplier becomes a continuous function, giving the constrained <a class="wiki-link" href="/wiki/euler-lagrange-equation">Euler-Lagrange Equation</a> for problems with integral constraints (the isoperimetric problem). And the parallel-gradient condition is the foundation of <span class="wiki-link-missing">Implicit Function Theorem</span> reasoning about how solutions move as parameters change.
Real-World Applications
Historical Development
Subtleties & Limits
Several issues remain delicate even at advanced levels. Constraint qualification is a genuine gap: the standard regularity assumption (linear independence of ) can be weakened to Mangasarian–Fromovitz or other conditions, and characterizing the weakest sufficient qualification is intricate. Global optimization under nonconvex constraints is fundamentally hard — Lagrange conditions only localize, and verifying that a stationary point is the global optimum is NP-hard in general. Numerical conditioning plagues large problems: when constraint gradients are nearly dependent the multiplier system becomes ill-conditioned, motivating augmented-Lagrangian and interior-point methods. In infinite dimensions (control theory, PDE-constrained optimization), existence of multipliers requires functional-analytic care (Lagrange multiplier rules in Banach spaces, surjectivity of the constraint derivative). And the economic interpretation of as a sensitivity holds only under second-order and regularity conditions; nondifferentiable value functions give rise to subdifferential multipliers and the modern theory of variational analysis.
See Also
Karush-Kuhn-Tucker Conditions · Convex Optimization Duality · Gradient and Directional Derivative · Calculus of Variations · Lagrangian Mechanics · Bordered Hessian Test · Implicit Function Theorem · Support Vector Machines