Gradient &
Directional Derivatives
Learn how the gradient vector captures the direction and rate of steepest ascent, and how directional derivatives measure rates of change in any direction.
What Is the Gradient?
For a function \( f(x,y) \) with continuous partial derivatives, the gradient is the vector of all first partials:
The gradient is a vector field: at every point \((x,y)\), it assigns a vector that points in the direction of steepest increase of \(f\).
Gradient on a Contour Map
Why the Gradient Matters
The Directional Derivative
The directional derivative measures the rate of change of \( f \) at a point in the direction of a unit vector \( \mathbf{u} \).
Partial derivatives are special cases: \( f_x = D_{\mathbf{i}}\,f \) and \( f_y = D_{\mathbf{j}}\,f \), using the standard basis vectors.
Core Theorem: The Dot Product Formula
Geometric Interpretation
Since \( D_{\mathbf{u}} f = \|\nabla f\| \cos\theta \), the directional derivative depends on the angle between \( \nabla f \) and \( \mathbf{u} \):
Gradient vs. Directional Derivative
| Gradient \( \nabla f \) | Dir. Derivative \( D_{\mathbf{u}} f \) | |
|---|---|---|
| Type | Vector | Scalar |
| Inputs | A point \((x,y)\) | A point and a unit vector \(\mathbf{u}\) |
| Meaning | Direction of steepest ascent | Rate of change along \(\mathbf{u}\) |
| Depends on direction? | No: intrinsic to \(f\) | Yes: changes with \(\mathbf{u}\) |
| Relationship | \( D_{\mathbf{u}} f = \nabla f \cdot \mathbf{u} \) | |
How to Compute \( D_{\mathbf{u}} f \)
Example 1: Basic Gradient
Find \( \nabla f \) for \( f(x,y) = x^2 y + 3xy^2 \) at \((1, 2)\).
Example 2: Directional Derivative
Find \( D_{\mathbf{u}} f \) for \( f(x,y) = e^x \sin y \) at \((0, \frac{\pi}{3})\) in the direction of \( \mathbf{v} = \langle 1, -1 \rangle \).
Example 3: Three Variables
The gradient extends naturally. For \( f(x,y,z) = x^2 + yz - z^3 \):
At \((1, 2, -1)\):
Using an Angle for Direction
If the direction is given as an angle \(\theta\) from the positive \(x\)-axis, the unit vector is:
Gradient and Surfaces
For a surface defined implicitly by \( F(x,y,z) = 0 \), the gradient \( \nabla F \) gives the normal vector to the surface at any point.
Common Mistakes
Summary of Key Formulas
| Concept | Formula | Output |
|---|---|---|
| Gradient (2D) | \( \nabla f = \langle f_x, f_y \rangle \) | Vector |
| Gradient (3D) | \( \nabla f = \langle f_x, f_y, f_z \rangle \) | Vector |
| Directional derivative | \( D_{\mathbf{u}} f = \nabla f \cdot \mathbf{u} \) | Scalar |
| Max rate of change | \( \|\nabla f\| \) | Scalar |
| Direction of max change | \( \dfrac{\nabla f}{\|\nabla f\|} \) | Unit vector |
Question 1 of 5
If \( f(x,y) = 3x^2 + 2y^2 \), what is \( \nabla f(1, -1) \)?
Question 2 of 5
The gradient \( \nabla f \) at a point is always perpendicular to which of the following?
Question 3 of 5
Given \( \nabla f(2,1) = \langle 4, 3 \rangle \) and \( \mathbf{u} = \left\langle \frac{3}{5}, \frac{4}{5} \right\rangle \), what is \( D_{\mathbf{u}} f(2,1) \)?
Question 4 of 5
What is the maximum rate of change of \( f(x,y) = x^2 - xy + y^2 \) at the point \((1,1)\)?
Question 5 of 5
If the directional derivative \( D_{\mathbf{u}} f = 0 \) at a point, what can you conclude about \( \mathbf{u} \)?