Why is this proof incorrect? - $f(b) - f(a) = [Df(c)](b-a) = \nabla f(c) \cdot (b-a)$ I'm currently a student in a Vector Calculus class, and received my exam back today. I plan to go to the professor's office hours, but I'd like to ask here (in case there's some blatantly obvious fault I'm missing). Not only do I not understand why I received no partial credit in this problem, but I don't understand why it's not completely correct. I'd really appreciate any insight. The problem statement is:

Let $a,b \in \mathbb{R^n}$ with $a \neq b$. The segment $(a,b)$ in $\mathbb{R^n}$ is defined by: $$(a,b) := \{x \in \mathbb{R^n} | ~x = (1 - t)a + tb,~ t \in (0,1) \} $$
Let $f: \mathbb{R^n} \rightarrow \mathbb{R}$ be differentiable on $\mathbb{R^n}$. Use the Mean Value Theorem from single-variable calculus to show that there exists $c \in (a,b) \subset \mathbb{R^n}$ such that: $$f(b) - f(a) = [Df(c)](b-a) = \nabla f(c) \cdot (b-a)$$

Here's my proof:
We know $f$ is differentiable on $\mathbb{R^n}$ (including on the interval $(a,b)$). Fix all elements in $x$ but one, call this element $x_i$ (that is, the $i^{th}$ element of $x$. Let $a_i < c_i < b_i$. By the mean value theorem, we know there is at least one $c_i$ such that the tangent at $c_i$ is parallel to the secant between $a_i$ and $b_i$. That is, there exists a $c_i$ such that:
$$\frac{f(b_i) - f(a_i)}{b_i - a_i} = \frac{\partial f(x_i)}{\partial c_i}$$
Multiplying by $(b_i - a_i)$ on both sides, we have:
$$f(b_i) - f(a_i) = \frac{\partial f(x_i)}{\partial c_i}(b_i - a_i)$$
We now fix all other elements in $x$ and, by the same process, arrive at the same result for every component of $x$. This gives us:
$$f(b) - f(a) = \left(\frac{\partial f(x_1)}{\partial c_1} + \frac{\partial f(x_2)}{\partial c_2}  + ... + \frac{\partial f(x_n)}{\partial c_n} \right)(b-a)$$
Note that the term on the right side of the equality is just $\nabla f(c) \cdot (b-a)$, so we know that there exists some $c$ such that: $$f(b) - f(a) = \nabla f(c) \cdot (b-a)$$

I have pretty much zero idea where I went wrong (but it's, apparently, all wrong). I'm very confused.
 A: mmh, if $x_i$ means the $i$-th coordinate of $x$, then you can't calculate $f(x)$ as $\sum_i f(x_i)$. Think about $f(x,y)=xy$. $f(1,1)=1$ but $f(0,1)=f(1,0)=0$. It seems (not so clear) that you are assuming some linear property over $f$.
If this is the case, your reasoning is ruined from the beginning. In fact the right approach to this exercise is to combine the function $f : \mathbb{R}^n \to \mathbb{R}$ with the function $h$ (the segment) $h: (0,1) \to \mathbb{R}^n$ to obtain a function $f(h(t)) :[0,1] \to \mathbb{R}$ for which the mean value theorem holds)
I'll add some hints for a correct resolution First of all, the mean value theorem holds for functions from $U \subseteq \mathbb{R} \to \mathbb{R}$. (it's very easy to see - even graphically - that even in 2 dimensions there are lots of counterexamples). So the first step is building such function. The idea is to observe $f$ in the direction of the segment $g: [0,1] \to \mathbb{R}^n \ g(t) = a+(b-a)t$, in this way, we can "consider" $f$ as a function from $\mathbb{R} \to \mathbb{R}$. The formalization of this reasoning is to make the composition of the two functions mentioned above to obtain $$g:= f(h(t)) : [0,1] \to \mathbb{R} $$. It's easy to see that $g$ is differentiable and you need to apply to it the mean value theorem. So the problem is, how to compute $g'$? Here comes in help the chain rule :)
A: You are writing 
$$
\frac{f(b_i) - f(a_i)}{b_i - a_i} = \dots
$$ 
What is that supposed to mean? $f$ is a function of $n$ variables. You are setting the $i$th variable equal to $a_i$ and to $b_i$. What about all the other variables? What are they equal to in this formula? Are they still variable?   
I'm sorry, I think you're out of luck. No partial credit here.
