The Central Idea
Suppose
\[ z=f(x,y). \]The partial derivatives
\[ f_x \]and
\[ f_y \]describe rates of change along the \(x\)- and \(y\)-axes.
A directional derivative asks a more general question: how fast does \(f\) change if we move from a point in some chosen direction?
Why We Need More Than Partial Derivatives
At a point in the plane, there are infinitely many possible directions of travel.
We may move:
- east or west;
- north or south;
- along a diagonal;
- toward another point;
- along any other chosen direction.
Partial derivatives capture only two of these directions in a two-dimensional input space.
Direction Vectors
A direction in the plane can be represented by a vector
\[ \mathbf{v}=\langle a,b\rangle. \]The vector tells us how much of the direction points along the \(x\)-axis and how much points along the \(y\)-axis.
Directional Derivatives Use Unit Vectors
To measure rate of change per unit of distance traveled, the direction vector should have length \(1\).
A vector
\[ \mathbf{u}=\langle u_1,u_2\rangle \]is a unit vector when
\[ \boxed{u_1^2+u_2^2=1}. \]Normalizing a Direction Vector
If
\[ \mathbf{v}=\langle a,b\rangle \]is not a unit vector, divide it by its magnitude:
\[ \|\mathbf{v}\| = \sqrt{a^2+b^2}. \]Then
\[ \boxed{ \mathbf{u} = \frac{\mathbf{v}}{\|\mathbf{v}\|} }. \]Example: Normalize a Direction
Suppose
\[ \mathbf{v}=\langle 3,4\rangle. \]Its magnitude is
\[ \|\mathbf{v}\| = \sqrt{3^2+4^2} = 5. \]Therefore the corresponding unit vector is
\[ \boxed{ \mathbf{u} = \left\langle \frac35,\frac45 \right\rangle }. \]Limit Definition
Let \(\mathbf{u}=\langle u_1,u_2\rangle\) be a unit vector. The directional derivative of \(f\) at \((a,b)\) in the direction \(\mathbf{u}\) is
\[ \boxed{ D_{\mathbf{u}}f(a,b) = \lim_{h\to0} \frac{ f(a+hu_1,b+hu_2)-f(a,b) }{h} }. \]This is an ordinary difference quotient taken along a line through the point in the chosen direction.
What the Limit Is Doing
Starting at
\[ (a,b), \]the point
\[ (a+hu_1,b+hu_2) \]moves a small distance \(h\) along the unit direction \(\mathbf{u}\).
The quotient compares the change in output to the distance moved in input space.
Directional Derivative as a One-Variable Derivative
Define the line through \((a,b)\) in direction \(\mathbf{u}\) by
\[ \mathbf{r}(t) = \langle a,b\rangle+t\mathbf{u}. \]Then form the one-variable function
\[ g(t)=f(\mathbf{r}(t)). \]The directional derivative is
\[ \boxed{ D_{\mathbf{u}}f(a,b)=g'(0) }. \]The Computational Formula
If \(f\) is differentiable, then
\[ \boxed{ D_{\mathbf{u}}f(a,b) = f_x(a,b)u_1 + f_y(a,b)u_2 }. \]This is the standard working formula for directional derivatives in two variables.
Connection to the Gradient
The gradient is the vector
\[ \nabla f = \langle f_x,f_y\rangle. \]Therefore,
\[ \boxed{ D_{\mathbf{u}}f = \nabla f\cdot\mathbf{u} }. \]We will study the gradient in detail in the next lesson.
Partial Derivatives Are Special Directional Derivatives
The positive \(x\)-direction is represented by
\[ \mathbf{i}=\langle1,0\rangle. \]Thus,
\[ D_{\mathbf{i}}f = f_x. \]The positive \(y\)-direction is
\[ \mathbf{j}=\langle0,1\rangle, \]so
\[ D_{\mathbf{j}}f = f_y. \]Partial derivatives are therefore coordinate-direction directional derivatives.
Example: A Basic Directional Derivative
Let
\[ f(x,y)=x^2+y^2. \]Then
\[ f_x=2x, \qquad f_y=2y. \]At \((1,2)\),
\[ f_x(1,2)=2, \qquad f_y(1,2)=4. \]Choose the unit direction
\[ \mathbf{u} = \left\langle \frac35,\frac45 \right\rangle. \]Then
\[ D_{\mathbf{u}}f(1,2) = 2\left(\frac35\right) + 4\left(\frac45\right). \]Therefore,
\[ \boxed{ D_{\mathbf{u}}f(1,2)=\frac{22}{5} }. \]Interpretation of the Previous Example
The value
\[ \frac{22}{5} \]means that near \((1,2)\), moving in the chosen unit direction increases the function at an instantaneous rate of \(22/5\) output units per unit of distance traveled.
Example: Direction Given by a Nonunit Vector
Let
\[ f(x,y)=x^2y+3y \]and find the directional derivative at \((1,2)\) in the direction
\[ \mathbf{v}=\langle2,-1\rangle. \]First normalize:
\[ \|\mathbf{v}\|=\sqrt{5}, \] \[ \mathbf{u} = \left\langle \frac{2}{\sqrt5}, -\frac{1}{\sqrt5} \right\rangle. \]Continue the Calculation
The partial derivatives are
\[ f_x=2xy \]and
\[ f_y=x^2+3. \]At \((1,2)\),
\[ f_x=4, \qquad f_y=4. \]Therefore,
\[ D_{\mathbf{u}}f(1,2) = 4\left(\frac{2}{\sqrt5}\right) + 4\left(-\frac{1}{\sqrt5}\right). \]Hence,
\[ \boxed{ D_{\mathbf{u}}f(1,2) = \frac{4}{\sqrt5} }. \]Direction Toward Another Point
A problem may specify a direction indirectly by naming two points.
To move from
\[ P=(x_0,y_0) \]toward
\[ Q=(x_1,y_1), \]use the vector
\[ \overrightarrow{PQ} = \langle x_1-x_0,\ y_1-y_0\rangle. \]Then normalize it.
Example: Direction Toward a Point
Suppose we want the direction from
\[ P=(1,1) \]toward
\[ Q=(4,5). \]The direction vector is
\[ \overrightarrow{PQ} = \langle3,4\rangle. \]Therefore the unit direction is
\[ \boxed{ \mathbf{u} = \left\langle \frac35,\frac45 \right\rangle }. \]Example: Direction Toward a Point, Full Workflow
Let
\[ f(x,y)=xy+y^2 \]and find the directional derivative at \(P=(1,1)\) toward \(Q=(4,5)\).
We already found
\[ \mathbf{u} = \left\langle \frac35,\frac45 \right\rangle. \]The partial derivatives are
\[ f_x=y, \qquad f_y=x+2y. \]At \((1,1)\),
\[ f_x=1, \qquad f_y=3. \]Thus,
\[ D_{\mathbf{u}}f(1,1) = \frac35+\frac{12}{5} = 3. \]Therefore,
\[ \boxed{ D_{\mathbf{u}}f(1,1)=3 }. \]Positive, Negative, and Zero Directional Derivatives
The sign has the same local interpretation as with ordinary derivatives.
- If \(D_{\mathbf{u}}f>0\), the function increases in direction \(\mathbf{u}\).
- If \(D_{\mathbf{u}}f<0\), the function decreases in direction \(\mathbf{u}\).
- If \(D_{\mathbf{u}}f=0\), the instantaneous rate in that direction is zero.
Opposite Directions
If \(\mathbf{u}\) is a unit vector, then \(-\mathbf{u}\) points in the opposite direction.
For differentiable functions,
\[ D_{-\mathbf{u}}f = -D_{\mathbf{u}}f. \]Reversing direction reverses the sign of the instantaneous rate.
Example: Opposite Directions
Suppose
\[ D_{\mathbf{u}}f(a,b)=7. \]Then
\[ \boxed{ D_{-\mathbf{u}}f(a,b)=-7 }. \]What is uphill at rate \(7\) in one direction is downhill at rate \(7\) in the opposite direction.
Angle Form of a Unit Direction
A unit vector making an angle \(\theta\) with the positive \(x\)-axis can be written
\[ \boxed{ \mathbf{u} = \langle\cos\theta,\sin\theta\rangle }. \]Therefore,
\[ \boxed{ D_{\mathbf{u}}f = f_x\cos\theta + f_y\sin\theta }. \]Example: Direction Given by an Angle
Let
\[ f(x,y)=x^2+xy. \]At \((2,1)\),
\[ f_x=2x+y=5, \] \[ f_y=x=2. \]In the direction \(\theta=\pi/3\),
\[ \mathbf{u} = \left\langle \frac12,\frac{\sqrt3}{2} \right\rangle. \]Hence,
\[ D_{\mathbf{u}}f(2,1) = \frac52+\sqrt3. \]Therefore,
\[ \boxed{ D_{\mathbf{u}}f(2,1) = \frac52+\sqrt3 }. \]Geometric Meaning on a Surface
For
\[ z=f(x,y), \]choose a direction \(\mathbf{u}\) in the \(xy\)-plane.
A vertical plane containing that direction cuts the surface in a curve.
The directional derivative is the slope of that cross-sectional curve at the point.
Directional Derivative and Tangent Lines
The cross-sectional curve described above has a tangent line.
Its slope is
\[ D_{\mathbf{u}}f(a,b). \]So a directional derivative can be understood as the slope of the surface when viewed through one chosen vertical slice.
Why Unit Length Matters
Suppose we used
\[ \mathbf{v}=\langle6,8\rangle \]instead of the unit vector
\[ \mathbf{u} = \left\langle \frac35,\frac45 \right\rangle. \]These vectors point in the same direction, but \(\mathbf{v}\) is ten times as long.
Without normalization, the result would scale with vector length rather than represent change per unit distance.
Directional Derivatives in Three Variables
For
\[ f(x,y,z) \]and a unit vector
\[ \mathbf{u} = \langle u_1,u_2,u_3\rangle, \]the directional derivative is
\[ \boxed{ D_{\mathbf{u}}f = f_xu_1+f_yu_2+f_zu_3 }. \]Example: Three Variables
Let
\[ f(x,y,z)=x^2+y^2+z^2. \]Then
\[ f_x=2x, \qquad f_y=2y, \qquad f_z=2z. \]At \((1,2,2)\),
\[ \langle f_x,f_y,f_z\rangle = \langle2,4,4\rangle. \]In the unit direction
\[ \mathbf{u} = \left\langle \frac13,\frac23,\frac23 \right\rangle, \]we obtain
\[ D_{\mathbf{u}}f = \frac23+\frac83+\frac83 = 6. \]Therefore,
\[ \boxed{D_{\mathbf{u}}f=6}. \]Units of a Directional Derivative
If the output has units \(U\) and the input coordinates represent distance measured in units \(L\), then
\[ D_{\mathbf{u}}f \]has units
\[ \frac{U}{L}. \]It is a rate of output change per unit movement in the chosen direction.
Example: Temperature
Suppose
\[ T(x,y) \]gives temperature in degrees Celsius, with \(x\) and \(y\) measured in kilometers.
If
\[ D_{\mathbf{u}}T(a,b)=2.5, \]then near \((a,b)\), moving in direction \(\mathbf{u}\) increases temperature at an instantaneous rate of approximately
\[ 2.5\text{ degrees Celsius per kilometer}. \]Example: Elevation
If
\[ h(x,y) \]measures terrain elevation, then
\[ D_{\mathbf{u}}h \]gives the slope of the terrain in the direction of travel \(\mathbf{u}\).
A positive value means uphill; a negative value means downhill.
Example: Cost Sensitivity
Suppose
\[ C(x,y) \]is a cost function depending on two coordinated inputs.
A unit direction
\[ \mathbf{u} = \langle u_1,u_2\rangle \]describes a combined change in both inputs.
Then
\[ D_{\mathbf{u}}C \]measures the instantaneous cost sensitivity to that coordinated change.
Directional Derivatives and Level Curves
Level curves satisfy
\[ f(x,y)=c. \]Moving along a level curve keeps the output constant, so the directional derivative in a tangent direction to a smooth level curve is
\[ 0. \]This observation will become central when we study gradients.
Directions of No Instantaneous Change
If
\[ D_{\mathbf{u}}f(a,b)=0, \]the direction \(\mathbf{u}\) produces no first-order change in the function at that point.
This does not necessarily mean the function remains exactly constant along that direction away from the point.
Directional Derivatives and Differentiability
If \(f\) is differentiable at a point, then every directional derivative exists there and is given by
\[ D_{\mathbf{u}}f = \nabla f\cdot\mathbf{u}. \]The converse is more delicate: the existence of directional derivatives in every direction does not by itself guarantee differentiability.
Why That Distinction Matters
Directional derivatives examine one-dimensional paths through a point.
Differentiability requires a single linear approximation that works consistently for all sufficiently small changes in the input.
A function can behave regularly along every straight line but still fail to have one coherent local linear model.
Common Error: Forgetting to Normalize
Suppose the direction is
\[ \langle3,4\rangle. \]Do not insert \(3\) and \(4\) directly into the standard directional-derivative formula.
First use
\[ \boxed{ \mathbf{u} = \left\langle \frac35,\frac45 \right\rangle }. \]Common Error: Reversing the Direction
The direction from \(P\) to \(Q\) is
\[ Q-P. \]The direction from \(Q\) to \(P\) is
\[ P-Q. \]These point in opposite directions and produce directional derivatives with opposite signs for differentiable functions.
Common Error: Using the Wrong Point
A directional derivative is evaluated at a specific starting point.
The correct sequence is:
- compute the partial derivatives;
- evaluate them at the starting point;
- combine them with the chosen unit direction.
Common Error: Confusing Position with Direction
The point
\[ (a,b) \]tells us where we start.
The vector
\[ \mathbf{u} \]tells us how we move.
These are different pieces of information.
Common Error: Assuming a Zero Directional Derivative Means a Local Extremum
If
\[ D_{\mathbf{u}}f=0 \]for one direction, the function may still increase or decrease in other directions.
A single zero directional derivative is not enough to establish a local maximum or minimum.
Common Error: Ignoring Units
A directional derivative is a rate.
If the output is temperature and the input coordinates are distances, then the result is not merely “degrees.” It is degrees per unit distance.
A Reliable Procedure
- Identify the starting point.
- Identify the desired direction.
- If necessary, construct the direction vector from two points.
- Normalize the direction vector.
- Compute the needed partial derivatives.
- Evaluate those partial derivatives at the starting point.
- Use \(D_{\mathbf{u}}f=f_xu_1+f_yu_2\).
- Interpret the sign, magnitude, and units in context.
Example: Full Workflow
Let
\[ f(x,y)=x^2y+2y^2 \]and find the directional derivative at
\[ P=(2,1) \]toward
\[ Q=(5,5). \]The direction vector is
\[ \overrightarrow{PQ} = \langle3,4\rangle. \]Normalize:
\[ \mathbf{u} = \left\langle \frac35,\frac45 \right\rangle. \]Complete the Full Workflow
The partial derivatives are
\[ f_x=2xy, \] \[ f_y=x^2+4y. \]At \((2,1)\),
\[ f_x=4, \qquad f_y=8. \]Therefore,
\[ D_{\mathbf{u}}f(2,1) = 4\left(\frac35\right) + 8\left(\frac45\right). \]Hence,
\[ \boxed{ D_{\mathbf{u}}f(2,1) = \frac{44}{5} }. \]Practice 1: Normalize a Vector
Find the unit vector in the direction of
\[ \mathbf{v}=\langle5,12\rangle. \]Practice 2: Basic Directional Derivative
Let
\[ f(x,y)=x^2+3y^2. \]Find the directional derivative at \((1,1)\) in the direction
\[ \mathbf{u} = \left\langle \frac{1}{\sqrt2}, \frac{1}{\sqrt2} \right\rangle. \]Practice 3: Nonunit Direction
Let
\[ f(x,y)=xy. \]Find the directional derivative at \((2,3)\) in the direction
\[ \mathbf{v}=\langle3,4\rangle. \]Practice 4: Direction Toward a Point
Find the unit direction from
\[ P=(2,-1) \]toward
\[ Q=(5,3). \]Practice 5: Direction Toward a Point, Full Calculation
Let
\[ f(x,y)=x^2-y^2. \]Find the directional derivative at \(P=(1,2)\) toward \(Q=(4,6)\).
Practice 6: Direction Given by an Angle
Let
\[ f(x,y)=x+2y. \]Find the directional derivative in the direction
\[ \theta=\frac{\pi}{4}. \]Practice 7: Three Variables
Let
\[ f(x,y,z)=x^2+y^2+z^2. \]Find the directional derivative at \((1,1,1)\) in the unit direction
\[ \mathbf{u} = \frac{1}{\sqrt3} \langle1,1,1\rangle. \]Practice 8: Interpretation
Suppose \(T(x,y)\) is temperature in degrees Celsius and \(x,y\) are in kilometers. Interpret
\[ D_{\mathbf{u}}T(3,4)=-1.8. \]Practice 9: Opposite Direction
If
\[ D_{\mathbf{u}}f(a,b)=6, \]what is
\[ D_{-\mathbf{u}}f(a,b)? \]Practice 10: Identify the Error
A student wants the directional derivative in the direction
\[ \mathbf{v}=\langle6,8\rangle \]and substitutes \(u_1=6\) and \(u_2=8\) directly into
\[ D_{\mathbf{u}}f=f_xu_1+f_yu_2. \]Explain the error.
Practice Answers
Practice 1
The magnitude is
\[ \sqrt{5^2+12^2}=13. \]Therefore,
\[ \boxed{ \mathbf{u} = \left\langle \frac5{13}, \frac{12}{13} \right\rangle }. \]Practice 2
We have
\[ f_x=2x, \qquad f_y=6y. \]At \((1,1)\),
\[ f_x=2, \qquad f_y=6. \]Thus,
\[ D_{\mathbf{u}}f = \frac{2}{\sqrt2} + \frac{6}{\sqrt2} = 4\sqrt2. \]Therefore,
\[ \boxed{D_{\mathbf{u}}f=4\sqrt2}. \]Practice 3
Normalize
\[ \langle3,4\rangle \]to get
\[ \mathbf{u} = \left\langle \frac35,\frac45 \right\rangle. \]Since
\[ f_x=y, \qquad f_y=x, \]at \((2,3)\),
\[ f_x=3, \qquad f_y=2. \]Therefore,
\[ \boxed{ D_{\mathbf{u}}f = 3\left(\frac35\right) + 2\left(\frac45\right) = \frac{17}{5} }. \]Practice 4
The direction vector is
\[ Q-P = \langle3,4\rangle. \]Therefore,
\[ \boxed{ \mathbf{u} = \left\langle \frac35,\frac45 \right\rangle }. \]Practice 5
The direction from \(P\) to \(Q\) is
\[ \langle3,4\rangle, \]so
\[ \mathbf{u} = \left\langle \frac35,\frac45 \right\rangle. \]Since
\[ f_x=2x, \qquad f_y=-2y, \]at \((1,2)\),
\[ f_x=2, \qquad f_y=-4. \]Thus,
\[ D_{\mathbf{u}}f = 2\left(\frac35\right) - 4\left(\frac45\right) = -2. \]Therefore,
\[ \boxed{D_{\mathbf{u}}f=-2}. \]Practice 6
The unit direction is
\[ \left\langle \frac{\sqrt2}{2}, \frac{\sqrt2}{2} \right\rangle. \]Since
\[ f_x=1, \qquad f_y=2, \]we get
\[ \boxed{ D_{\mathbf{u}}f = \frac{3\sqrt2}{2} }. \]Practice 7
At \((1,1,1)\),
\[ \langle f_x,f_y,f_z\rangle = \langle2,2,2\rangle. \]Therefore,
\[ D_{\mathbf{u}}f = \langle2,2,2\rangle \cdot \frac{1}{\sqrt3} \langle1,1,1\rangle = \frac{6}{\sqrt3} = 2\sqrt3. \]Thus,
\[ \boxed{D_{\mathbf{u}}f=2\sqrt3}. \]Practice 8
Near \((3,4)\), moving in direction \(\mathbf{u}\) decreases temperature at an instantaneous rate of approximately \(1.8\) degrees Celsius per kilometer.
Practice 9
\[ \boxed{ D_{-\mathbf{u}}f(a,b)=-6 }. \]Practice 10
The vector \(\langle6,8\rangle\) is not a unit vector. Its magnitude is
\[ 10. \]The correct unit direction is
\[ \boxed{ \mathbf{u} = \left\langle \frac35,\frac45 \right\rangle }. \]The standard directional-derivative formula should use the normalized direction.
What to Remember
Directional derivatives extend the idea of partial derivatives to arbitrary directions.
- A direction is represented by a vector.
- The standard directional derivative uses a unit vector.
- Normalize with \(\mathbf{u}=\mathbf{v}/\|\mathbf{v}\|\).
- For a differentiable function, \(D_{\mathbf{u}}f=f_xu_1+f_yu_2\).
- Partial derivatives are directional derivatives along coordinate axes.
- The sign tells whether the function locally increases or decreases in the chosen direction.
- Moving in the opposite direction reverses the sign.
The core workflow is
\[ \boxed{ \text{choose direction} \longrightarrow \text{normalize} \longrightarrow \text{combine coordinate rates} }. \]Where We Go Next
Directional derivatives tell us the rate of change in one chosen direction. The next question is whether there is a single object that organizes all of those directional rates at once.
The next lesson, Gradients, introduces the vector built from the partial derivatives. It identifies the direction of greatest increase, connects directly to level sets, and provides the central geometric tool for local multivariable change.