TITLE: Functions with zero derivative on manifolds are constant.
QUESTION [5 upvotes]: This seems obvious, but I'm having trouble carrying through the details.
Suppose there is a smooth function $f$ with zero derivative on a manifold $M$ with $n$ connected components. Why is $f$ constant on each connected component?
Detailed answers are very much appreciated. Thanks!

REPLY [12 votes]: Let $M$ be an $m$-manifold. We'll concentrate on a connected component of $M$, say $U$. Pick $p\in U$, let $V_p$ be a neighborhood of $p$ in $U$ admitting a local Euclidean chart, and let $\phi: D\subset\mathbb{R}^m\rightarrow V_p$ be a coordinate chart. If $f: M\rightarrow \mathbb{R}$ is a differentiable function on $M$, this really means that $f\circ \phi: \mathbb{R}^m\rightarrow \mathbb{R}$ is a differentiable function (in fact, this is the definition of a differentiable function on $M$). Now prove that $f\circ \phi$ is constant using standard calculus. So $f$ is constant on $V_p$. From the fact that $U$ is connected, conclude by standard topological arguments that $f$ is constant on $U$.
I would suggest picking up a book on differential geometry and topology.