TITLE: Why the $\nabla f(x)$ in the direction orthogonal to $f(x)$?
QUESTION [10 upvotes]: Why the $\nabla f$ in the direction orthogonal to $f$?
I can't understand it intuitively.
Is it because of the definition of gradient?

REPLY [5 votes]: The vector field $\operatorname{grad}(f)$ realizes the total derivative of $f$, in the sense that the inner product of $\operatorname{grad}(f)$ and a vector $v$ gives $df(v)$. But if $v$ is parallel to a level curve, then $df(v) = 0$, so it is perpendicular to the gradient.
Let $f:M\to \mathbb{R}$ be a smooth function with $n_0$ a regular value. Equip $M$ with a Riemannian metric. Suppose $f(m) = n_0$ and $v\in T_mM$ is parallel to the level set $f^{-1}(n_0)$. Then the trick is:
$$\langle \operatorname{grad}(f),v\rangle = df(v) = 0$$
because $v$ is annihilated by $df$.
So in a very real sense, this is a defining property of the gradient. We've constructed the gradient so that it is perpendicular to level sets.