Directional Derivatives and the Gradient: Fresh Take

  • Calculate directional derivatives in two dimensions
  • Find and interpret the gradient vector
  • Use the gradient to find the tangent to a level curve of a given function
  • Calculate directional derivatives in three dimensions

Directional Derivatives

The Main Idea 

Partial derivatives tell you the slope of a surface in directions parallel to the coordinate axes. But what if you want to know how steeply the surface is climbing or descending in some other direction—say, northeast or at a 37° angle? That’s what directional derivatives measure.

A directional derivative [latex]D_{\bf{u}}f(a,b)[/latex] gives the instantaneous rate of change of [latex]f[/latex] at point [latex](a,b)[/latex] in the direction of a unit vector [latex]\bf{u}[/latex]. It’s the slope of the tangent line to the surface in that specific direction.

The Practical Formula

For a direction given by angle [latex]\theta[/latex] (measured counterclockwise from the positive [latex]x[/latex]-axis), the directional derivative is:

[latex]D_{\bf{u}}f(x,y) = f_x(x,y)\cos\theta + f_y(x,y)\sin\theta[/latex]

where [latex]{\bf{u}} = \cos\theta{\bf{i}} + \sin\theta{\bf{j}}[/latex] is your unit direction vector.

Problem-Solving Strategy

  1. Find the partial derivatives [latex]f_x[/latex] and [latex]f_y[/latex]
  2. Evaluate them at your point of interest
  3. Identify your direction: If given an angle [latex]\theta[/latex], use [latex]\cos\theta[/latex] and [latex]\sin\theta[/latex] directly
  4. Calculate [latex]D_{\bf{u}}f = f_x\cos\theta + f_y\sin\theta[/latex]

Critical Tip: Non-Unit Vectors

The direction vector must be a unit vector (magnitude 1). If you’re given a direction like [latex]\langle 3, 4 \rangle[/latex], first find its magnitude: [latex]\sqrt{3^2 + 4^2} = 5[/latex]. Then normalize it: [latex]{\bf{u}} = \langle 3/5, 4/5 \rangle[/latex]. Now you can use this unit vector in your directional derivative formula.

Key Insight

Notice that [latex]f_x[/latex] and [latex]f_y[/latex] are actually special cases of directional derivatives—they’re the rates of change in the [latex]x[/latex]-direction ([latex]\theta = 0[/latex]) and [latex]y[/latex]-direction ([latex]\theta = 90°[/latex]).

Find the directional derivative [latex]D_{\bf{u}}f(x,y)[/latex] of [latex]f(x,y)=3x^2y-4xy^3+3y^2-4x[/latex] in the direction of [latex]{\bf{u}}=(\cos\frac{\pi}3){\bf{i}}+(\sin\frac{\pi}3)\bf{j}[/latex] using the Directional Derivative of a Function of Two Variables. What is [latex]D_{\bf{u}}f(3,4)[/latex]?

Watch the following video to see the worked solution to the above example.

Gradient

The Main Idea 

The gradient packages both partial derivatives into a single vector that tells you everything about how a function is changing at a point. It’s one of the most powerful tools in multivariable calculus.

For [latex]z = f(x, y)[/latex], the gradient at any point is:

[latex]\nabla f(x, y) = f_x(x, y){\bf{i}} + f_y(x, y){\bf{j}}[/latex]

The symbol [latex]\nabla[/latex] is called “nabla” or “del,” and you read this as “gradient of [latex]f[/latex]” or “del [latex]f[/latex].”

The gradient vector points in the direction of steepest ascent on the surface. Its magnitude [latex]|\nabla f|[/latex] tells you how steep that climb is. If you’re on a hillside, the gradient points straight uphill, and its length measures the steepness.

Key Properties

  • Maximum increase: The directional derivative is largest when you move in the direction of [latex]\nabla f[/latex], and that maximum value is [latex]|\nabla f|[/latex]
  • Maximum decrease: The directional derivative is most negative when you move opposite to [latex]\nabla f[/latex], with minimum value [latex]-|\nabla f|[/latex]
  • No change: If [latex]\nabla f = {\bf{0}}[/latex] at a point, the function isn’t changing in any direction there

Connection to Directional Derivatives

The directional derivative in direction [latex]\bf{u}[/latex] is simply: [latex]D_{\bf{u}}f = \nabla f \cdot {\bf{u}}[/latex]

This dot product formula makes calculations much easier than using the limit definition.

Problem-Solving Strategy

  1. Calculate both partial derivatives [latex]f_x[/latex] and [latex]f_y[/latex]
  2. Form the gradient vector [latex]\nabla f = f_x{\bf{i}} + f_y{\bf{j}}[/latex]
  3. Evaluate at your point of interest
  4. Interpret: The direction of this vector is steepest ascent; its magnitude is the rate of climb
Find the gradient [latex]\nabla{f}(x,y)[/latex] of [latex]f(x,y)=(x^2-3y^2)/(2x+y)[/latex].

Find the direction for which the directional derivative of [latex]g(x, y)=4x-xy+2y^{2}[/latex] at [latex](-2, 3)[/latex] is a maximum. What is the maximum value?

Watch the following video to see the worked solution to the above example.

Gradients and Level Curves

The Main Idea 

The gradient has a remarkable geometric property: at any point on a level curve, the gradient vector points perpendicular to that curve. This connection gives you a powerful way to understand both the gradient and level curves simultaneously.

For a function [latex]f(x, y)[/latex], level curves are defined by [latex]f(x, y) = k[/latex] for various constants [latex]k[/latex]. At any point [latex](x_0, y_0)[/latex] on a level curve, the gradient [latex]\nabla f(x_0, y_0)[/latex] is perpendicular (normal) to the level curve at that point.

Why This Matters

Since the gradient points in the direction of steepest ascent, and it’s perpendicular to level curves, this tells you that level curves represent paths of no change—moving along a level curve doesn’t change the function value. The steepest climb is always perpendicular to these “flat” paths.

Practical Uses

This perpendicularity makes finding tangent and normal vectors to level curves straightforward:

  • Normal vector to the curve: Just compute [latex]\nabla f[/latex] at your point
  • Tangent vector to the curve: Swap the components of [latex]\nabla f[/latex] and negate one of them

Problem-Solving Strategy

  1. Calculate the gradient [latex]\nabla f = f_x{\bf{i}} + f_y{\bf{j}}[/latex]
  2. Evaluate at your point to get the normal vector to the level curve
  3. For a tangent vector: swap components and negate one (e.g., if gradient is [latex]\langle a, b \rangle[/latex], use [latex]\langle -b, a \rangle[/latex] or [latex]\langle b, -a \rangle[/latex])

Visual Insight

On a contour map, the gradient arrows always point perpendicular to the contour lines, toward higher values. Where contour lines bunch together, gradients are longer, indicating steeper terrain.

For the function [latex]f(x,y)=x^2-2xy+5y^2+3x-2y+4[/latex], find the tangent to the level curve at point [latex](1, 1)[/latex]. Draw the graph of the level curve corresponding to [latex]f(x, y)=8[/latex] and draw [latex]\nabla{f}(1,1)[/latex] and a tangent vector.

Three-Dimensional Gradients and Directional Derivatives

The Main Idea 

Everything you learned about gradients and directional derivatives in two dimensions extends naturally to three dimensions. The main difference is that you’re now working with three partial derivatives instead of two, and direction vectors have three components instead of two.

The Three-Dimensional Gradient

For a function [latex]w = f(x, y, z)[/latex], the gradient is:

[latex]\nabla f(x, y, z) = f_x(x, y, z){\bf{i}} + f_y(x, y, z){\bf{j}} + f_z(x, y, z){\bf{k}}[/latex]

Just calculate all three partial derivatives and assemble them into a vector.

Directional Derivatives in 3D

The directional derivative formula works the same way as in two dimensions:

[latex]D_{\bf{u}}f(x, y, z) = \nabla f(x, y, z) \cdot {\bf{u}}[/latex]

where [latex]{\bf{u}}[/latex] must be a unit vector.

Problem-Solving Strategy

  1. Find all three partial derivatives [latex]f_x[/latex], [latex]f_y[/latex], and [latex]f_z[/latex]
  2. Form the gradient [latex]\nabla f = f_x{\bf{i}} + f_y{\bf{j}} + f_z{\bf{k}}[/latex]
  3. Normalize your direction vector: If given [latex]{\bf{v}}[/latex], compute [latex]{\bf{u}} = \frac{{\bf{v}}}{|{\bf{v}}|}[/latex]
  4. Calculate the dot product [latex]\nabla f \cdot {\bf{u}}[/latex]
  5. Evaluate at your point by substituting coordinates

Critical Reminder

Always normalize your direction vector first. A common mistake is forgetting to divide by the magnitude. For example, if [latex]{\bf{v}} = -{\bf{i}} + 2{\bf{j}} + 2{\bf{k}}[/latex], its magnitude is [latex]\sqrt{1 + 4 + 4} = 3[/latex], so [latex]{\bf{u}} = -\frac{1}{3}{\bf{i}} + \frac{2}{3}{\bf{j}} + \frac{2}{3}{\bf{k}}[/latex].

Key Properties

The same properties from two dimensions still hold: the gradient points toward the steepest increase, its magnitude gives the maximum rate of change, and moving perpendicular to the gradient means no change in function value.

Find the gradient [latex]\nabla{f}(x,y,z)[/latex] of [latex]f(x,y,z)=\frac{x^2-3y^2+z^2}{2x+y-4z}[/latex].

Watch the following video to see the worked solution to the above example.

Calculate [latex]D_{\bf{u}}f(x,y,z)[/latex] and [latex]D_{\bf{u}}f(0,-2,5)[/latex] in the direction of [latex]{\bf{v}}=-3{\bf{i}}+12{\bf{j}}-4{\bf{k}}[/latex] for the function [latex]f(x,y,z)=3x^2+xy-2y^2+4yz-z^2+2xz[/latex].

Watch the following video to see the worked solution to the above example.