How can the gradient be both direction of greatest increase but also perpendicular to the curve? My book says two things that are hard for me to rectify as consistent:

grad f points in the direction of maximum increase of f.

and

grad f is orthogonal to all the vectors r' in the tangent plane, so that it is a normal

The first point about the maximum increase would suggest to me that the gradient is the derivative f and points along the curve sort to speak. Is this not right?
 A: On the off chance that some of the others misinterpreted your confusion (please let me know if I'm the one misinterpreting) let's take the example of a surface $z = f(x,y). $
When you plot the surface, $z$ can be thought of as the "height" of the function as we walk around in some combination of the $x$ and $y$ directions. Notice that the gradient $\nabla f(x,y)$ will be a 2D vector. It will tell us the direction to travel in terms of $x$ and $y$ components so that we increase our "height" the fastest.
Please note that since the gradient vector always lies in a plane parallel to the $x \text{-} y$ plane, the gradient will not be tangent to the surface $z$ and thus (in a 3D sense) doesn't literally point in the direction of greatest increase. In other words it would not point in the direction of someone walking on the surface. If you project the gradient vector at some point $p$ into the tangent plane of the surface at that point $p,$ then you will get a 3D vector that literally points in the direction of someone walking on the surface as to maximize their increase in height.
Also everyone else answering so far is completely correct. This is just a new take on what exactly your getting at with your question.
A: The level curves of a function are, by definition, curves along which the function is constant. So of course going along the curve, i.e. going in the direction tangent to the curve, yields no change in the function's output, not the maximum change!
Consider for instance the function $f(x,y)=\sqrt{x^2+y^2}$. That is, the function is just the distance from the origin. The level curves are circles centered at the origin. At a particular point, the direction to go yielding the maximum change is in a radial direction, directly outwards from the origin! This radial direction is perpendicular to the tangent line at a point on a circle.
