Introduction
A directional derivative gives the instantaneous rate of change of a scalar function when moving from a point in a particular direction. Often the direction is given and the rate is calculated. Here we reverse the problem: given a desired rate, we find the unit directions that produce it.
This is a dot-product problem with a geometric constraint. A direction must have length one, and its dot product with the gradient must equal the prescribed rate. Depending on the rate, there may be no such direction, exactly one, or many.
The Directional Derivative as an Equation
Let \(f:\mathbb{R}^n\to\mathbb{R}\) be differentiable at a point \(\mathbf{p}\), and let \(\mathbf{u}\) be a unit vector. The directional derivative of \(f\) at \(\mathbf{p}\) in the direction \(\mathbf{u}\) is the rate of change along that direction. For a differentiable function, it is computed using the gradient:
Write \(\mathbf{g}=\nabla f(\mathbf{p})\), and let \(c\) be the prescribed rate. Finding the desired directions means solving
The first equation requires the direction to give the requested rate. The second requires that the direction have unit length. Both conditions matter: a vector with the correct dot product is not necessarily a valid direction unless it is also a unit vector.
When Is the Rate Attainable?
Suppose the gradient is not zero, and write \(G=\|\mathbf{g}\|\). A unit vector can have a dot product with \(\mathbf{g}\) no greater than \(G\) and no less than \(-G\). Thus a necessary condition for attaining \(c\) is \(|c|\leq G\).
In two or more dimensions, that condition is also sufficient: every rate between the negative and positive gradient magnitudes is attained by at least one unit direction. The number and arrangement of directions depend on whether the rate is strictly between the endpoints or equals one of them.
Deriving the Complete Set of Directions
The existence condition tells us whether a solution is possible. We can also describe every solution. The key is to separate a candidate direction into a part parallel to the gradient and a part perpendicular to it.
Let \(\mathbf{e}=\mathbf{g}/G\), so \(\|\mathbf{e}\|=1\) and \(\mathbf{g}=G\mathbf{e}\).
Write \(\mathbf{u}=\alpha\mathbf{e}+\mathbf{v}\), where \(\mathbf{v}\cdot\mathbf{e}=0\).
Since \(\mathbf{g}\cdot\mathbf{u}=G\alpha\), the prescribed rate forces \(\alpha=c/G\).
The two components are perpendicular, so \(1=\|\mathbf{u}\|^2=\alpha^2+\|\mathbf{v}\|^2\). Therefore \(\|\mathbf{v}\|=\sqrt{1-c^2/G^2}\), provided \(|c|\leq G\).
Combining these steps gives the complete description. Choose any vector \(\mathbf{w}\) perpendicular to \(\mathbf{g}\) with the required length; adding it to the prescribed parallel component gives a solution.
This also proves the theorem’s sufficiency claim. If \(|c|\leq G\), the square root is real. In dimension at least two, there is a direction perpendicular to the nonzero gradient, so a perpendicular vector of the required length can be chosen. The resulting vector has length one and dot product \(c\) with the gradient. If \(|c|>G\), the required perpendicular length would not be real, and no solution exists.
The geometry depends on the dimension. In two dimensions, for a rate strictly between \(-G\) and \(G\), there are two possible perpendicular components, giving two directions. At either endpoint the perpendicular component is zero, leaving just one direction. In three dimensions, a nonzero perpendicular component can point in any direction around the gradient axis, so the solutions form a circle. In every dimension, the endpoint rates have a unique direction: \(\mathbf{e}\) for \(c=G\), and \(-\mathbf{e}\) for \(c=-G\).
Worked Example: Two Directions in the Plane
Worked Example: Two Directions in the Plane
Let \(f(x,y)=3x+4y\). Find all unit directions at \((0,0)\) in which the directional derivative is \(3\).
The partial derivatives are \(f_x=3\) and \(f_y=4\), so the gradient at the point is \(\mathbf{g}=(3,4)\). Its magnitude is \(G=\sqrt{3^2+4^2}=5\). Since \(|3|\leq5\), the requested rate is attainable.
A unit vector in the gradient direction is \(\mathbf{e}=(3/5,4/5)\). A perpendicular unit vector is \(\mathbf{n}=(-4/5,3/5)\), since \((3/5)(-4/5)+(4/5)(3/5)=0\). The parallel component of a solution is \((c/G)\mathbf{e}=(3/5)(3/5,4/5)=(9/25,12/25)\). The perpendicular component must have length \(\sqrt{1-3^2/5^2}=\sqrt{16/25}=4/5\). In two dimensions, it is either \((4/5)\mathbf{n}\) or \(-(4/5)\mathbf{n}\).
Check the lengths: \(\|\mathbf{u}_1\|=\sqrt{(-7/25)^2+(24/25)^2}=\sqrt{625/625}=1\), and \(\|\mathbf{u}_2\|=\sqrt{1^2+0^2}=1\). Check the rates: \((3,4)\cdot(-7/25,24/25)=(-21+96)/25=3\), and \((3,4)\cdot(1,0)=3\). Both directions satisfy both required conditions.
Worked Example: A Circle of Directions in Three Dimensions
Worked Example: A Circle of Directions in Three Dimensions
Let \(f(x,y,z)=2z\). Find all unit directions at \((0,0,0)\) for which the directional derivative is \(1\).
The gradient is \(\mathbf{g}=(0,0,2)\), with magnitude \(G=2\). A general direction \(\mathbf{u}=(u_1,u_2,u_3)\) gives rate \(\mathbf{g}\cdot\mathbf{u}=2u_3\). Setting this equal to \(1\) gives \(u_3=1/2\). The unit-length condition then gives \(u_1^2+u_2^2+1/4=1\), so \(u_1^2+u_2^2=3/4\).
Therefore all solutions can be written using an angle \(\theta\):
For every such \(\theta\), the squared length is \((3/4)(\cos^2\theta+\sin^2\theta)+1/4=1\), and the rate is \((0,0,2)\cdot\mathbf{u}(\theta)=2(1/2)=1\). Thus the directions form a circle, and each one has the prescribed rate.
Worked Example: An Unattainable Rate
Worked Example: An Unattainable Rate
For \(f(x,y)=3x+4y\), can a unit direction at \((0,0)\) produce rate \(6\)?
The gradient is \(\mathbf{g}=(3,4)\), so \(G=\sqrt{9+16}=5\). For any unit vector \(\mathbf{u}\), the dot-product bound gives \(|\mathbf{g}\cdot\mathbf{u}|\leq\|\mathbf{g}\|\|\mathbf{u}\|=5\cdot1=5\). A rate of \(6\) exceeds this bound, so there is no solution.
The same conclusion follows from the direction decomposition: its required perpendicular component would have length \(\sqrt{1-6^2/5^2}=\sqrt{-11/25}\), which is not real. The rate \(6\) is therefore unattainable in any unit direction.
Worked Example: A Zero Gradient
Worked Example: A Zero Gradient
Let \(f(x,y)=x^2+y^2\), and consider the point \((0,0)\). Determine which prescribed rates can be obtained there by unit directions.
The gradient is \(\nabla f=(2x,2y)\), so \(\nabla f(0,0)=(0,0)\). For every unit vector \(\mathbf{u}=(u_1,u_2)\), the directional derivative is \((0,0)\cdot(u_1,u_2)=0\). Hence every unit direction gives rate zero, and no direction gives any nonzero rate.
For example, \((1,0)\) is a unit vector and gives rate \(0\cdot1+0\cdot0=0\). The vector \((0,1)\) is also a unit vector and gives rate \(0\cdot0+0\cdot1=0\). This verifies both the existence of directions for rate zero and the fact that the rate is independent of direction here.
A Common Mistake: Forgetting to Normalize
The dot-product equation applies to a unit direction. Using an arbitrary vector in its place can give a different rate. For example, with gradient \((3,4)\), the vector \((1,1)\) has dot product \(3+4=7\). It is not a unit vector: its length is \(\sqrt{2}\). Treating \(7\) as the directional derivative in that direction is incorrect.
The corresponding unit vector is \((1/\sqrt{2},1/\sqrt{2})\), and its actual directional derivative is
not \(7\). If the desired rate is \(3\), the unnormalized equation \(3v_1+4v_2=3\) alone does not guarantee a valid direction. The solution must also satisfy \(v_1^2+v_2^2=1\).
Why This Method Is Useful
Prescribing a rate makes the gradient’s geometry practical: the gradient determines which rates are possible, while the perpendicular component determines how many directions can realize a rate. A rate equal to the gradient magnitude forces motion along the gradient; the negative of that rate forces motion directly opposite it. Intermediate rates allow directions tilted away from those two extremes.
When solving a problem, first evaluate the gradient at the specified point and compute its magnitude. Compare the absolute value of the requested rate with that magnitude before searching for directions. If the rate is feasible, impose the dot-product equation and the unit-length condition together, then check both conditions in the final answer. This avoids spending time on an impossible rate or accepting a nonunit vector as a direction.
Check Your Understanding
Use the gradient and the unit-length condition to answer the following.
- If the gradient at a point is \((6,8)\), which prescribed rates are attainable by unit directions?
- For a nonzero gradient in two dimensions, how many directions give a rate strictly between the negative and positive gradient magnitudes?
- Why do the directions producing a fixed intermediate rate form a circle in three dimensions?
- If the gradient is zero, what rates can unit directions produce?
- For gradient \((3,4)\), explain why the vector \((1,1)\) cannot be used directly as a unit direction.