---
tag: 0F405477F8
kind: statement
role: theorem
name: Derivative vanishes at a local extremum
aliases: [fermat-theorem-several-variables, interior-extremum-theorem-several-variables]
msc: [26B05]
uses: [04CPG9K1C4, 05AXG3QRKR, 0NS2QYVC4Y, 0135XZZQ8M]
sources:
  - url: https://en.wikipedia.org/wiki/Interior_extremum_theorem
    locator: Extension
---

## Statement

Let $U \subseteq \mathbb{R}^n$ be open, let $f \colon U \to \mathbb{R}$, and let $a \in U$ be a [[local extremum|04CPG9K1C4]] of $f$.
If the [[partial derivative|05AXG3QRKR]] $\partial f / \partial x_i (a)$ exists for some $i$, then $\partial f / \partial x_i (a) = 0$.
In particular, if $f$ is [[differentiable|0135XZZQ8M]] at $a$, then $\nabla f(a) = 0$ and the derivative $Df(a)$ is the zero linear map.

## Remarks

A point $a \in U$ where $f$ is differentiable and $\nabla f(a) = 0$ is a critical point, or stationary point, of $f$.
The proof applies the one-variable theorem to $t \mapsto f(a + t e_i)$, where $e_i$ is the $i$-th standard basis vector. This function has a local extremum at $t = 0$.
The converse is false. For $f(x, y) = x^2 - y^2$, $\nabla f(0, 0) = 0$, but $(0, 0)$ is a [[saddle point|00N3T18QNA]], not an extremum.
The hypothesis that $U$ is open matters. On $[0, 1]^2$, $f(x, y) = x + y$ has a maximum at $(1, 1)$, where $\nabla f = (1, 1)$.

## Explanations

### L1 human

At the top of a smooth hill the ground is flat in every direction.
So all partial derivatives are zero there, and the tangent plane to the graph is horizontal.
This turns the search for extrema into the solution of the equations $\nabla f = 0$.
