# 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)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:

- Now differentiate both sides of the equation above with respect to $t$. Applying the chain rule and we get that:

- So at $t = 0$ we get that:

- 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)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)So we have verified that the gradient $\nabla f(1, 1)$ is perpendicular to the level curve of $f$ at $(1, 1)$.