WOLFRAM|DEMONSTRATIONS PROJECT

Directional Derivatives and the Gradient

​
show directional derivative triangle
show partial derivative triangles
θ
f
x
f
y
This Demonstration visually explains the theorem stating that the directional derivative
D
u
f(
x
0
,
y
0
)
of the function
f
at the point
(
x
0
,
y
0
) in the direction of the unit vector
u
is equal to the dot product
∇f(
x
0
,
y
0
)·u
of the gradient of
f
with
u
. If we denote the partial derivatives of
f
at this point by
f
x
and
f
y
and the components of the unit vector
u
by
u
1
and
u
2
, we can state the theorem as follows:
D
u
f(
x
0
,
y
0
)=
f
x
u
1
+
f
y
u
2
.
In this Demonstration there are controls for
θ
, the angle that determines the direction vector
u
, and for the values of the partial derivatives
f
x
and
f
y
. The partial derivative values determine the tilt of the tangent plane to
f
at the point
(
x
0
,
y
0
); this is the plane shown in the graphic. When you view the "directional derivative triangle", observe that its horizontal leg has length 1 (since
u
is a unit vector), and so the signed length of its vertical leg repesents the value of the directional derivative
D
u
f(
x
0
,
y
0
)
. When you view the "partial derivative triangles", this signed vertical distance is decomposed as the sum
f
x
u
1
+
f
y
u
2
. The first summand is represented by the vertical leg of the blue triangle; the second is represented by the vertical leg of the green triangle. The visual representation is most clear when the two summands have the same sign.