We introduce a way of analyzing the rate of change in a given direction.

We can now interpret as either:

- the slope of the hill if we walk along it in a direction parallel to the -axis.
- the instantaneous rate of change of at as we approach along the line .

We have a similar interpretation of . However, there is no reason that we *must*
approach along a line that is parallel to one of the coordinate axes. What if
we want to approach along *any* line? Consider, for example, this line:

Indeed, once we are at a point on the surface above , there are actually many different directions that we can travel along the hill. Let’s consider a line that passes through as our path in the domain. Our rate of change will be given by where the “run” is the distance traveled along the line and the “rise” is the corresponding change in the -values of the function. Since we are ultimately concerned about a curve on the surface, a good first step is to parameterize the line in the domain, then use the function to find a parametric description of the curve on the surface above .

In order to make computing the run most efficiently, we pick a unit vector in the direction is drawn. We’ll see how to do this in the next example, but we can always start at and draw a unit vector that extends from along .

To find a parameterization of , note that is parallel to and is a point on the line, so letting denote the parameter, a description of is given by

For the sake of example, let (a similar argument can be given if ). One convenient consequence of using a unit vector in the direction of is that the “run,” which is the distance between and is simply since and is a unit vector.

The “rise” is computed by noting that it is the corresponding change in -values.

These are shown in the image below.

To find the instantaneous rate of change, we take the limit as goes to (since is
differentiable, it can be shown this limit must exist). We call the result the
*directional derivative of at in the direction * and will henceforth denote this by .
Let’s give a formal definition.

*unit*vector and a point in the domain of , we define the

**directional derivative**of at in the direction , as:

In essence, is the instantaneous rate of change of at as we approach in the direction of .

There’s a quick way to compute this limit by using the gradient vector. We first give the result and save the derivation of the formula until the end of the section.

- Finding
Vectors have both a magnitude and a direction. We’ve seen that it is much more challenging to find a vector in the appropriate direction than it is to scale a vector appropriately, so let’s start by finding a vector parallel to the line .

There are many ways we can do this and one such way is to parameterize the line. Since we can explicitly find , we set and . A parameterization is thus

Now, we need a -value for which , . By inspecting the first component of the parameterization, we find . Thus, a vector parallel to the line will be . We note

So . This is the vector we will use to be parallel to the line. We now note that isis not a unit vector.

We find the unit vector the usual way by computing

- Finding .
Since , we find and , so

Thus, .

Now, using the formula gives .

### Directions of initial change

Consider a surface defined by . Given a particular point on the surface where , there are a few questions we can ask.

- In which initial direction should we travel from if we want to head up the surface the fastest?
- In which initial direction should we travel from if we want to head down the surface the fastest?
- In which direction should we travel if we do not want our current elevation to change?

The following theorem answers these questions. We state the theorem for functions , but it actually holds for functions from to .

- The initial direction of greatest increase is in the direction of .
- The initial direction of greatest decrease is in the direction of .
- The initial directions of no change are orthogonal to .

*every*possible direction we can travel from the point along the surface. This may seem daunting, but remember that we have a nice formula for the directional derivative as a dot product, and dot products capture important geometric information. Since is a unit vector, , and thus To find the initial direction of greatest increase, we need to find a choice for that makes as large as possible. Since this occurs when . This means that a vector that points in the initial direction of greatest increase is parallel to the gradient vector.

As another upshot, we actually know exactly what the maximum rate of increase is at too. It’s .

We can use similar logic to determine that the maximum rate of decrease, or the “most negative” rate of change occurs in the direction opposite the direction of the gradient vector, and that this most negative rate of change is .

To tackle the direction of no change, we need to find the directions for which . Once again, the formula comes to the rescue. Setting gives that , which means that the directions of no change are parallelorthogonal to .

We first compute the gradient. Since ,

- so .
- , so .

Thus, . We can now use this to find the requested directions and rates.

- The initial direction of greatest increase is in the sameoppositeorthogonal direction of the gradient. Since , a unit vector in the direction of greatest increase is and the maximum rate of change is .
- The initial direction of greatest decrease is in the sameoppositeorthogonal direction of the gradient. A unit vector in the direction of greatest increase is and the greatest rate of decrease is .
- There are two unit vectors in the initial direction of no change. To see why,
note that , so both the vectors and are orthogonal to (Notice that for
two dimensional vectors, we can always find a vector orthogonal to a
given one by inspection; just flip the components and negate one of
them).
The magnitude of both and is , so the two unit vectors in the initial direction of no change are and .

### The formula for the directional derivative

We conclude this section by giving the derivation of the formula

Since our function is differentiable, we know that when we “zoom in” on the graph of the surface , the surface looks like its tangent plane, , which is mathematized in the definition of differentiability below.

We have seen that we can use the gradient to write the formula for the tangent plane as . Substituting into the above limit gives

Now, recall that the directional derivative requires that we approach along the line .
Since the above limit exists, the result holds along *any* path along which , so it
certainly holds along this path. Letting approach along this path is found by setting
, and the limit is now found by taking . To simplify, we will consider as ; the
argument for the other sided limit is very similar. Now, we update our limit along the
chosen path.

where in the last step, we have used the fact that since is a unit vector.

Recalling that this limit is in the first place gives and since by definition, , we have

We may thus conclude that .