Section 2.2 · Topic 2 of 8
2.2.2 Gradient
Look at the contour map of Figure 2.2.2. The function is the height of the ground, and each thin line joins points of equal height. If you stand somewhere on the slope, there is one direction that leads most steeply uphill (the direction a ball released there would roll down, reversed), and the steepness in that direction is a number. The gradient is the vector that combines the two: it points straight uphill, and its length is the steepness.
When the nabla operator is applied to a scalar function , the resulting vector function is called the gradient of :
The gradient turns a scalar field into a vector field. Each component is simply the slope of along one axis. The formula is easy to apply, but what it means (the picture of Figure 2.2.2) follows from asking how much changes when we take a small step in an arbitrary direction.
The directional derivative
We proceed in two steps: first the change of in a small step, then the rate of change per unit length. Let us move from a point by a small displacement
where is the length of the step and its direction. By the chain rule of multivariable calculus (a first-order Taylor expansion), the change of is the sum of the changes due to each coordinate,
where the last form is just the dot product (2.1.5) of with . Dividing by we obtain the rate of change of per unit distance in the direction , the directional derivative
where is the angle between and the direction of the step (we used the geometric form (2.1.7) of the dot product and ). Three facts follow at once from (2.2.4):
- The rate of increase is largest when , i.e. when we step in the direction of , and its maximum value is . Stepping against the gradient () gives the fastest decrease.
- For the rate is zero: moving perpendicular to does not change . The points where has a fixed value form a level surface (in two dimensions, a level curve or contour line). Any step within a level surface has , so is perpendicular to the level surfaces.
- If neighbouring level surfaces and are separated by the normal distance , then , i.e. : the gradient is long where the level surfaces crowd together and short where they are far apart.
The gradient of is a vector that represents both the direction and the magnitude of the maximum rate of increase of . It is normal to the level surfaces of , and the rate of change of in any direction is its projection, .
The gradient is the "uphill arrow". It points the way grows fastest, it stands at right angles to the lines (surfaces) of constant , and it is long where changes quickly. To find how fast changes in any other direction, project the uphill arrow onto that direction.
Move the point over the hill below and turn the step direction: the gradient arrows cross the contours at right angles, and the directional derivative is largest along and zero along a contour line.
As a simple illustration take , whose level curves in the -plane are circles centred on the -axis. Then , which points radially outward, perpendicular to the circles, and has magnitude . It grows outward, just as the circles for equally spaced values of crowd together outward. The same picture appears on the left of Figure 2.2.10.
In electrostatics the scalar field will be the electric potential , measured in volts, and the electric field will turn out to be in (Section 3.3): the field points in the direction in which the potential decreases fastest ("downhill" on the potential map), and it is perpendicular to the equipotential surfaces.
For , at the point : in which direction does increase fastest, and at what rate? What is the rate of change of in the direction ?
at . Fastest increase along , at the rate per unit length. Along : ( does not depend on ).
Writing the gradient as a sum of numbers, . The gradient is a vector, so each partial derivative must carry its unit vector. The scalar sum of the three partial derivatives has no geometric meaning.