Let $f: \mathbb{R}^n \rightarrow \mathbb{R}$ be a function. A level set is a set of points:
$$L(c) = \{x \in \mathbb{R}^n | f(x) = c\}$$
Two vectors $a, b \in \mathbb{R}^n$ are perpendicular, when their dot product is 0: $$a \perp b :\Leftrightarrow a \cdot b = \sum_{i=1}^n a_i b_i = 0$$
The gradient of $f$ is
$$\nabla f = \begin{pmatrix}\frac{\partial f}{\partial x_1}\\ \frac{\partial f}{\partial x_2}\\ \dots\\ \frac{\partial f}{\partial x_n}\\\end{pmatrix}$$
Question
- Why is $\nabla f(p)$ at any given point $p \in \mathbb{R}^n$ perpendicular to the level set $L(f(p))$?
- What does it mean anyway to be perpendicular to the level set? Does it mean the tangent of the level set in this point is perpendicular to the gradient in this point?
- How do I get the tangent?
- Are there any important implications of this?
- What does it mean anyway to be perpendicular to the level set? Does it mean the tangent of the level set in this point is perpendicular to the gradient in this point?
Context
I found the question "why is the level curve perpendicular to the gradient" in an exam protocol for probabilistic planning.