Introduction
A scalar function of several variables assigns one numerical output to each point in its domain. If the input point moves, the output may change. A directional derivative measures the instantaneous change in the function’s value when the input moves along a specified line through a given point.
The key is to turn the motion along a line into a one-variable function. Its ordinary derivative at the starting point is the rate of change we seek. The defining limit also makes clear what the derivative means, when it exists, and how its sign should be interpreted.
Definition: Rate Along a Line
Let \(f:A\to\mathbb{R}\) be a scalar function, where \(A\) contains an open neighborhood of a point \(\mathbf{p}\in\mathbb{R}^n\). Let \(\mathbf{v}\in\mathbb{R}^n\) be a nonzero vector. The line through \(\mathbf{p}\) in the direction \(\mathbf{v}\) can be parameterized as \(\mathbf{p}+t\mathbf{v}\). For sufficiently small \(t\), these points lie in the domain of \(f\).
The numerator records the change in the function’s value after the input moves from \(\mathbf{p}\) to \(\mathbf{p}+h\mathbf{v}\). Dividing by \(h\) gives the average rate of change with respect to the line parameter over that step. Taking the limit as \(h\) approaches zero gives the instantaneous rate at the starting point.
This definition uses a two-sided limit. Thus, values of \(h\) approaching zero from both the positive and negative sides must produce the same finite limit. Some settings use a one-sided limit to describe motion only for positive parameter values; that is a distinct convention, which we will distinguish when needed.
The vector \(\mathbf{v}\) specifies how the line is parameterized, not necessarily a displacement of length one. Consequently, \(D_{\mathbf{v}}f(\mathbf{p})\) is a rate per unit change in the parameter \(h\). If \(\mathbf{v}\) is multiplied by a positive constant, the point moves faster along the same oriented line per unit parameter, and the derivative generally changes by that factor.
Why the Limit Is an Instantaneous Rate
Consider the one-variable function \(g(t)=f(\mathbf{p}+t\mathbf{v})\). It records the values of \(f\) as the input travels along the line, with \(t=0\) corresponding to \(\mathbf{p}\). Applying the ordinary derivative definition to \(g\) at zero gives the following result.
Indeed, by the definition of the one-variable derivative,
The right-hand side is precisely the defining limit for the directional derivative. This proves the result. It also shows that differentiability of \(f\) in every possible direction is not required merely to define one directional derivative: what matters for this limit is the behavior of \(f\) along the particular line.
When \(f\) depends on two variables, say \(f(x,y)\), and \(\mathbf{p}=(a,b)\), \(\mathbf{v}=(v_1,v_2)\), the points on the line have coordinates \((a+hv_1,b+hv_2)\). Therefore the same definition becomes
provided this limit exists. This coordinate form is often convenient for direct calculation.
Worked Examples: Computing and Interpreting the Limit
Worked Example: A Positive Directional Rate
Let \(f(x,y)=x^2+3y\), let \(\mathbf{p}=(1,2)\), and let \(\mathbf{v}=(2,-1)\). Find \(D_{\mathbf{v}}f(1,2)\).
First evaluate the function at the starting point:
Next, move a parameter distance \(h\) along the given vector. The new point is
Evaluate \(f\) there and expand:
Substitute these values into the defining quotient:
for \(h\ne 0\). Hence
The rate is positive, so \(f\) is increasing at the starting point as the input moves in this parameterized direction. As a check, the line restriction is \(g(h)=7+h+4h^2\), whose ordinary derivative is \(g'(h)=1+8h\); thus \(g'(0)=1\), matching the limit.
Worked Example: A Negative Rate and a Change of Scale
Let \(f(x,y)=x^2+y^2\), \(\mathbf{p}=(1,2)\), and \(\mathbf{v}=(-1,0)\). Find the directional derivative and interpret its sign.
The starting value is
The point reached after parameter change \(h\) is \((1-h,2)\). Therefore
The difference quotient and its limit are
so
The negative value means the function decreases instantaneously as \(h\) increases from zero along this line. To check, the line restriction is \(g(h)=5-2h+h^2\), so \(g'(h)=-2+2h\) and \(g'(0)=-2\).
Now replace the vector by \(\widetilde{\mathbf{v}}=(-3,0)=3\mathbf{v}\). The point becomes \((1-3h,2)\), and
Thus its difference quotient is \((-6h+9h^2)/h=-6+9h\), giving \(D_{\widetilde{\mathbf{v}}}f(1,2)=-6\). This agrees with the faster parameterized motion: the rate is three times \(-2\). The sign remains negative because the oriented direction has not changed.
Interpreting the Value and Its Units
The sign and magnitude answer different questions. A positive directional derivative means the function increases instantaneously as the parameter increases; a negative derivative means it decreases; and a zero derivative means there is no first-order change along that line at the point. The magnitude measures how rapidly the output changes per unit change in the line parameter.
For example, if \(f\) represents temperature and the line parameter measures seconds, the derivative has units of temperature per second. If the parameter instead measures distance along the line, the rate has units of temperature per distance. The vector determines the input displacement associated with one unit of parameter, so interpreting the rate requires knowing how that parameter is being used.
A zero directional derivative does not, by itself, say that \(f\) is constant along the whole line. It only says that the instantaneous rate at the specified point is zero. Likewise, a positive rate at one point does not guarantee that the function increases over a long interval; its rate could change farther along the line.
When the Two-Sided Directional Derivative Fails
Worked Example: A One-Sided Rate Without a Two-Sided Derivative
Let \(f(x,y)=|y|\), \(\mathbf{p}=(0,0)\), and \(\mathbf{v}=(0,1)\). Along this line, the input is \((0,h)\). Since \(f(0,0)=0\), the difference quotient is
For \(h>0\), this quotient equals \(1\). For \(h<0\), it equals \(-1\). The two one-sided limits are therefore
Because they are unequal, the two-sided directional derivative does not exist. Under a one-sided convention, the rate for positive \(h\) would be \(1\). The check is direct: the line restriction is \(g(h)=|h|\), which has unequal left and right derivatives at zero.
This example emphasizes that evaluating the quotient on only one side is not enough for the two-sided definition. A finite answer from positive \(h\) does not establish that the two-sided directional derivative exists.
A Common Mistake: Forgetting to Divide by the Parameter Change
In the negative-rate example, the change in function value was \(-2h+h^2\). A tempting but incorrect calculation is to let \(h\) approach zero in this change and conclude that the rate is zero:
This computes the limiting change in the function value, not the rate of change. The derivative requires dividing that change by \(h\) before taking the limit:
The division removes the scale of the small parameter step and reveals the instantaneous rate. Always form the complete difference quotient first, simplify it for \(h\ne 0\), and only then take the limit.
Check Your Understanding
Use the line-limit definition in each question. Pay attention to whether the limit is two-sided and to what the parameter measures.
- For \(f(x,y)=x+2y\), \(\mathbf{p}=(1,0)\), and \(\mathbf{v}=(1,1)\), write the difference quotient and compute the directional derivative.
- In the definition of \(D_{\mathbf{v}}f(\mathbf{p})\), what does a negative value tell you about the function as \(h\) increases from zero?
- If the direction vector is replaced by \(3\mathbf{v}\), what happens to the parameterized path and its rate, when the directional derivative exists?
- For \(f(x,y)=|y|\) at \((0,0)\) in direction \((0,1)\), why does the two-sided directional derivative fail to exist?
- What is the difference between the change \(f(\mathbf{p}+h\mathbf{v})-f(\mathbf{p})\) and the difference quotient used to define a directional derivative?