Fiveable

Calculus IV Unit 6 Review

QR code for Calculus IV practice questions

6.1 Directional derivatives and their properties

6.1 Directional derivatives and their properties

Written by the Fiveable Content Team • Last updated August 2025
Written by the Fiveable Content Team • Last updated August 2025
Calculus IV
Unit & Topic Study Guides

Directional derivatives generalize partial derivatives by measuring how a function changes along any direction, not just along the coordinate axes. They tie together gradient vectors and unit vectors into a single computation, and they're the foundation for identifying directions of steepest ascent and descent in optimization.

Directional Derivatives and Unit Vectors

Calculating Directional Derivatives

The directional derivative of ff at a point x\vec{x} in the direction of a unit vector u\vec{u} is the rate of change of ff as you move away from x\vec{x} along u\vec{u}. It's denoted Duf(x)D_{\vec{u}}f(\vec{x}).

The formula is a dot product:

Duf(x)=f(x)uD_{\vec{u}}f(\vec{x}) = \nabla f(\vec{x}) \cdot \vec{u}

To compute it step by step:

  1. Find all partial derivatives of ff and assemble the gradient f(x)\nabla f(\vec{x}).
  2. Make sure your direction vector is a unit vector (magnitude 1). If it isn't, normalize it first.
  3. Take the dot product of the gradient with the unit vector.

Example. Let f(x,y)=x2+3xyf(x,y) = x^2 + 3xy and suppose you want the directional derivative at (1,2)(1, 2) in the direction of v=3,4\vec{v} = \langle 3, 4 \rangle.

  1. f=2x+3y,  3x\nabla f = \langle 2x + 3y,\; 3x \rangle, so f(1,2)=8,3\nabla f(1,2) = \langle 8, 3 \rangle.
  2. Normalize: v=5|\vec{v}| = 5, so u=3/5,  4/5\vec{u} = \langle 3/5,\; 4/5 \rangle.
  3. Dot product: Duf(1,2)=8(3/5)+3(4/5)=24/5+12/5=36/5D_{\vec{u}}f(1,2) = 8(3/5) + 3(4/5) = 24/5 + 12/5 = 36/5.

The function is increasing at a rate of 36/536/5 per unit length in that direction.

Unit Vectors and Their Properties

A unit vector has magnitude 1 and specifies a pure direction. The standard basis unit vectors are i^\hat{i}, j^\hat{j}, and k^\hat{k}, pointing along the xx-, yy-, and zz-axes respectively.

To convert any nonzero vector v\vec{v} into a unit vector, divide by its magnitude:

u=vv\vec{u} = \frac{\vec{v}}{|\vec{v}|}

The directional derivative formula requires a unit vector. If you plug in a non-unit vector, you'll scale the answer incorrectly. This is a common mistake on exams.

Interpreting Directional Derivatives

The sign of DufD_{\vec{u}}f tells you what the function is doing in that direction:

  • Positive: ff is increasing along u\vec{u}
  • Negative: ff is decreasing along u\vec{u}
  • Zero: ff is momentarily constant along u\vec{u}, meaning u\vec{u} is tangent to a level curve (or level surface)

Geometrically, the directional derivative is the scalar projection of f\nabla f onto u\vec{u}. Since fu=fcosθ\nabla f \cdot \vec{u} = |\nabla f|\cos\theta, where θ\theta is the angle between the gradient and u\vec{u}, the directional derivative depends entirely on that angle.

Calculating Directional Derivatives, Directional Derivatives and the Gradient · Calculus

Partial Derivatives and Linearity

Partial Derivatives and Gradient Vectors

Partial derivatives are the special case of directional derivatives along coordinate axes. For f(x,y)f(x, y):

  • fx\frac{\partial f}{\partial x} is the rate of change holding yy constant (equivalent to Di^fD_{\hat{i}}f)
  • fy\frac{\partial f}{\partial y} is the rate of change holding xx constant (equivalent to Dj^fD_{\hat{j}}f)

The gradient vector packages all partial derivatives together:

f(x,y)=fx,  fy\nabla f(x, y) = \left\langle \frac{\partial f}{\partial x},\; \frac{\partial f}{\partial y} \right\rangle

Two key properties of the gradient:

  • It points in the direction of greatest rate of increase of ff.
  • It is perpendicular to the level curves of ff at every point. This perpendicularity is what makes level curves "flat" relative to the gradient: moving along a level curve gives a directional derivative of zero.

Linearity of Directional Derivatives

Directional derivatives are linear operators. For functions ff and gg and scalars aa and bb:

Du(af+bg)=aDuf+bDugD_{\vec{u}}(af + bg) = a\,D_{\vec{u}}f + b\,D_{\vec{u}}g

This follows directly from the linearity of the gradient (since the gradient of a linear combination is the linear combination of the gradients) and the linearity of the dot product. In practice, this means you can compute directional derivatives of complicated expressions term by term.

Calculating Directional Derivatives, Directional derivative - Wikipedia

Chain Rule for Directional Derivatives

When you have a composition of differentiable functions, the chain rule extends to directional derivatives. If h(x)=f(g(x))h(\vec{x}) = f(g(\vec{x})) where g:RnRmg: \mathbb{R}^n \to \mathbb{R}^m and f:RmRf: \mathbb{R}^m \to \mathbb{R}, then:

Duh(x)=f(g(x))Dg(x)uD_{\vec{u}}h(\vec{x}) = \nabla f\big(g(\vec{x})\big) \cdot Dg(\vec{x})\,\vec{u}

where Dg(x)Dg(\vec{x}) is the Jacobian matrix of gg. For the simpler case where g:RnRg: \mathbb{R}^n \to \mathbb{R} and f:RRf: \mathbb{R} \to \mathbb{R}, this reduces to:

Du(fg)(x)=f(g(x))  Dug(x)D_{\vec{u}}(f \circ g)(\vec{x}) = f'(g(\vec{x}))\;D_{\vec{u}}g(\vec{x})

This is the same "outer derivative times inner derivative" pattern from single-variable calculus, just applied in a directional context.

Steepest Ascent and Descent

Finding the Direction of Steepest Ascent

Since Duf=fcosθD_{\vec{u}}f = |\nabla f|\cos\theta, the directional derivative is maximized when θ=0\theta = 0, i.e., when u\vec{u} points in the same direction as f\nabla f.

  • The direction of steepest ascent is u=ff\vec{u} = \frac{\nabla f}{|\nabla f|}
  • The maximum directional derivative equals f|\nabla f|, the magnitude of the gradient

So the gradient does double duty: its direction tells you where the function increases fastest, and its magnitude tells you how fast.

Finding the Direction of Steepest Descent

By the same cosine argument, the directional derivative is minimized when θ=π\theta = \pi, i.e., when u\vec{u} points opposite to f\nabla f.

  • The direction of steepest descent is u=ff\vec{u} = -\frac{\nabla f}{|\nabla f|}
  • The minimum directional derivative equals f-|\nabla f|

Notice the symmetry: the steepest ascent and steepest descent have the same magnitude but opposite signs.

Applications of Steepest Ascent and Descent

Gradient descent in machine learning works by repeatedly stepping in the direction of f-\nabla f to minimize a cost function. Each iteration updates parameters as xn+1=xnαf(xn)\vec{x}_{n+1} = \vec{x}_n - \alpha\,\nabla f(\vec{x}_n), where α\alpha is the learning rate.

At a critical point, f=0\nabla f = \vec{0}, which means the directional derivative is zero in every direction. These are the candidates for local maxima, minima, and saddle points.

Beyond machine learning, steepest ascent/descent analysis shows up in physics (heat flow follows the negative gradient of temperature), engineering (stress analysis on surfaces), and economics (maximizing utility or profit over multiple variables). The core idea is always the same: the gradient tells you the best direction to move.