If $Df \equiv 0$, prove that $f$ is constant. Let $V$ and $W$ be finite-dimensional vector spaces, $U$ a connected open set in
$V$ , and $f : U \rightarrow W$ a differentiable function. If $Df \equiv 0$, prove that $f$ is constant.
If $a\not=b$, the line passing through $a$ and $b$ must contain a point $c$ where the derivative of the restriction $g$ of $f$ to that line parametrised by length along that line is $g'(c)=\frac{g(a)-g(c)}{a-b}$. If $D(f)=0$ everywhere, then $\displaystyle g'(c)$ is always $0$. 
For any point $c$ in an open set, points $a$ and $b$ can be chosen in an arbitrarily small neighbourhood of  $c$ with the line between then passing through $c$, and since differentiable functions must be continuous, $g(a)=g(b)$ and hence $f(a)=f(b)$ everywhere in $V$. qed
I am trying to make sense of this proof, but I don't understand this line: derivative of the restriction $g$ of $f$ to that line parametrised by length along that line is $g'(c)=\frac{g(a)-g(c)}{a-b}$. 
I understand that $g'(c)=\frac{g(a)-g(c)}{a-b}$ is from the MVT, but is $g$ of $f$ meaning the composition $g\circ f$? and what is meant by the restriction, also parametrized by length?
 A: Here is another approach based on the same idea:
Pick $u_0 \in U$ and let $A = \{ u \in U | f(u) = f(u_0) \}$. Since $f$ is continuous,
$A$ is closed.
If $u \in A$, then $B(u,\epsilon) \subset A$ for some $\epsilon>0$ since $U$
is open. Choose $u' \in B(u,\epsilon)$ and let $p(t) = u+t(u'-u)$. 
Now suppose $f(u) \neq f(u')$, then we can find a linear $g$ such that
$g(f(u)) \neq g(f(u'))$, then the function $\phi = g \circ f \circ p$
is a map $[0,1] \to \mathbb{R}$ and we can use the usual mean value
theorem.
We have $D \phi(t) = g(Df(p(t)) (u'-u)) = g(0) = 0$, from which we get
$g(f(u)) = g(f(u'))$,
which is a contradiction. Hence $f(u) = f(u')$, and so we see that
$A$ is open.
Since $U$ is connected, it follows that $A=U$.
A: Let a, b in $U \in R^n$, the line segment between a and b is a + t(b - a)/||b-a||, where $0\le t \le 1$.
Consider function $g(t) = f( a+ t (b -a)/||b-a||)$, we have g(0) = f(a), g(1) = f(b). There exists $t^*$, such that 
$$\frac{g(1)-g(0)}{1 -0} = g'(t^*) = Df(a + t^*(b-a)/||b-a||)\dot (b - a)/||b-a|| = 0$$
Hence g(1) = g(0). 
If you look at g(t), we used the line segement fron a to b, and a and b must be in the same open ball in U. 
The final conclusion is from the compactness of path in U. For any two point x, y in U, you can have path from x and y. The path is compact.  And you can have a finte number of small open ball to cover the path, so it is the constant along the path.
