Canonical: https://knowlpedia.com/real-analysis/lagrange-multiplier-condition/

# Lagrange multiplier condition

Necessary first-order condition for constrained extrema in terms of gradients.

**Lagrange multiplier condition:** Let \(U\subseteq\mathbb R^n\) be an [open set](https://knowlpedia.com/topology/open-set/). Let \(f:U\to\mathbb R\) and \(g:U\to\mathbb R^m\) be continuously differentiable with \(m<n\), and consider the [constraint set](https://knowlpedia.com/real-analysis/constraint-set/) \(S=\{x\in U: g(x)=0\}\). If \(x^\ast\in S\) is a local [extremum](https://knowlpedia.com/real-analysis/local-extremum/) of \(f\) restricted to \(S\) and \(Dg(x^\ast)\) has rank \(m\) (so \(x^\ast\) is a [regular point](https://knowlpedia.com/real-analysis/regular-point/) of \(g\)), then there exists \(\lambda\in\mathbb R^m\) such that
\[
Df(x^\ast)=\lambda^{\mathsf T}Dg(x^\ast).
\]

In the common case \(m=1\), this says the [gradient](https://knowlpedia.com/real-analysis/gradient/) vectors satisfy \(\nabla f(x^\ast)=\lambda\,\nabla g(x^\ast)\), so the constrained extremum occurs at a point where \(f\) has a [critical-point-type condition](https://knowlpedia.com/real-analysis/critical-point/) compatible with the constraint.
