Unit 3: Directional Derivative

The Concept

Directional derivatives look to extend the concept of partial derivatives by finding the tangent line parallel to neither the [latex]x[/latex]-axis or [latex]y[/latex]-axis.

We start with the graph of a surface defined by the equation [latex]z = f(x,y)[/latex]. Given a point [latex](x_0, y_0)[/latex] in the domain of [latex]f(x,y)[/latex], we choose a direction defined by a unit vector [latex]\vec{u}=\langle a,\,b\rangle[/latex], where [latex]a^2+b^2=1[/latex], to travel from that point. This direction vector can also be written as [latex]\vec{u}= \langle \cos\theta,\,\sin\theta \rangle[/latex].  Angle [latex]\theta[/latex] is measured counterclockwise on the [latex]xy[/latex]-plane, starting at zero from the positive [latex]x[/latex]-axis. The derivative along that direction (that is, the directional derivative) represents the traveling speed and it is defined as the dot product between the gradient vector, [latex]∇f = \langle f_x, f_y \rangle[/latex], and direction vector, [latex]\vec{u}[/latex], i.e.,

[latex]D_u f(x_0,y_0) = ∇f \cdot \vec{u}=f_x(x_0, y_0) \, a+ f_y(x_0, y_0) \,b[/latex],

where [latex]a=\cos\theta[/latex] and [latex]b=\sin \theta[/latex].

Consider two special cases of directional derivatives:

  1. When [latex]\theta = 0[/latex], we travel in the direction that is parallel to positive [latex]x[/latex]-axis, so the direction [latex]\vec{u} = \langle \cos0, \, \sin0\rangle = \langle 1,\,0\rangle[/latex] and the corresponding directional derivative is [latex]D_u f(x,y) = f_x(x_0,y_0)\,1+ f_y(x_0,y_0)\,0= f_x(x_0,y_0)[/latex].
  2. When [latex]\theta = \frac{\pi}{2}[/latex], we travel in the direction that is parallel to positive [latex]y[/latex]-axis, so the direction [latex]\vec{u} = \langle \cos \frac{\pi}{2} , \, \sin \frac{\pi}{2} \rangle = \langle 0,\, 1 \rangle[/latex] and the directional derivative is [latex]D_u f(x_0,y_0) = f_x(x_0,y_0)\,0+ f_y(x_0,y_0)\,1= f_y(x_0,y_0)[/latex].

The concept of directional derivatives can be extended into high dimensions. For example, we consider the 3D gradient vector, [latex]∇f= \langle f_x, f_y, f_z \rangle[/latex] and 3D direction vector, [latex]\vec{u}=\langle a,\,b\, c \rangle[/latex], where [latex]a^2+b^2+c^2=1[/latex] because [latex]\vec{u}[/latex] is a unit vector. Thus the directional derivative of [latex]w = f(x,y,z)[/latex] at point [latex](x_0, y_0, z_0)[/latex] is

[latex]D_u f(x_0,y_0, z_0) = ∇f \cdot \vec{u}=f_x(x_0, y_0, z_0)\, a + f_y(x_0, y_0, z_0) \,b + f_y(x_0, y_0, z_0) \,c[/latex].

The Plot

Now, you should engage with the 3D plot below to understand directional derivatives[1]. Follow the steps below to apply changes to the plot and observe the effects:

  1. There are two separate plots where the direction vector (i.e., the direction of the derivative, denoted by [latex]\vec{u}[/latex]) is defined by either an angle in radians or a vector.
  2. Point (P) is adjusted with the [latex]x[/latex] and [latex]y[/latex] sliders.
  3. [latex]\vec{u}[/latex] is selected by either the angle or vector and is indicated by the red arrow on the graph.

Directional Derivative (Defined by an angle)

Direction Derivative (Defined by a vector)

Self-Checking Questions

Check your understanding by solving the following questions[2]:

  1. Find the gradient, [latex]∇f(x,y)[/latex], of the function: [latex]f(x,y) = x^2 - xy + 3y^2[/latex]
  2. Find the directional derivative, [latex]D_u f[/latex], of the function: [latex]f(x,y,z) = e^{-2z} sin(2x)cos(2y)[/latex] at point (0,1).

  1. Made with GeoGebra, licensed Creative Commons CC BY-NC-SA 4.0.
  2. Gilbert Strang, Edwin “Jed” Herman,  OpenStax, Calculus Volume 3,  Calculus Volumes 1, 2, and 3 are licensed under an Attribution-NonCommercial-Sharealike 4.0 International License (CC BY-NC-SA).


Icon for the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

3D Interactive Plots for Multivariate Calculus Copyright © 2022 by Dr. Na Yu, Ryerson University is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, except where otherwise noted.

Share This Book