information:highlighting, stylistic:tone
Statement

The following is known as the Lagrange multiplier theorem.

Let f: R n → R {\displaystyle f:\mathbb {R} ^{n}\to \mathbb {R} } be the objective function, g: R n → R c {\displaystyle g:\mathbb {R} ^{n}\to \mathbb {R} ^{c}} be the constraints function, both belonging to C 1 {\displaystyle C^{1}} (that is, having continuous first derivatives). Let x ⋆ {\displaystyle x_{\star }} be an optimal solution to the following optimization problem such that, for the matrix of partial derivatives j, k = ∂ g j ∂ x k {\displaystyle {\Bigl }_{j,k}={\frac {\ \partial g_{j}\ }{\partial x_{k}}}}, rank (D g (x ⋆)) = c ≤ n {\displaystyle \operatorname {rank} (\operatorname {D} g(x_{\star }))=c\leq n}:

maximize f (x) subject to: g (x) = 0 {\displaystyle {\begin{aligned}&{\text{maximize }}f(x)\\&{\text{subject to: }}g(x)=0\end{aligned}}}

Then there exists a unique Lagrange multiplier λ ⋆ ∈ R c {\displaystyle \lambda _{\star }\in \mathbb {R} ^{c}} such that D f (x ⋆) = λ ⋆ T D g (x ⋆). {\displaystyle \operatorname {D} f(x_{\star })=\lambda _{\star }^{\mathsf {T}}\operatorname {D} g(x_{\star })~.} (Note that this is a somewhat conventional thing where λ ⋆ {\displaystyle \lambda _{\star }} is clearly treated as a column vector to ensure that the dimensions match. But, we might as well make it just a row vector without taking the transpose.)

The Lagrange multiplier theorem states that at any local maximum (or minimum) of the function evaluated under the equality constraints, if constraint qualification applies (explained below), then the gradient of the function (at that point) can be expressed as a linear combination of the gradients of the constraints (at that point), with the Lagrange multipliers acting as coefficients. This is equivalent to saying that any direction perpendicular to all gradients of the constraints is also perpendicular to the gradient of the function. Or still, saying that the directional derivative of the function is 0 in every feasible direction.