Can someone help me understand the difference between gradient vector and directional derivative

multivariable-calculus

Okay so here's what I understand:

If we have a surface, then the directional derivate in the direction of a unit vector $\vec{u}$ at a point $P_{0}$ is the slope of the curve on the surface going through $P_{0}$ in the direction of $\vec{u}$

And $D_{\vec{u}} = f_{x}(x,y)a + f_{y}(x,y)b$ where $\vec{u} = \langle a, b \rangle$

and $\nabla f(x,y) = \langle f_{x}(x,y), f_{y}(x,y) \rangle $

So $D_{\vec{u}} = \nabla f(x,y) \cdot u$

But then $\nabla f(x,y)$ is in the direction of maximum ascent? how does that come to be? what is happening here?

Best Answer

The gradient is the direction of maximum ascent, as you pointed out, in the underlying domain of the function. The directional derivative, on the other hand, is the rate of change in the function, in the direction of the given vector (again, in the underlying domain).

For example, imagine you have a function representing the height of a hill over some coordinate grid (e.g., easting and northing):

$$ f(x, y) = x+y $$

This hill slopes up to the northeast. Its gradient is given by

$$ \nabla f(x, y) = \left[ \begin{array}{c} 1 \\ 1 \end{array} \right] $$

confirming that the hill slopes up to the northeast. On the other hand, if you wanted to know the extent to which the hill slopes up or down in an easterly direction, you want the directional derivative

$$ \left[ \begin{array}{c} 1 \\ 0 \end{array} \right] \cdot \nabla f(x, y) = \left[ \begin{array}{cc} 1 & 0 \end{array} \right] \left[ \begin{array}{c} 1 \\ 1 \end{array} \right] = 1 $$

telling you that the slope is $1$ if you head due east. But you could also compute the directional derivative in other directions; for instance, you could compute it to the southeast (where the directional derivative would be $0$). Note that all these directions—east, northeast, southeast—are directions in the underlying coordinate grid, not in three dimensional space.

Does that help?