Fermat's theorem (stationary points) of higher dimensions

Look at this page and the Proof part,

Fermat's theorem (stationary points) - Wikipedia, the free encyclopedia

How to change the proof 2 into a proof of higher dimensions or can you give a proof of Fermat's theorem of higher dimensions?

To clarify, I need to prove this:

Let and be a continuous function. Prove that if is a local maximum point for , then either is differentiable at with or is not differentiable at .

Re: Fermat's theorem (stationary points) of higher dimensions

Df(x) is, for each x, a vector (or can be represented by such a vector, depending upon exactly how you are defining Df(x)) pointing in the direction of fastest increase. Show that if f is differentiable at a and Df(a) is not 0 then moving a short distance in the direction of Df(a) will give a higher value of f and in the opposite direction will give a lower value. You can use the mean value theorem for that.