Tutorials › Calculus III › Why Gradients Are Normal to Level Sets

Directional Derivatives and Gradients · Tutorial 383 of 999

Why Gradients Are Normal to Level Sets

Use the chain rule along a curve on a level set to prove that its tangent vectors are perpendicular to the gradient wherever the gradient is nonzero.

Intermediate 9 min read

What You'll Learn

  • Define a level set and identify the gradient at a point on it.
  • Apply the chain rule to a differentiable curve contained in a level set.
  • Prove that the gradient has zero dot product with every tangent vector.
  • Check the perpendicularity result on circular, elliptical, and spatial level sets.
  • Recognize why a nonzero gradient is needed to identify a normal direction.

Why level sets have a normal direction

A level set collects points where a scalar-valued function has one fixed value. For example, a contour on a map connects locations with the same elevation, and a circle can be described as the set of points at a fixed distance from its center. Moving along such a set does not change the function value.

The gradient describes how the function changes with position. These two facts fit together: if a small movement stays on a level set, the function does not change in that direction. The chain rule makes this precise and shows that the gradient is perpendicular to the tangent vectors of the level set.

Central result: If a differentiable curve stays on the level set \(F=c\), then at any point where the curve and \(F\) are differentiable, the gradient of \(F\) has dot product zero with the curve’s tangent vector. If the gradient is nonzero, it gives a nonzero normal direction.

Level sets, gradients, and tangent vectors

Let \(F:\mathbb{R}^n\to\mathbb{R}\) be a scalar-valued function, and let \(c\) be a fixed real number. The level set of \(F\) at level \(c\) is the collection of all points \(\mathbf{x}\) satisfying \(F(\mathbf{x})=c\). In two variables, this is usually a curve; in three variables, it is usually a surface.

$$ \{\mathbf{x}\in\mathbb{R}^n:F(\mathbf{x})=c\} $$

When \(F\) is differentiable, its gradient is the vector of its first partial derivatives. In three variables, for example, the gradient has three components:

$$ \nabla F(x,y,z) = \left\langle \frac{\partial F}{\partial x}, \frac{\partial F}{\partial y}, \frac{\partial F}{\partial z} \right\rangle. $$

A differentiable curve \(\boldsymbol{\gamma}(t)\) has tangent vector \(\boldsymbol{\gamma}'(t)\). If the curve is contained in the level set \(F=c\), then \(F(\boldsymbol{\gamma}(t))=c\) for every parameter value in its interval. The tangent vector records the curve’s instantaneous direction of motion.

Two vectors are perpendicular when their dot product is zero. Thus, to establish that the gradient is perpendicular to a tangent vector, it is enough to show that their dot product vanishes.

The chain-rule argument

Suppose \(F\) is differentiable near a point \(\boldsymbol{\gamma}(t_0)\), and \(\boldsymbol{\gamma}\) is a differentiable curve that remains on the level set \(F=c\) near \(t_0\). Since the composition \(F(\boldsymbol{\gamma}(t))\) is constant, its derivative is zero. The multivariable chain rule expresses that derivative as a dot product.

1
Use the level-set condition.
For every parameter value near \(t_0\), the curve satisfies \(F(\boldsymbol{\gamma}(t))=c\).
2
Differentiate the constant.
The derivative of \(F(\boldsymbol{\gamma}(t))=c\) with respect to \(t\) is zero.
3
Apply the chain rule.
The derivative is \(\nabla F(\boldsymbol{\gamma}(t))\cdot\boldsymbol{\gamma}'(t)\).
4
Evaluate at the point of interest.
At \(t=t_0\), the gradient and tangent vector have dot product zero.
$$ F(\boldsymbol{\gamma}(t))=c \quad\Longrightarrow\quad \frac{d}{dt}F(\boldsymbol{\gamma}(t))=0 \quad\Longrightarrow\quad \nabla F(\boldsymbol{\gamma}(t_0))\cdot\boldsymbol{\gamma}'(t_0)=0. $$

This is a complete justification of the perpendicularity claim for every tangent vector represented by a differentiable curve on the level set. The argument applies in two or three dimensions, and in the same way in \(\mathbb{R}^n\).

Theorem: Let \(F:\mathbb{R}^n\to\mathbb{R}\) be differentiable near \(\boldsymbol{\gamma}(t_0)\). If \(\boldsymbol{\gamma}\) is differentiable near \(t_0\) and \(F(\boldsymbol{\gamma}(t))=c\) there, then \(\nabla F(\boldsymbol{\gamma}(t_0))\cdot\boldsymbol{\gamma}'(t_0)=0\). If \(\nabla F(\boldsymbol{\gamma}(t_0))\ne\mathbf{0}\), it is a nonzero vector perpendicular to the tangent vector.

The nonzero condition matters for the geometric description. The dot-product equation remains valid even if the gradient is zero, but the zero vector does not specify a normal direction. When the gradient is nonzero, it can serve as a normal vector at the point. In the plane, if the level set is a smooth curve with a nonzero tangent vector, its tangent direction is perpendicular to the gradient.

Worked Example: A circle as a level curve

Worked Example: A circle as a level curve

Let \(F(x,y)=x^2+y^2\). Consider the level set \(F=9\), which is a circle of radius \(3\). Parametrize it by \(\boldsymbol{\gamma}(t)=(3\cos t,3\sin t)\), and examine the point corresponding to \(t=0\).

First verify that the curve stays on the level set:

$$ F(\boldsymbol{\gamma}(t)) =(3\cos t)^2+(3\sin t)^2 =9\cos^2 t+9\sin^2 t =9. $$

The gradient and the curve’s derivative are

$$ \nabla F(x,y)=\langle 2x,2y\rangle, \qquad \boldsymbol{\gamma}'(t)=\langle -3\sin t,3\cos t\rangle. $$

At \(t=0\), the point and the two vectors are

$$ \boldsymbol{\gamma}(0)=\langle 3,0\rangle, \qquad \nabla F(3,0)=\langle 6,0\rangle, \qquad \boldsymbol{\gamma}'(0)=\langle 0,3\rangle. $$

Their dot product is

$$ \nabla F(3,0)\cdot\boldsymbol{\gamma}'(0) = \langle 6,0\rangle\cdot\langle 0,3\rangle =6(0)+0(3)=0. $$

Thus the gradient is perpendicular to the circle’s tangent vector at \((3,0)\). The chain-rule check gives the same result: \(\frac{d}{dt}F(\boldsymbol{\gamma}(t))=\frac{d}{dt}9=0\), and at \(t=0\) this derivative equals \(\nabla F(3,0)\cdot\boldsymbol{\gamma}'(0)=0\).

Worked Example: An ellipse as a level curve

Worked Example: An ellipse as a level curve

Let \(F(x,y)=4x^2+y^2\), and consider the level set \(F=16\). The parametrized curve \(\boldsymbol{\gamma}(t)=(2\cos t,4\sin t)\) lies on this ellipse. We will check the perpendicularity at \(t=\frac{\pi}{2}\).

Substitution confirms that the curve remains on the stated level:

$$ F(\boldsymbol{\gamma}(t)) =4(2\cos t)^2+(4\sin t)^2 =16\cos^2 t+16\sin^2 t =16. $$

Differentiate the function and the curve:

$$ \nabla F(x,y)=\langle 8x,2y\rangle, \qquad \boldsymbol{\gamma}'(t)=\langle -2\sin t,4\cos t\rangle. $$

Since \(\cos(\frac{\pi}{2})=0\) and \(\sin(\frac{\pi}{2})=1\), the point and vectors are

$$ \boldsymbol{\gamma}\left(\frac{\pi}{2}\right)=\langle 0,4\rangle, \qquad \nabla F(0,4)=\langle 0,8\rangle, \qquad \boldsymbol{\gamma}'\left(\frac{\pi}{2}\right)=\langle -2,0\rangle. $$

The dot product is

$$ \langle 0,8\rangle\cdot\langle -2,0\rangle =0(-2)+8(0)=0. $$

Therefore the gradient is perpendicular to the tangent vector at \((0,4)\). As a final chain-rule check, the derivative of the constant \(F(\boldsymbol{\gamma}(t))=16\) is zero, matching the dot product just computed.

Worked Example: A level surface in three variables

Worked Example: A level surface in three variables

Let \(F(x,y,z)=x^2+y^2-z\), and use the curve \(\boldsymbol{\gamma}(t)=(t,2t,5t^2)\). This curve lies on the level set \(F=0\). We will verify the result at \(t=1\).

Substitute the curve into \(F\):

$$ F(\boldsymbol{\gamma}(t)) =t^2+(2t)^2-5t^2 =t^2+4t^2-5t^2 =0. $$

The gradient and the curve’s derivative are

$$ \nabla F(x,y,z)=\langle 2x,2y,-1\rangle, \qquad \boldsymbol{\gamma}'(t)=\langle 1,2,10t\rangle. $$

At \(t=1\), the point and vectors are

$$ \boldsymbol{\gamma}(1)=\langle 1,2,5\rangle, \qquad \nabla F(1,2,5)=\langle 2,4,-1\rangle, \qquad \boldsymbol{\gamma}'(1)=\langle 1,2,10\rangle. $$

The dot product is

$$ \langle 2,4,-1\rangle\cdot\langle 1,2,10\rangle =2(1)+4(2)+(-1)(10) =2+8-10 =0. $$

The gradient is nonzero, and it is perpendicular to this tangent vector on the level surface. Direct differentiation also checks the result: \(\frac{d}{dt}F(\boldsymbol{\gamma}(t))=\frac{d}{dt}0=0\), equal to the computed dot product at \(t=1\).

What the result does and does not say

The theorem concerns tangent vectors to curves that actually lie on the level set. It does not say that every vector perpendicular to the gradient automatically describes a curve on that level set. The conclusion follows from the chain rule under the stated conditions; a converse requires additional reasoning.

At a point on a level set, there may be many curves passing through the point while remaining in the set. Applying the chain-rule argument to each such curve shows that the gradient is perpendicular to each of their tangent vectors. When the level set is a smooth curve in the plane, this identifies its tangent direction as perpendicular to the nonzero gradient. On a surface, the same argument applies to tangent directions supplied by curves lying on the surface.

The gradient depends on the function used to describe the set. For instance, different functions can have the same level set while having gradients of different magnitudes. The result is about perpendicular direction, not a fixed length: multiplying a nonzero normal vector by a nonzero scalar preserves its perpendicularity.

Common mistake: confusing the gradient with the tangent

A common error is to treat the gradient as a direction along the level curve. Consider the circle \(x^2+y^2=9\) at \((3,0)\). The gradient there is \(\langle 6,0\rangle\), which points radially outward. Calling this vector tangent would give the incorrect dot product

$$ \langle 6,0\rangle\cdot\langle 6,0\rangle =36\ne 0. $$

This calculation does not show that the theorem fails; it shows that the gradient was incorrectly chosen as the tangent vector. The radial direction points away from the circle rather than along it. Using the parametrization \(\boldsymbol{\gamma}(t)=(3\cos t,3\sin t)\), the actual tangent vector at \(t=0\) is \(\boldsymbol{\gamma}'(0)=\langle 0,3\rangle\). Now

$$ \langle 6,0\rangle\cdot\langle 0,3\rangle =6(0)+0(3)=0. $$

The correction is to distinguish the gradient, which is normal to the level set when nonzero, from a tangent vector, which describes motion along the set.

Why the chain-rule view is useful

This result connects an algebraic description of a level set to its geometry. The equation \(F=c\) describes which points belong to the set; differentiating along a curve shows how the function changes during motion on that set. Because the value stays fixed, the rate of change along the tangent must be zero. The chain rule expresses that rate as the gradient’s dot product with the tangent vector.

This reasoning is useful whenever a curve or surface is given implicitly rather than through a direct parametrization. It also provides a practical check: after finding a candidate tangent vector and gradient, their dot product should be zero when the hypotheses apply. A nonzero result signals an arithmetic error, a mistaken tangent vector, or a failure to meet the conditions.

Check Your Understanding

Use the definitions and chain-rule argument above to answer these questions.

  1. What equation defines the level set of \(F\) at value \(c\)?
  2. If a differentiable curve remains on a level set, what is the derivative of \(F(\boldsymbol{\gamma}(t))\)?
  3. What does the chain rule give for that derivative in terms of the gradient and the curve’s tangent vector?
  4. Why is a nonzero gradient needed to identify a normal direction?
  5. For \(F(x,y)=x^2+y^2\) and \(\boldsymbol{\gamma}(t)=(3\cos t,3\sin t)\), compute the gradient and tangent vector at \(t=0\), then check their dot product.