Skip to main content

Someone wanted to learn this too, so Grasp built them a personal learning path.

You can keep exploring this one or create your own

Computing Directional Derivatives from Gradients

Hello! In the previous lesson, you used a Jacobian to differentiate a scalar field along a path. That calculation answered how quickly the field changes as the path’s parameter changes. Today, you will use the same chain rule to answer a more spatial question: how quickly does a field change per unit distance in a chosen direction?

This is the directional derivative. It lets you calculate the local change in a potential, temperature, or other scalar field without restricting yourself to motion along a coordinate axis. You will compute it from the gradient, then use that calculation to understand the gradient’s direction and magnitude.


From an axis direction to any direction

For a differentiable field , the partial derivative measures its rate of change when you move in the positive -direction while holding fixed. Likewise, describes movement in the positive -direction. A directional derivative asks the same question for a direction that need not line up with either axis.

Choose a starting point and a unit vector . At distance along the straight line in that direction, your position is

Because , a change of by one unit means travel of one unit of distance. The directional derivative is the ordinary derivative of the field value along this line, evaluated where you start:

A positive result means the field initially increases as you travel in that direction; a negative result means it decreases. “Initially” matters: a directional derivative describes the rate at the specified point, not the field’s behaviour over the whole line.

Watch Directional Derivatives | What’s the slope in any direction? by Dr. Trefor Bazett. Its picture of a line crossing the domain makes the distance parameter in the definition concrete, while its worked example shows the computational method you will use below.

Directional Derivatives | What's the slope in any direction?

Watch this explanation to connect the geometric slope, the limit definition, and the gradient calculation.

Begin with the geometric question, which contrasts arbitrary directions with partial derivatives. Continue through the derivation; focus on why the direction vector has unit length and where the chain rule enters. Finish with the worked example, noting how a zero result is interpreted.


The gradient turns the question into a dot product

The gradient packages the partial derivatives of a scalar field into a vector:

In the Cartesian coordinates used here, its entries are the same ones that appeared in the one-row Jacobian last lesson; we are now writing them as a vector so that we can use the dot product. Along the line , the chain rule gives

Evaluating at gives the central formula:

This is the path calculation from last lesson with a particular path: a straight line travelled at unit speed. It also recovers partial derivatives as special cases. With , the dot product is ; with , it is .

In a calculation, the reliable order is to find the gradient, evaluate it at the requested point, make the direction vector a unit vector, and then take the dot product. For example, let

and ask for the derivative in the direction of . First,

The supplied vector describes a direction but is not a unit vector: . Thus , and

The field initially falls by units of field value per unit of distance travelled in that direction. Dotting with instead would give , but that is change per unit of a different path parameter, not per unit of distance. Dividing by is what makes answers for direction vectors of different lengths comparable.

The same formula works in three Cartesian dimensions. For a differentiable field ,

for any three-component unit vector . Nothing new has to be added to the chain rule; there is simply one more contribution to the dot product.


What the dot product says about the landscape

A dot product does more than provide a convenient calculation. If , and is the angle between the gradient and a unit direction , then

At a fixed point, the gradient is fixed; you can vary only . The greatest possible directional derivative is therefore , achieved when you travel in the gradient’s direction. Travelling directly opposite gives the most negative rate, . A perpendicular direction gives a directional derivative of zero.

Watch the selected parts of Lec 12: Gradient; directional derivative; tangent plane from MIT OpenCourseWare. The first selection uses the chain rule to explain why the gradient is normal to a level set. The later selection interprets the angle in the dot-product formula. You can skip the intervening material for this lesson.

Lec 12: Gradient; directional derivative; tangent plane | MIT 18.02 Multivariable Calculus, Fall 07

Watch these two parts for the geometric meaning of the gradient, beyond its role as a list of partial derivatives.

In the level-set argument, follow a path on which the field value is constant and notice what the chain rule says about its tangent. Then jump to directions and rates for the fastest increase, fastest decrease, and zero-change directions.

A level curve consists of points where has one fixed value. If traces such a curve, then is constant. By the chain rule,

The tangent vector is consequently perpendicular to the gradient wherever the gradient is nonzero. This explains why moving tangent to a level curve produces zero instantaneous change: to first order, you are travelling along a constant-value contour. A straight line in that tangent direction need not stay on the curve farther from the point.

At \((-2,1)\), the gradient is perpendicular to the tangent of the illustrated level curve \(f(x,y)=18\). Travel along that tangent has zero instantaneous directional derivative.

Return to the numerical example. At , the gradient is , with magnitude . Its unit direction gives the maximum directional derivative . The vector is perpendicular to the gradient, so travel in the unit direction gives zero directional derivative. The earlier direction lies between these cases and gave a negative result. One gradient vector has answered all three directional questions.

If , the dot-product formula gives zero in every direction. There is then no unique direction of fastest increase at that point; first-order directional information alone cannot tell you what happens a little farther away. The next lesson’s higher-order approximation will provide more information.


A three-dimensional field and a moving observer

Suppose the numerical value of a temperature field, with positions measured in metres and temperature in kelvins, is

with the coefficients understood to carry the necessary physical units. At the point ,

For travel in the direction , the vector’s length is , so . The temperature’s directional derivative is

That is a spatial rate. If an observer instead passes through with velocity metres per second, the chain rule gives

The numbers differ because metres per second. Normalizing the velocity asks how temperature changes per metre in its direction; leaving it unnormalized asks how temperature changes per second for that observer. Keeping the units in view is an effective way to distinguish these two closely related calculations.

The same directional geometry can be pictured on a surface representing a two-variable field. In the image below, distinguish vectors drawn in the input plane from paths drawn on the graph above it: the gradient specifies a direction of travel in the input plane and the resulting steepest rise in field value.

For the depicted surface \(z=f(x,y)\), the gradient in the \(xy\)-plane indicates the direction of greatest local increase. The opposite direction gives greatest decrease; perpendicular directions give zero instantaneous change.

Looking ahead

To compute a directional derivative, evaluate the gradient at the point, normalize the requested direction, and take their dot product. The result is the field’s local change per unit distance in that direction. The dot product also explains why the gradient points toward fastest increase and stands perpendicular to a regular level curve.

Next, you will go beyond this first-order description by constructing a second-order Taylor approximation. That will help describe how a field changes near a point when its directional derivatives alone do not tell the whole story.

Can't find a good explanation? Sign up and we'll make it for you

Sign up