---
tag: 04A2XEX4D4
kind: statement
role: corollary
name: Lagrange multiplier with one constraint
aliases: [lagrange-multiplier-single-constraint]
msc: [90C46]
uses: [0VKKP8X6Q6, 0NS2QYVC4Y, 0Y5Q8Q9WJ7, 0VXYV3NQQ1]
sources:
  - url: https://en.wikipedia.org/wiki/Lagrange_multiplier
    locator: Single constraint
---

## Statement

Let $U \subseteq \mathbb{R}^n$ be open with $n \ge 2$, and let $f, g \colon U \to \mathbb{R}$ be of class $C^1$.
Let $c \in \mathbb{R}$, and let $a$ be a point of the [[level set|0Y5Q8Q9WJ7]] $\{x \in U : g(x) = c\}$ with $\nabla g(a) \ne 0$.
If the restriction of $f$ to this level set has a local extremum at $a$, then there is a unique $\lambda \in \mathbb{R}$ with
$$\nabla f(a) = \lambda \, \nabla g(a).$$

## Remarks

This is the case $m = 1$ of the [[Lagrange multiplier theorem|0VKKP8X6Q6]], applied to $g - c$.
Geometrically, the level set of $f$ through $a$ is tangent to the constraint set at $a$, because both [[gradients are orthogonal|0VXYV3NQQ1]] to it.
Example: to maximise $f(x, y) = x + y$ on $x^2 + y^2 = 1$, solve $(1, 1) = \lambda (2 x, 2 y)$ and $x^2 + y^2 = 1$. The maximum is $\sqrt{2}$, at $(1/\sqrt{2}, 1/\sqrt{2})$.
Without the condition $\nabla g(a) \ne 0$ the conclusion can fail. For $g(x, y) = y^2 - x^3$ and $f(x, y) = x$, the minimum on $g = 0$ is at $(0, 0)$, where $\nabla g = 0$ and $\nabla f = (1, 0)$.

## Explanations

### L1 human

Move along the constraint curve and watch the value of $f$.
At the best point, the curve just touches a level curve of $f$, so the two curves have the same normal direction there.
The multiplier $\lambda$ is the ratio between the two normal vectors.
