Let f be a differentiable function of two or three variables at a point P, and let u be a unit vector (∥u∥=1). The directional derivative of f at P in the direction of u, denoted by Duf(P), is defined as the limit:
Duf(P)=h→0limhf(P+hu)−f(P)
By the Gradient Theorem for Directional Derivatives, if f is differentiable, this limit can be computed directly using the vector dot product of the gradient ∇f and the unit vector u:
Two Variables (f(x,y) with u=⟨u1,u2⟩):
Duf(x,y)=∇f(x,y)⋅u=fx(x,y)u1+fy(x,y)u2
Three Variables (f(x,y,z) with u=⟨u1,u2,u3⟩):
Duf(x,y,z)=∇f(x,y,z)⋅u=fxu1+fyu2+fzu3
The output Duf is always a scalar quantity representing the instantaneous rate of change of f per unit distance traveled in the specific direction of u.
Concept Explanation
Bridging from Partial Derivatives to Arbitrary Directions
Partial derivatives fx and fy measure the instantaneous rate of change of z=f(x,y) strictly parallel to the coordinate axes:
fx=Di^f=∇f⋅⟨1,0⟩ (moving due East)
fy=Dj^f=∇f⋅⟨0,1⟩ (moving due North)
In practical engineering applications, observers, vehicles, fluid streams, and structural loads rarely move parallel to grid axes. The directional derivative Duf generalizes differentiation to any arbitrary compass heading or 3D spatial trajectory:
^ y
| ^ u = <cos(theta), sin(theta)>
| /
| / (Heading direction)
| /
| * P(x_0, y_0)
| \
| \ grad f (Steepest ascent)
+----------> x
The Mandatory Unit Vector Normalization Rule
The dot product formula Duf=∇f⋅ustrictly requires that the direction vector is a unit vector (∥u∥=1).
If a problem specifies direction via an arbitrary non-unit vector v (where ∥v∥=1), you must normalize it first:
u=∥v∥v=v12+v22⟨v1,v2⟩
If direction is specified as moving from point P toward a destination point Q, compute the displacement vector PQ=Q−P and normalize it:
u=∥PQ∥PQ
Pitfall Warning
Computing ∇f⋅v with an unnormalized vector scales your result by ∥v∥. This yields an incorrect rate of change with distorted units.
Angle Parameterization in 2D
In two dimensions, any unit vector u making an angle θ measured counterclockwise from the positive x-axis can be written as:
u=⟨cosθ,sinθ⟩
Substituting into the directional derivative formula gives:
Duf(x,y)=fx(x,y)cosθ+fy(x,y)sinθ
Geometric Interpretation via the Dot Product Angle Formula
From the geometric definition of the dot product:
Duf=∇f⋅u=∥∇f∥∥u∥cosϕ=∥∇f∥cosϕ
where ϕ is the angle between the gradient vector ∇f and the direction vector u. Because −1≤cosϕ≤1:
Maximum Rate of Increase (ϕ=0): When u points in the same direction as ∇f, cos(0)=1, yielding Duf=∥∇f∥.
Maximum Rate of Decrease (ϕ=π): When u points opposite to ∇f, cos(π)=−1, yielding Duf=−∥∇f∥.
Zero Rate of Change (ϕ=π/2 or 3π/2): When u is orthogonal to ∇f, cos(π/2)=0, yielding Duf=0 (moving tangent to a level curve).
Engineering Applications
Civil & Transportation Engineering: Roadway design engineers calculate ground grades along angled road cuts using directional derivatives. If a proposed highway alignment vector u yields a slope Duh exceeding federal grade standards (e.g., 6%), the alignment must be modified.
Entertainment Engineering & Lighting Design: Lighting designers model stage illuminance fields I(x,y) in lux. When a performer moves along a trajectory u, DuI dictates the required dynamic dimmer response to prevent shadows and maintain consistent video capture.
Environmental & Atmospheric Modeling: Meteorology stations track atmospheric pressure P(x,y). The directional derivative DuP in the direction of an aircraft's flight heading dictates localized altimeter drift and crosswind shear.
Example Problems
Example 1: Directional Derivative via Vector Normalization
Find the directional derivative of f(x,y)=3x2−2y2+5xy at the point P(2,−1) in the direction of the vector v=⟨3,4⟩.