A good example might be a hemisphere. (Edit: You can write ## x^2+y^2+z^2=R^2##, so that ## z=\sqrt{R^2-(x^2+y^2)} ##). In this case the function is the height ## z=f(x,y) ##, and you take a two dimensional gradient: ## \nabla f(x,y)=(\frac{\partial{f(x,y)}}{\partial{x}}) \hat{i}+(\frac{\partial{f(x,y)}}{\partial{y}}) \hat{j} ##. ## \\ ## In general, ## df=\nabla f \cdot d \vec{s}##. ## \\ ## For this 2-D case ## dz=df= \nabla f \cdot (\hat{i} dx+\hat{j} dy) ##. The change ## dz ## is maximized for a given change ## |d \vec{s} | ## when ## d \vec{s} =\hat{i} dx+\hat{j} dy ## points along ## \nabla f ##, (gradient here in two dimensions), so that the dot product ## \cos(\theta) ## factor is 1. ## \\ ## And you do have it right=at the top of the hill, the two dimensional gradient is zero. Anywhere else on the hemisphere, you will find ## \nabla f ## points radially inward for the direction of steepest ascent. And if you travel at right angles to this direction, (on the hemisphere staying at the same height}, you will find ## \frac{dz}{|ds|}=0 ##, just as it should, since the dot product ## \cos(\theta) ## factor gives zero for ## \theta =\pi/2 ##. ## \\ ## The same kind of calculation applies to a function ## w=f(x,y,z) ## in taking a 3 dimensional gradient. ## \\ ## Editing: And for the above example, you could even make your direction of travel be in 3 dimensions, so that the differential distance traveled is ## d \vec{s}'=\hat{i} dx+\hat{j} dy+\hat{k} dz ##, but that adds some additional complexity. It's easier to just consider the x and y motion for the direction of travel from a mathematical viewpoint.