The slope depends on the direction
Take the dome and stand at the point (0.5, 0.36), at height 9.93. The gradient there is . It points toward the summit at the origin, and its length, , is the steepest slope available from that point.
Set off due south instead, along u = (0, −1). The summit lies partly south of you, so you still climb, but the slope that way is only 11.52. The slope of a surface in a chosen direction u is the directional derivative of f in that direction.
The dome seen from above, cut at heights 4, 8 and 12. At (0.5, 0.36) the gold arrow is , of length 19.72, and the plain arrow u points due south. The dashed line drops the tip of square onto u, and the gold bar along u is the part of in that direction: the slope due south, 11.52.
One part in each direction
Walk a distance t along the unit vector u = (a, b). Then and , so x changes at the rate a and y at the rate b. By the chain rule for partial derivatives, the height changes at the rate : each part of the step is multiplied by its own partial derivative, and the two add.
That sum is the dot product of with (a, b). So the slope in the direction u is . At the point on the dome, due south is a = 0 and b = −1, and the slope is (−16) × 0 + (−11.52) × (−1) = 11.52.
A unit vector first
The variable t above is the distance walked only because u has length 1. A direction is often given as a displacement instead, so divide it by its length first.
For at (1, 2), and , so . Head toward the point (4, 6): the displacement is (3, 4), its length is 5, and the unit vector is u = (0.6, 0.8). The slope is 4 × 0.6 + 1 × 0.8 = 3.2. Using the displacement itself gives , five times too big, because (3, 4) is five units long.
A difference quotient agrees: f(1 + 0.6h, 2 + 0.8h) − f(1, 2), divided by h, comes to 3.2 for small h.
Steepest, gentlest, level
For a unit vector u, , where is the angle between and u. The slope is greatest, , when , along the gradient; it is least, , when , straight downhill; and it is 0 when .
For at (1, 2), . Toward (4, 6) the slope 3.2 is of that, with . Along , at right angles to (4, 1), the slope is .
On the dome, due south makes an angle of 54.25° with , and 19.72 × cos 54.25° = 11.52. Turning to 125.75°, measured from east, puts u at right angles to , and the slope is 0.
The same point with u turned to 125.75°, at right angles to . The tip of drops onto u at the starting point itself, and a square corner marks the right angle: the part of along u is 0, and u is tangent to the contour through the point.
Why contours are level
A contour is a curve along which the height does not change, so the slope along it is 0. Where is not zero, the slope is 0 only in the two opposite directions at right angles to . So the contour through a point runs at right angles to there, and the gradient crosses every contour square on.
Du f = ∇f · u = |∇f| cos φ = 2.83 × 0.71 = 2: the slope in the direction u is the gradient's length scaled by the cosine of the angle between them
Turn u along the contour until Du f = 0
Contours of , with P at (1, 2), where , of length 2.83. The unit vector u points straight up, at 45° to , and the meter reads the slope . Turn u to 45° and it reads 2.83, the length of ; turn it to 135°, along the dashed tangent to the contour, and it reads 0.
The usual mistakes
Leaving the direction unnormalized. For at (1, 2) toward (4, 6), (3, 4) gives 16; the unit vector (0.6, 0.8) gives the slope, 3.2.
Adding the partial derivatives whole. With and u = (0.6, 0.8), the slope is 15 × 0.6 + 20 × 0.8 = 25, not 35: each partial counts only for its own share of the step.
Swapping the shares. The 0.6 goes with , because 0.6 of the step lies along x: 15 × 0.8 + 20 × 0.6 = 24 is the slope in a different direction.
Calling the gradient the fall line. points uphill; straight downhill is , where the slope is .
A skier
In the application below, the height of a ski slope is a function of position. The gradient at the skier, dotted with the unit vector toward a lift, gives her rate of descent as she sets off, and setting equal to a gentler rate gives the angle of a traverse.
Worked example: A Skier Heading for the Lift Across a Gully: Her Rate of Descent as She Sets Off, and a Gentler Traverse
Question On a ski slope, the height of the snow at the point x meters east and y meters north of a marker is h(x, y) = 1800 + 0.0004x2 − 0.32y meters above sea level, for −500 ≤ x ≤ 500 and −1000 ≤ y ≤ 2000: a broad gully that runs downhill to the north. A skier stands at (300, 0). (a) She sets off toward a lift station 800 meters west and 600 meters north of her. Find the rate at which her height changes, in meters per meter, as she sets off, and compare it with the steepest rate of descent at that point. (b) She would rather traverse, descending at 0.2 meters per meter. Find the angle between such a traverse and the fall line, the direction of steepest descent, and the two directions, as unit vectors, in which she could set off.
1.(a) The partial derivatives are ∂ h∂ x = 0.0008x and ∂ h∂ y = −0.32, so at (300, 0) the gradient is ∇ h = (0.24, −0.32). Its length is √0.0576 + 0.1024 = √0.16 = 0.4.
(a) The curves are contours 50 meters apart, and the ground falls toward the north, which is up the page. At the skier the gradient is ∇ h = (0.24, −0.32), of length 0.4. 2.The lift station is √8002 + 6002 = 1000 meters away, so the unit vector toward it is u = (−0.8, 0.6). The directional derivative is ∇ h · u = 0.24 × (−0.8) + (−0.32) × 0.6 = −0.192 − 0.192 = −0.384: she sets off descending 0.384 meters for each meter she travels.
Toward the lift the unit vector is u = (−0.8, 0.6), and her height changes at ∇ h · u = −0.384 meters per meter. 3.The steepest descent is along the fall line, −∇ h0.4 = (−0.6, 0.8), at the length of the gradient, 0.4 meters per meter. Her direction is close to the fall line: the angle θ between them has cosθ = 0.3840.4 = 0.96, so θ ≈ 16°.
The fall line, (−0.6, 0.8), is the direction of steepest descent, 0.4 meters per meter; the way to the lift is about 16° off it. 4.(b) Along a unit vector at an angle θ to the fall line, the height falls at 0.4cosθ meters per meter. Setting 0.4cosθ = 0.2 gives cosθ = 0.5, so θ = 60°, on either side of the fall line.
(b) A descent of 0.2 meters per meter is half the steepest, so cosθ = 0.5 and each traverse makes 60° with the fall line. 5.Turning (−0.6, 0.8) through 60° each way, with cos 60° = 0.5 and sin 60° = √32, gives (−0.3 − 0.4√3, 0.4 − 0.3√3) ≈ (−0.99, −0.12) and (−0.3 + 0.4√3, 0.4 + 0.3√3) ≈ (0.39, 0.92). Check the second: 0.24 × 0.39 − 0.32 × 0.92 = 0.0936 − 0.2944 ≈ −0.2.
The two traverses set off along about (−0.99, −0.12), toward the floor of the gully, and (0.39, 0.92), a little east of north.
Answer: (a) she descends 0.384 meters per meter, just under the steepest descent at that point, 0.4 meters per meter; (b) 60° from the fall line, setting off along about (−0.99, −0.12) or (0.39, 0.92)
Common mistakes
- Using the displacement (−800, 600) in place of a unit vector and getting a rate of −384. A directional derivative needs a unit vector; dividing the displacement by the distance, 1000 meters, gives the rate per meter.
- Taking the fall line to be the direction of the gradient, (0.6, −0.8). The gradient points the way the height rises fastest, which is uphill; the fall line is the opposite direction.