# Gradients in 2D and 3D

Gradients in 2D and 3D

For a smooth surface in 3D, representing a function , the gradient at a point on is a vector in the direction of maximum change of . Also shown is the corresponding contour plot, which is the projection of onto the - plane. The red arrows on the surface and contour plots show the magnitude and direction of the gradient.

S

z=f(x,y)

(,)

x

0

y

0

S

f(x,y)

S

x

y

The dot shows the point at which the gradient is computed. You can vary the point by dragging the locator.

(,)

x

0

y

0

Change the function with the pull-down menu.

Rotate the graph to convince yourself that the gradient is normal to the surface at the point.