A function provides a numerical value for each point.

The gradient of a function represents its direction-dependent rate of change.


Example

A lunar lander is supposed to set down at the indicated point on the Moon's surface. The lander is designed with extendible landing struts that can adjust to level the lander. The base of the lander is six meters across and each strut can adjust its length by one meter.

The surface near the landing point is modeled by a height function of the form P(x,y)exp(-x2-y2) where x,y are map coordinates around the landing site (at x=0, y=0) and P is a polynomial that is chosen to fit what has been measured by the landing radar. In this case, the surface height, relative to a surface of constant gravitational potential, is given by

Zoom in by 200% and adjust to a realistic vertical scale. Now things do not look quite so bad but we still need to look at what will happen very near the landing site. For dx and dy sufficiently small,

Because the landing legs only have one meter of travel, we are interested in plotting where the height is down by a half meter and where it is up by a half meter. Those contour lines are approximated locally by

where dx and dy are in meters.

Plot these lines and superimpose the lander on them.

Evidently we need to choose a different landing site.