---
tag: 6F09WX7TE2
kind: proof
name: Proof of the Lagrange multiplier theorem by the implicit function theorem
msc: ["90C46"]
proves: 0VKKP8X6Q6
uses: [0BXBADR94C, 0YF0VXKXGB, 0NS2QYVC4Y, 0TZAG60ZYT, 0EVHJFTG9Z, 04CPG9K1C4, 0F405477F8, 0EAAS2EHDR, 0KXSK8TEEB, 0TCBZMEYGN, 0S9EK5MQPE]
sources:
  - url: https://econ.sufe.edu.cn/_upload/article/files/12/23/c80337b04ffebac31ff87c5d4454/a079e700-0a8b-43d5-82c2-b120938a69d1.pdf
    locator: Theorem 4.4
---

## Proof

We solve the constraints for $m$ of the variables, and reduce to an extremum without constraints.

1. Let $U$, $m < n$, $f$, $g$, $M$ and $a$ be as in the statement. The functions $f$ and $g$ are of [[class C^1|0TCBZMEYGN]], so they are [[differentiable|0KXSK8TEEB]] on $U$.
2. Let $J = Dg(a)$, the $m \times n$ [[Jacobian matrix|0YF0VXKXGB]]. Its rows are the [[gradients|0NS2QYVC4Y]] $\nabla g_1(a), \dots, \nabla g_m(a)$, which are [[linearly independent|0EVHJFTG9Z]]. So the row space of $J$ has dimension $m$. Since [[row rank equals column rank|0TZAG60ZYT]], the columns of $J$ span $\R^m$, and some $m$ of them are linearly independent.
3. Reordering the coordinates of $\R^n$ reorders the entries of every gradient in the same way. So it does not change the statement. We may therefore assume that the last $m$ columns of $J$ are linearly independent.
4. Write $x = (u, w)$ with $u \in \R^{n-m}$ and $w \in \R^m$, and $a = (a', b)$. Write $D_u$ and $D_w$ for the matrices of partial derivatives with respect to $u$ and $w$. Then $D_w g(a)$ is the $m \times m$ matrix of the last $m$ columns of $J$, so it is invertible.
5. Since $g(a) = 0$, the [[implicit function theorem|0BXBADR94C]] gives open sets $U' \ni a'$ and $V' \ni b$, and a $C^1$ function $\varphi \colon U' \to V'$, with this property. For $(u, w) \in U' \times V'$, $g(u, w) = 0$ if and only if $w = \varphi(u)$. Here $U' \times V' \subseteq U$, since $g$ is evaluated on this set.
6. The theorem also gives $D\varphi(a') = -\big( D_w g(a) \big)^{-1} D_u g(a)$. Since $(a', b) \in U' \times V'$ and $g(a', b) = 0$, we have $\varphi(a') = b$.
7. Define $\psi(u) = (u, \varphi(u))$ for $u \in U'$. Then $\psi(u) \in M$ for every $u \in U'$, and $\psi(a') = a$.
8. Assume that $f$ restricted to $M$ has a [[local maximum|04CPG9K1C4]] at $a$. So there is $\varepsilon > 0$ with $f(x) \le f(a)$ for $x \in M$ with $\norm{x - a} < \varepsilon$.
9. The map $\psi$ is [[continuous|0S9EK5MQPE]] at $a'$. So there is $\delta > 0$ with $\norm{\psi(u) - a} < \varepsilon$ for $u \in U'$ with $\norm{u - a'} < \delta$. For such $u$, step 8 gives $f(\psi(u)) \le f(a) = f(\psi(a'))$.
10. Thus $f \circ \psi$ has a local maximum at $a'$, on the open set $U'$. The case of a local minimum is the same, with the inequalities reversed.
11. By the [[chain rule|0EAAS2EHDR]], $f \circ \psi$ is differentiable at $a'$, with $D(f \circ \psi)(a') = D_u f(a) + D_w f(a) \, D\varphi(a')$.
12. By the theorem that [[the derivative vanishes at a local extremum|0F405477F8]], this derivative is $0$. With step 6, $D_u f(a) = D_w f(a) \big( D_w g(a) \big)^{-1} D_u g(a)$.
13. Define the row vector $\lambda = D_w f(a) \big( D_w g(a) \big)^{-1}$, with entries $\lambda_1, \dots, \lambda_m$. Then $D_w f(a) = \lambda \, D_w g(a)$, and step 12 says $D_u f(a) = \lambda \, D_u g(a)$.
14. Together, $Df(a) = \lambda \, Dg(a)$ as $1 \times n$ matrices. The row $\lambda \, Dg(a)$ is $\sum_i \lambda_i \nabla g_i(a)$. So $\nabla f(a) = \lambda_1 \nabla g_1(a) + \dots + \lambda_m \nabla g_m(a)$.
15. If $\mu \in \R^m$ also satisfies this equation, then $\sum_i (\lambda_i - \mu_i) \nabla g_i(a) = 0$. The gradients are linearly independent, so $\mu = \lambda$. This proves uniqueness.

## Idea

Near $a$, the constraint set is the graph $w = \varphi(u)$, by the implicit function theorem. On this graph, $f(u, \varphi(u))$ is a function of $u$ alone with a free local extremum, so its derivative is zero. The formula for $D\varphi$ then shows that $Df(a)$ is a combination of the rows of $Dg(a)$.
