Although we are motivated by our experiences hiking and the three dimensional pictures that help us visualize functions of the form
everything we do in this module applies to functions of the form
with n independent variables.
In this situation we define n partial derivatives by

We also define a new vector, called the gradient vector, by

We are interested in the rate at which z changes as we move away from x in various different directions. Each possible direction is indicated by a unit vector,
The directional derivative in the direction u is given by

Sometimes we use the notation fu for the directional derivative.
In Multivariable Calculus, Linear Algebra, and Differential Equations in a Real and Complex World we prove that if all the partial derivatives of the function f are continuous then
Since u is a unit vector and
where theta is the angle between grad f and u, we see that the directional derivative is at its maximum when u is pointing in the same direction as grad f and is at a minimum when u is pointing in the opposite direction. Thus, the direction of steepest ascent is grad f and the direction of steepest descent is -grad f.
Compute the gradient of each of the following functions. This gives us a vector at each point (x, y) that is pointing uphill. Use your CAS window to draw a picture showing these vectors. This picture is called a vector field. Compare the vector field with a three-dimensional plot of the indicated function. Does the vector field appear to be pointing upward?