Math Help - Derivative 0 => constant function

1. Derivative 0 => constant function

Suppose that M, N are smooth manifolds and that M is connected. Let $f: M \rightarrow N$ be differentiable so that $d_x f = 0$ for all $x \in M$.

Show that f must be constant.

Anyone got any hint? Why do we need M to be connected?

2. If we don't require M to be connected, then we can let $M=[0,1] \cup [2,3] ~, ~ N = [0,1]$ and $f(x) = \left\{
\begin{array}{lr}
1 & x \in [0,1]\\
0 & x \in [2,3]
\end{array}
\right.$

3. Ok, I see. Now how to start proving this?

4. Use proof by contradiction. Suppose that $f(x)\ne f(y)$ and show that this leads to a non-zero derivative.