LightMySky
به انگلیسی

Directional Derivatives and the Gradient

For a differentiable function, dot its gradient with a unit direction to find a rate per unit distance. A nonzero gradient gives the direction of fastest increase and is perpendicular to level-curve tangents.

No account needed. Progress saves in this browser.

What a learner can do afterwards

  • Compute and interpret gradient components and length; use unit directions for rates per unit distance and compare them with rates along a parameterized path
  • Find maximum and minimum directional derivatives and their directions, including the zero-gradient case
  • Use a nonzero gradient to check level-curve tangents and normals, and distinguish zero instantaneous change from a constant-value path

1 · Read

For differentiable f(x, y), write fx and fy for its partial derivatives. Hold the other variable fixed when finding each partial. The gradient ∇f = (fx, fy) lists them in x, y order. Its components give the rates along (1, 0) and (0, 1). Evaluate both partials at the point. The gradient length is sqrt(fx² + fy²); it need not be 1.

D_u f(P) is the instantaneous rate per unit distance in the input plane, in unit direction u = (u1, u2). For f differentiable at P, find its partials there and calculate D_u f(P) = fx(P)u1 + fy(P)u2 = ∇f(P) dot u. Multiply matching components and add. A unit vector has length 1. For a nonzero direction v = (v1, v2), first find |v| = sqrt(v1² + v2²), then use u = v/|v|.

f = 4x - 3ygradient = (4, -3)v = (0, 2)unit u = (0, 1)D_u f = -3
The direction (0, 2) has length 2. Using (0, 1) gives the rate per unit distance.

For f differentiable at P with nonzero gradient g, D_u f(P) = |g| cos(theta). Here theta is the angle between g and unit u, and |g| = sqrt(g1² + g2²). Cosine ranges from -1 to 1. The maximum rate is |g| along g/|g|; the minimum is -|g| along -g/|g|. If g = (0, 0), every unit direction has derivative 0, so there is no unique fastest direction.

g = (8, 15)|g| = sqrt(64 + 225)|g| = 17max u = (8/17, 15/17)rates: max 17, min -17

On a level curve f(x, y) = c, f stays constant. If f is differentiable, the chain rule gives ∇f dot T = 0 for any tangent velocity T. If the first partials are continuous near P and g = ∇f(P) is nonzero, the level curve has a tangent there and g is normal to it. To check a tangent vector, take its dot product with g. If g = (a, b), then (-b, a) is tangent because -ab + ab = 0.

Zero directional derivative describes first-order change at one point. It does not make a straight path stay level. For f = x² + 2y² at (0, 2), the gradient is (0, 8). Its dot product with (1, 0) is 0. But on the straight path (t, 2), f = 8 + t², which exceeds 8 whenever t is nonzero.

path = (t, 2)f(t, 2) = 8 + t²at t = 0: rate 0t > 0: value > 8

You have added the chain rule's two path contributions. For f differentiable at P and a straight path P + t v, df/dt at t = 0 is fx(P)v1 + fy(P)v2. This is rate per unit of t. For nonzero v, divide by its speed |v| to get rate per unit distance. For f = x + 2y on (2 + 2t, 1 + t), df/dt = 2 + 2 = 4. The speed is sqrt(5), so the rate per unit distance is 4/sqrt(5).

For differentiable f, dot its gradient with a unit direction for the rate. A nonzero gradient gives fastest increase and is normal to level-curve tangents.

Lesson, questions, worked solutions and flashcards written for this dataset. External references were studied for mathematical facts and question design.

Readings, practice questions, worked solutions and flashcards written for this dataset. Linked videos: Khan Academy, "Gradient", "Why the gradient is the direction of steepest ascent", and "Directional derivative".

More to read

Which rate does the direction vector measure?

A path vector carries a speed as well as a direction. This matters when choosing the denominator of a rate.

Let f(x, y) = 7x - 2y and follow the straight path P + t(4, 3). The gradient is (7, -2), so the chain rule gives df/dt = 7(4) - 2(3) = 22. This is change per unit of t.

The path moves at speed sqrt(4² + 3²) = 5 in the input plane. To measure change per unit distance, divide the velocity by 5. The unit direction is (4/5, 3/5), and the directional derivative is 7(4/5) - 2(3/5) = 22/5.

For any function differentiable at P, the same method applies: dot its gradient with the path velocity for the parameter rate, or with the unit direction for the distance rate. A zero vector supplies no direction and cannot be normalized.

A tangent direction is a local statement

Consider f(x, y) = 2x² + y² at (1, 2). This point lies on the level curve f = 6. The gradient there is (4, 4). Its dot product with T = (1, -1) is 4 - 4 = 0.

The first partial derivatives are continuous near the point and the gradient is nonzero. The gradient is therefore normal to the level curve, and T is tangent to it.

Now follow the straight tangent path (1 + t, 2 - t). Substitution gives f = 6 + 3t². Its derivative at t = 0 is zero, but its value exceeds 6 for every nonzero t. A straight tangent path need not stay on the curve.

Following the actual level curve keeps f equal to 6. For a differentiable function, the chain rule explains the zero dot product: a constant output has derivative zero, so the gradient dotted with a tangent velocity is zero. At a zero gradient, this test supplies no nonzero normal direction.

Compare the rates in all unit directions

Suppose f is differentiable at P and its gradient there is g = (-8, 6). Its length is sqrt(64 + 36) = 10.

For any unit direction u, the directional derivative is g dot u. The dot-product angle formula writes this as 10 cos(theta), where theta is the angle between g and u. Since cosine lies between -1 and 1, every directional derivative lies between -10 and 10.

The unit direction (-4/5, 3/5) agrees with g and gives rate 10. The opposite direction (4/5, -3/5) gives rate -10. A perpendicular direction gives rate zero.

For a general nonzero gradient, divide it by its length to find the fastest-increase unit direction. The maximum rate is its length, and the minimum is the negative of its length. These claims concern the chosen point; the gradient can change after moving.

If the gradient is zero, every unit direction gives derivative zero. There is no gradient direction to normalize.

Explore more

2 · Watch

به انگلیسی

Take it off screen

Print a worksheetA4 with an answer key page for grown-ups. No screen, no internet.

Where it sits

Then practise

16 questions wait behind this lesson, each with its answer explained. Every answer feeds the sky: stars light as they are learned, and dim when it is time to come back.

Spotted a problem on this page? Tell us
Directional Derivatives and the Gradient · Mathematics, ages 19 to 20 · LightMySky