Skip to main content

Section 7.1 The Definition of the Directional Derivative

Definition 7.1 Directional Derivative.

The derivative of \(f\) at \(P_0(x_0,y_0)\) in the direction of the unit vector \(\mathbf u = u_1\mathbf i + u_2\mathbf j\) is the number
\begin{equation} \left(\frac{df}{ds}\right)_{\mathbf u,\,P_0} = \lim_{s\to 0}\frac{f(x_0 + su_1,\; y_0 + su_2) - f(x_0,y_0)}{s},\tag{7.1} \end{equation}
provided the limit exists. It can alternatively be denoted by \(\left(D_{\mathbf u} f\right)_{P_0}\text{.}\)
The geometry behind this definition is best seen in a picture. Starting at the point \(P_0(x_0,y_0)\text{,}\) we move a distance \(s\) in the direction of the unit vector \(\mathbf u\) to reach the point \(P(x_0 + su_1,\, y_0 + su_2)\text{,}\) and we compare the values of the surface \(z = f(x,y)\) above the two points. As \(s \to 0\text{,}\) the point \(P\) slides back along \(\mathbf u\) toward \(P_0\text{.}\) The four figures that follow show this from complementary angles: Figureย 7.2 lets you explore the construction in space, Figureย 7.3 records the displacement in the \(xy\)-plane, Figureย 7.4 animates the secant line rotating onto the tangent line, and Figureย 7.5 reports the difference quotient itself as \(s\) shrinks, so that the limit can be watched rather than only read.

Instructions.

The translucent blue surface is the graph of \(z = f(x,y)\text{.}\) In the \(xy\)-plane below it, the point \(P_0(x_0,y_0)\) is fixed, the short blue arrow is the unit vector \(\mathbf u\text{,}\) and the gold arrow is the displacement \(s\mathbf u\text{,}\) which ends at the point \(P(x_0+su_1,\, y_0+su_2)\text{.}\) The dashed vertical lines rise from \(P_0\) and \(P\) to the surface, where the values \(f(P_0)\) and \(f(P)\) are marked. Drag the slider to change the distance \(s\text{,}\) or press โ€œs \(\to\) 0โ€ to animate the limit in the definition of the directional derivative: as \(s \to 0\text{,}\) the point \(P\) slides back toward \(P_0\) and the difference quotient \(\big(f(P) - f(P_0)\big)/s\text{,}\) displayed above the figure, approaches \(\left(D_{\mathbf u} f\right)_{P_0}\text{.}\) Drag the figure to view it from a different angle, or press โ€œRotateโ€ to spin it.
Figure 7.2. Interactive view of the definition of the directional derivative. The point \(P\) moves the distance \(s\) from \(P_0\) along \(\mathbf u\text{,}\) and the secant slope approaches \(\left(D_{\mathbf u} f\right)_{P_0}\) as \(s \to 0\text{.}\)
Diagram Exploration Keyboard Controls
Key Action
Enter, A Activate keyboard driven exploration
B Activate menu driven exploration
Escape Leave exploration mode
Cursor down Explore next lower level
Cursor up Explore next upper level
Cursor right Explore next element on level
Cursor left Explore previous element on level
X Toggle expert mode
W Extra details if available
Space Repeat speech
M Activate step magnification
Comma Activate direct magnification
N Deactivate magnification
Z Toggle subtitles
C Cycle contrast settings
T Monochrome colours
L Toggle language (if available)
K Kill current sound
Y Stop sound output
O Start and stop sonification
P Repeat sonification output
Figure 7.3. The two points \(P_0\) and \(P\) used in the definition of the directional derivative. As \(s \to 0\text{,}\) the point \(P\) slides along the direction \(\mathbf u\) back toward \(P_0\text{.}\)
Figure 7.4. Animation of the definition of the directional derivative. The vertical plane through \(P_0\) in the direction \(\mathbf u\) cuts the surface \(z = f(x,y)\) in a curve, and the point \(P = P_0 + s\mathbf u\) moves on this plane. The secant line through \((P_0, f(P_0))\) and \((P, f(P))\) has slope \(\big(f(P) - f(P_0)\big)/s\text{,}\) and as \(s \to 0\) it rotates onto the tangent line, whose slope is the directional derivative \(\left(D_{\mathbf u} f\right)_{P_0}\text{.}\)

Instructions.

Drag the slider for the angle to choose the unit vector \(\mathbf u\text{,}\) and drag the slider for \(s\) to move the point \(P\) along the direction \(\mathbf u\) starting at \(P_0(1,1)\text{,}\) for the function \(f(x,y) = 1 + x^2 + y^2\text{.}\) The readout compares the difference quotient \(\big(f(P) - f(P_0)\big)/s\) with its limit as \(s \to 0\text{,}\) which is the directional derivative \(\left(D_{\mathbf u} f\right)_{P_0}\text{.}\)
Figure 7.5. The difference quotient \(\big(f(P)-f(P_0)\big)/s\) for \(f(x,y)=1+x^2+y^2\) at \(P_0(1,1)\text{,}\) as functions of the direction angle and the step \(s\text{.}\)
Before developing any shortcuts, we evaluate a directional derivative straight from Definitionย 7.1. Working through the limit once makes the definition concrete, and it gives us a value to check against later: Exampleย 7.15 recovers the same number in a couple of lines, once the gradient is available.

Example 7.6 Example I.

Consider the function \(f(x,y) = 1 + x^2 + y^2\text{,}\) the point \(P_0(1,1)\text{,}\) and the unit vector \(\mathbf u = \dfrac{1}{\sqrt 2}\mathbf i + \dfrac{1}{\sqrt 2}\mathbf j\text{.}\) Use the definition of directional derivative to compute \(\left(D_{\mathbf u} f\right)_{P_0}\text{.}\)
Solution.
We substitute \(x_0 = y_0 = 1\) and \(u_1 = u_2 = \dfrac{1}{\sqrt 2}\) in the definition:
\begin{align*} \left(\frac{df}{ds}\right)_{\mathbf u,P_0} \amp= \lim_{s\to 0}\frac{f(x_0 + su_1,\, y_0 + su_2) - f(x_0,y_0)}{s}\\ \amp= \lim_{s\to 0} \frac{f\!\left(1 + \tfrac{s}{\sqrt 2},\, 1 + \tfrac{s}{\sqrt 2}\right) - f(1,1)}{s}\\ \amp= \lim_{s\to 0} \frac{1 + \left(1 + \tfrac{s}{\sqrt 2}\right)^2 + \left(1 + \tfrac{s}{\sqrt 2}\right)^2 - 3}{s}\\ \amp= \lim_{s\to 0}\frac{\tfrac{4s}{\sqrt 2} + s^2}{s} = \lim_{s\to 0}\left(\tfrac{4}{\sqrt 2} + s\right)\\ \amp= 2\sqrt 2. \end{align*}
The computation has a useful geometric picture, illustrated in the interactive 3D figure below. Along the ray through \(P_0(1,1)\) in the direction \(\mathbf u\text{,}\) the values of \(f\) are the single-variable function
\begin{align} g(s) \amp= f\!\left(1 + \tfrac{s}{\sqrt 2},\, 1 + \tfrac{s}{\sqrt 2}\right)\notag\\ \amp= 3 + 2\sqrt 2\, s + s^2,\tag{7.2} \end{align}
and the difference quotient in the limit above is the slope of the secant line of \(g\) through \(s = 0\) and \(s\text{.}\) As \(s \to 0\) the secant lines approach the tangent line at \(s = 0\text{,}\) whose slope is \(g'(0) = 2\sqrt 2 = \left(D_{\mathbf u} f\right)_{P_0}\text{.}\)

Instructions.

Press โ€œPlayโ€ to watch the whole construction in one continuous motion: the vertical plane through \(P_0(1,1)\) in the direction \(\mathbf u\) cuts the surface \(z = 1 + x^2 + y^2\) in the gold curve, the red secant joins \((P_0, f(P_0))\) to \((P, f(P))\text{,}\) and as \(s \to 0\) that secant rotates onto the green tangent line. The reading at the lower left compares the secant slope \(2\sqrt 2 + s\) with the tangent slope \(2\sqrt 2\text{,}\) which is the directional derivative \(\left(D_{\mathbf u} f\right)_{P_0}\text{.}\) Stop the animation at any time and drag the \(s\) slider yourself, or press โ€œs \(\to\) 0โ€ to replay just the limit. Drag the figure to change the viewpoint, or press โ€œSpinโ€ to let it turn.
Figure 7.7. The secant through \((P_0, f(P_0))\) and \((P, f(P))\) on the surface \(z = 1 + x^2 + y^2\text{,}\) rotating onto the tangent line at \(P_0\) as \(s \to 0\text{,}\) with slope \(2\sqrt2 + s \to 2\sqrt2\text{.}\)

Activity 7.8 The Partial Derivatives Are Directional Derivatives.

Definitionย 7.1 measures the rate of change of \(f\) in an arbitrary direction \(\mathbf u\text{.}\) Two directions are already familiar from \(f_x\) and \(f_y\text{.}\) In this activity you will check that the definition reproduces exactly those two derivatives when \(\mathbf u\) points along a coordinate axis. Use only (7.1); nothing beyond the definition is needed.

(a)

Take \(\mathbf u = \mathbf i\text{,}\) so that \(u_1 = 1\) and \(u_2 = 0\text{.}\) Substitute these into (7.1) and simplify. Which single-variable limit is left, and what is its value?

(b)

Repeat the computation with \(\mathbf u = \mathbf j\text{,}\) and state the conclusion.

(c)

Test this on the function of Exampleย 7.6. With \(f(x,y) = 1 + x^2 + y^2\) and \(P_0(1,1)\text{,}\) compute \(\left(D_{\mathbf i} f\right)_{P_0}\) straight from the definition, then compute \(f_x(1,1)\) in the usual way and compare.

(d)

Finally, take \(\mathbf u = -\mathbf i\text{.}\) Show that \(\left(D_{-\mathbf i} f\right)_{P_0} = -f_x(x_0,y_0)\text{,}\) and say in a sentence why this is what you should expect.
Every partial derivative is a directional derivative, so nothing already known about \(f_x\) and \(f_y\) is lost. What the definition adds is the freedom to point \(\mathbf u\) anywhere. Keep in mind that this depends on \(\mathbf u\) being a unit vector: the parameter \(s\) measures actual distance travelled in the \(xy\)-plane only when \(\|\mathbf u\| = 1\text{.}\)
You have attempted of activities on this page.