Skip to content

Lagrangian Function

Definition

For a constrained optimization problem with objective ff and equality constraints hj(x)=cjh_j(\boldsymbol{x})=c_j, a Lagrangian function is an auxiliary function that combines the objective and the constraints with multiplier variables. Under the course convention for equality constraints,

L(x,μ)=f(x)+∑j=1mμj(cj−hj(x)).L(\boldsymbol{x},\boldsymbol{\mu})=f(\boldsymbol{x})+\sum_{j=1}^m \mu_j(c_j-h_j(\boldsymbol{x})).

For inequality constraints, the same idea is used with sign conventions chosen so that multiplier restrictions match the direction of the inequality.


Interpretation

The Lagrangian rewrites a constrained problem as one expression whose stationary points encode both the objective trade-off and the constraint equations.

Circular level sets of f and the constraint line h(x) = c. At x star the gradients of f and h are parallel. At another point on the line they are not, so moving along the line still improves f.

At the illustrated candidate x∗\boldsymbol{x}^\ast, the gradients of ff and hh are parallel. At the orange point they are not, so moving along h(x)=ch(\boldsymbol{x})=c can improve ff. The differentiability and rank assumptions for the multiplier test are stated in the equality-constraint method.

Setting all partial derivatives of L(x,y,μ)L(x,y,\mu) to zero recovers both the tangency condition and the constraint itself.

The Lagrangian is a function of both the decision variables and the multipliers. Partial differentiation with respect to a multiplier recovers its constraint residual; differentiation with respect to a decision variable gives the corresponding stationarity equation.


Key Results

  • Differentiating with respect to the multiplier variables recovers the constraints.
  • Differentiating with respect to the choice variables gives the first-order balance between objective gradients and constraint gradients.
  • Changing the sign convention changes multiplier signs, but not the underlying candidate points when handled consistently.

Examples

  • For max⁡xy\max xy subject to x+y=10x+y=10, one convention uses L(x,y,μ)=xy+μ(10−x−y)L(x,y,\mu)=xy+\mu(10-x-y).
  • For min⁡x2+y2\min x^2+y^2 subject to x+y=1x+y=1, one can use L(x,y,μ)=x2+y2+μ(1−x−y)L(x,y,\mu)=x^2+y^2+\mu(1-x-y).

Prerequisites

Sources

Aliases: Lagrangian, Lagrange function, constrained optimization Lagrangian, Lagrangean Keywords: ordinary Lagrangian Symbols: mu, sum

Last updated: 26 October 2026 00:09