The Perpendicularity of The Gradient at a Point on a Level Curve

The Perpendicularity of The Gradient at a Point on a Level Curve

Recall from The Gradient of Functions of Several Variables page that if $z = f(x, y)$ is a two variable real-valued function whose first partial derivatives exist, then the gradient of $f$ is:

(1)
\begin{align} \quad \nabla f(x, y) = \frac{\partial f}{\partial x} \vec{i} + \frac{\partial f}{\partial y} \end{align}

We are now going to look at a very important theorem that says if $f$ is differentiable at some point $(a, b)$ on its surface, then the gradient vector at $(a, b)$ (provided $\nabla f(a, b) \neq (0, 0)$ will be perpendicular to the tangent line at $(a, b)$ of the level curve that passes through this point.

 Theorem 1: Let $z = f(x, y)$ be a real-valued function that is differentiable at the point $(a, b)$ and suppose that $\nabla f(a, b) \neq (0, 0)$. Then $\nabla f(a, b)$ will be perpendicular to the level curve of $f$ that passes through the point $(a, b)$.
• Proof: Let $z = f(x, y)$. Consider the parameterization of $f$ as $x = x(t)$ and $y = y(t)$ such that $x(0) = a$ and $y(0) = b$. Then for $t$ near $0$ we have that:
(2)
\begin{align} \quad f(x(t), y(t)) = f(a, b) \end{align}
• Now differentiate both sides of the equation above with respect to $t$. Applying the chain rule and we get that:
(3)
\begin{align} \quad \frac{d}{dt} \left ( f(x(t), y(t)) \right ) = \frac{d}{dt} \left ( f(a, b) \right ) \\ \quad x'(t) f_x (x(t), y(t)) + y'(t) f_y (x(t), y(t)) = 0 \\ \quad \left ( x'(t), y'(t) \right) \cdot \left (\frac{\partial}{\partial x} f(x(t), y(t)), \frac{\partial}{\partial y} f(x(t), y(t)) \right ) = 0 \\ \quad \vec{r'}(t) \cdot \nabla f(x(t), y(t))= 0 \end{align}
• So at $t = 0$ we get that:
(4)
\begin{align} \quad \vec{r'}(0) \cdot \nabla f(x(0), y(0)) = 0 \\ \quad \vec{r'}(0) \cdot \nabla f(a, b) = 0 \end{align}
• Therefore the gradient vector at $(a, b)$ is perpendicular to the tangent vector at to this level curve, and so the gradient vector is perpendicular to the level curve $f$ that passes through $(a, b)$. $\blacksquare$

Theorem 1 can be extended to a real-valued function of three variables as well:

 Theorem 2: Let $w=f(x,y,z)$ be a real-valued function that is differentiable at the point $(a, b, c)$ and suppose that $\nabla f(a,b, c) \neq (0,0, 0)$. Then $\nabla f(a,b, c)$ will be perpendicular to the level surface of $f$ that passes through the point $(a ,b, c)$.

Let's look at a concrete example to verify Theorem 1.

Example 1

Let $f(x, y) = x + 2y + 3$. Find $\nabla f(1, 1)$ and show that this vector is perpendicular to the level curve of $f$ that passes through $(1, 1)$ at $(1, 1)$.

The gradient of $f$ is easy to compute in this example since $\frac{\partial f}{\partial x} = 1$ and $\frac{\partial f}{\partial y} = 2$. Therefore $\nabla f(x, y) = (1, 2)$ and $\nabla (1, 1) = (1, 2)$.

Now let's look at the level curve of $f$ that passes through $(1, 1)$. We see that $f(1, 1) = 6$, so the level curve of interest is $f(x, y) = 6$, that is:

(5)
$$6 = x + 2y + 3$$

Simplifying the equation above and we get that $y = -\frac{1}{2} x + \frac{3}{2}$ is our level curve. This line has slope $\frac{-1}{2}$ and so it is parallel to the vector $(2, -1)$ at all points on the line, and in particular, at the point of interest $(1, 1)$. Applying the dot product between this vector $(2, -1)$ and $\nabla (1, 1) = (1, 2)$ and we see that:

(6)
\begin{align} (2, -1) \cdot (1, 2) = 2 - 2 = 0 \end{align}

So we have verified that the gradient $\nabla f(1, 1)$ is perpendicular to the level curve of $f$ at $(1, 1)$.