Lagrange multiplier condition

A first-order necessary condition for constrained extrema with equality constraints
Lagrange multiplier condition

Let f:URnRf:U\subseteq \mathbb{R}^n\to\mathbb{R} and g:URmg:U\to\mathbb{R}^m be differentiable, and consider maximizing/minimizing f(x)f(x) subject to the constraint g(x)=0g(x)=0.

A point xUx^\ast\in U satisfies the Lagrange multiplier condition if

  • g(x)=0g(x^\ast)=0, and
  • there exists λRm\lambda\in\mathbb{R}^m such that f(x)=Dg(x)Tλ.\nabla f(x^\ast)=Dg(x^\ast)^{\mathsf T}\lambda.

Geometrically, this says the of ff at an extremum is orthogonal to the tangent space of the (when that tangent space is well-defined). Under regularity hypotheses (e.g., Dg(x)Dg(x^\ast) has rank mm), this condition is necessary for constrained extrema.

Examples:

  • Maximize f(x,y)=xf(x,y)=x subject to g(x,y)=x2+y21=0g(x,y)=x^2+y^2-1=0. At the maximizer (1,0)(1,0), f=(1,0)\nabla f=(1,0) and g=(2,0)\nabla g=(2,0), so f=λg\nabla f=\lambda \nabla g with λ=12\lambda=\tfrac12.
  • For a single constraint g(x)=0g(x)=0 (i.e., m=1m=1), the condition becomes f(x)=λg(x)\nabla f(x^\ast)=\lambda\,\nabla g(x^\ast).