# What is the purpose of the unit vector in directional derivative?

So the equation for the directional derivative is the dot product of a vector and a gradient function. What I don't understand is why do we need the vector in the equation? Doesn't the gradient of the function which is a vector of partial derivatives give us the slope and direction already?

• The directional derivative tells you the rate the function is changing if you move along a given path in the domain. The vector tells you what direction the path is going. Each different path/direction could give you a different rate of change. – Nick May 31 '18 at 20:51

Let $f$ be your function, let $p$ be a point of the domain and let $u$ be a unit vector. Then:
• $\nabla f(p)$ is the direction in which $f$ grows faster;
• $\bigl(\nabla f(p)\bigr).u$ is how fast it growths in the direction provided by $u$.