\[\nabla f\]
in the direction of a vector \[\mathbf{v}\]
is \[\nabla f \cdot \frac{\mathbf{v}}{|\mathbf{v}|} =|{\nabla f}| \cos \theta\]
where \[\theta\]
is the angle between \[\nabla f\]
and \[\mathbf{v}\]
. Note \[\frac{\mathbf{v}}{|\mathbf{v}|}\]
is a unit vector.This is exactly the directional derivative of
\[f\]
in the direction of \[\mathbf{f}\]