# Is Fermat's theorem about local extrema true for smooth manifolds?

Let $M$ be a smooth manifold and $f\colon M \rightarrow \mathbb{R}$ a smooth function.

If $p\in M$ is a local extremum of $f$, does $p$ have to be a critical point?

• Local extrema and critical point are both local properties, which means it's enough to look at an $\Bbb R^n$-neighbourhood of $p$. – Arthur Aug 11 '15 at 10:29

Yes. Actually, we necessarily have $df_p=0$. To see this, let $\gamma$ be an arbitrary path passing through $p$ at time $0$. Then $$\left.\frac{d}{dt}\right|_{t=0}(f\circ\gamma)=0,$$and so$$df_p(v)=0,$$where $v$ is the tangent vector represented by $\gamma$.
If $p$ is a local extremum of $f:M \to \mathbb{R}$, choose a coordinate neighborhood $(U, \phi)$ for $p$. Then the map $f |_U \circ \phi^{-1}$ has a local extremum at $\phi(p)$. Computing $df|_p$ in these coordinates shows that it's $0$.