Proof of Lagrange's Mean Value Theorem? The Mean value theorem for Mapping says:

Let $f(x,y)$ be differentiable in $D$.  (D is open and connected).
For every $p=(x_1,y_1), q=(x_2,y_2)$ there exists a point $s \in [p,q]$ such that:
$$f(q)-f(p) = \nabla f(s)*(q-p)= f_x(s)(x_2-x_1)+f_y(s)(y_2-y_1)$$
Note: the interval $[p,q]$ is the following set of points $\{(1-t)p+tq |\ 0 \le t \le 1\}$

How may I prove that theorem? (it goes beyond my current level of studies)
Any help is appreciated :-)
 A: Assuming$[p,q]\subseteq D$ (see @LurchedSawyer 's answer):
Let $g(t)=f((1-t)p+tq)$.
Then $$g'(t)=\nabla f((1-t)p+tq)*(q-p)$$ by the chain rule.  Using the usual 1 dimensional mean value theorem you may find a value $u\in [0,1]$ such that $$g'(u)=g(1)-g(0)=f(q)-f(p)$$
Setting $$s=(1-u)p+uq$$ gives:$$f(q)-f(p)=g'(u)=\nabla f(s)*(q-p)$$
A: Since I was almost finishig the proof I'll post the answer anyways.
I suppose $p, q\in D$. Consider the path $\gamma: [0, 1]\rightarrow \mathbb R^2$ given by
$$\gamma(t):=(1-t)p+tq.$$
Since $D$ is open and connected it is path-connected, hence the image of $\gamma$ falls into $D$. Notice that:
$$\gamma(0)=p\quad \textrm{and}\quad \gamma(1)=q.$$
Consider the composite:
$$f\circ \gamma: [0, 1]\rightarrow \mathbb R.$$
This map is continuous and differentiable. By the Mean value theorem in one variable there exists $c\in (0, 1)$ such that:
$$f(p)-f(q)=f(\gamma(1))-f(\gamma(0))=(f\circ \gamma)^\prime(c)(1-0)=(f\circ \gamma)^\prime(c).$$
But:
$$(f\circ \gamma)^\prime(c)=\nabla f(\gamma(c))\cdot \gamma^\prime(c).$$
Notice
$$\gamma^\prime(t)=-p+q=q-p$$ and therefore:
$$f(p)-f(q)=\nabla f(\gamma(c))\cdot q-p.$$
Now notice that $\gamma(c)\in [p, q]$ as required.
A: Let $F$ be the composite
$$F=f\circ x$$
where $t\longmapsto x(t)$ is the parametrization of the segment $[p,q]$, that is
$$x(t)=(1-t)p+tq$$
which may be expanded as
$$x_1(t)=(1-t)x_1+tx_2$$
$$x_2(t)=(1-t)y_1+ty_2$$
Then $F$ is differentiable at $t$ for all $t$ such that $(1-t)p+tq$ is a point of  $D$ and its first derivative is given by
$$F'(t)=f_x(x(t))(x_2-x_1)+f_y(x(t))(y_2-y_1)$$
By the Taylor expansion of single variable real functions with Lagrange remainder, you get
there exists $\theta\in(0,1)$ such that
$$F(1)=F(0)+F'(\theta)$$
By substituting,
$$f(q)=f(p)+\nabla f(s)(q-p)$$
for $s=x(\theta)$.
A: Are you sure that $D$ is not supposed to be convex as well? Otherwise not every $s \in [p,q]$, as you defined it, is guaranteed to have a $f$-value.
The theorem will still hold true if it's not, but it would require $[p,q] \subset D$ to be a fairly arbitrary curve which is guaranteed to exist due to $D$ being connected.
