Directional Derivative
Stand anywhere in a scalar field — a temperature map, an electric potential, the altitude of a mountainside — and pick a direction to walk. How fast does the field change beneath your next step? That single question defines the directional derivative, : the instantaneous rate of change of per unit length as you move through a point along a chosen unit vector . It depends on two things at once — how the field is arranged near you, and which way you decided to go — so at first sight it looks like an infinite family of numbers, one slope for every heading on the compass. The organizing miracle of the topic is that this infinite family collapses into a single vector. For any field differentiable at the point, every directional derivative is just the gradient projected onto the heading, . Knowing one arrow, , is the same as knowing the slope in every direction at once: dot it with your heading and read off the answer, no new limit required. Written geometrically, , the formula says the field climbs fastest straight along the gradient, holds dead level along the surfaces , and falls fastest in the opposite direction. This is the seed from which all of vector calculus grows. The gradient operator, and after it the divergence, curl and Laplacian, are built on it, and the operator that transports and advects fields — the convective derivative of a fluid, the drift term of a Fokker–Planck equation, the tangent map of automatic differentiation — is the same directional derivative wearing working clothes.
- The directional derivative is the rate of change of a scalar field per unit length as you move through a point along a unit vector — the slope you feel underfoot facing that way.
- For a field differentiable at the point it equals the gradient projected onto the heading: . One vector encodes the slope in every direction.
- Geometrically , so the field rises fastest along (rate ), is flat along level surfaces (), and falls fastest opposite the gradient.
- Partial derivatives are the special case : .
- Concrete anchor: for at , , , and heading along the -axis gives .
- Key idea: the directional derivative is the gradient projected onto a direction, . One vector field, the gradient, simultaneously encodes the rate of change of the scalar along every possible heading.
Where this lives today
The directional derivative is not a museum piece of vector calculus; it is executed billions of times a second inside modern machine learning. Forward-mode automatic differentiation — the "jvp" (Jacobian-vector product) in frameworks such as JAX and PyTorch — computes precisely exactly and cheaply, propagating a directional perturbation through a computation graph in one sweep; reverse-mode (backpropagation) instead assembles the full gradient , whose steepest-descent direction each optimiser step then follows. The extremal property proved above — that is the locally fastest-decreasing heading — is the entire justification for gradient descent, Adam, and their kin. Beyond optimisation, the operator is the transport term of physics: the convective derivative in the Navier–Stokes and Euler equations, the drift in the Fokker–Planck and Liouville equations, and the advection kernel of every computational-fluid-dynamics and weather-prediction code. Level-set methods in computer vision and computational geometry track evolving fronts precisely by exploiting that is normal to the level surface . And the same normal-gradient fact lets a materials scientist read crystallographic orientation, or a cartographer read a slope map, straight off the contours.
The physical picture
Picture a topographic map in which is altitude. Stand at a point and choose a compass heading . The directional derivative is the slope you feel underfoot the instant you start walking that way: steepest uphill if you face straight up the fall line, flat if you stroll along a contour, steepest downhill if you turn around. The gradient is the single arrow that points straight uphill; it is perpendicular to the contour through your feet because along a contour the altitude does not change. Every other slope is just the shadow of that one arrow cast onto your heading — a dot product, nothing more. The first figure fixes this with real numbers, using the field whose contours are circles.
Because the answer is , swinging your heading around the full circle traces out a cosine: full steepness ahead of you, zero to the sides, reversed steepness behind. That cosine is the entire content of the directional derivative, and the second figure plots it for the same point, where . The three landmarks on the curve are the whole story of the gradient — its peak is steepest ascent, its zeros are the tangent directions that keep you on a level surface, and its trough is steepest descent, the heading that gradient-descent optimisers chase.
The core equations
The starting point is a limit that says nothing more than "rise over run" in the limit of an infinitesimal run. Step a signed distance along the unit heading , measure the change in , divide by , and let .
where: — scalar field ; — the point at which the rate is evaluated; — unit direction vector, ; — signed step length along . Read it as the ordinary derivative of restricted to the straight line through in the direction . For any field differentiable at that limit is computed once and for all by the gradient. This projection formula is the theorem the whole topic turns on: the directionally varying limit becomes a fixed inner product.
where: — the gradient of , the vector of first partial derivatives; — the Euclidean inner product. Read it as: build once at the point, then every heading's slope is a single dot product away. The same statement in polar language exposes the geometry. Writing the dot product in terms of magnitudes and the enclosed angle turns equation (2) into a cosine law of steepness.
where: — the magnitude of the gradient, the maximum possible rate of increase; — the angle between and the heading . Read it as: the slope you feel is the full steepness scaled by how squarely you face uphill. To use any of this you need the gradient in coordinates. In Cartesian axes it is simply the list of partial derivatives, assembled into a vector.
where: — the orthonormal Cartesian basis vectors. Read it as: each component of reports how changes as you move along one coordinate axis. Contracting the gradient with a heading before it acts on anything produces a scalar differential operator — the directional derivative promoted from a number to a machine that can differentiate any field along .
where: — the Cartesian components of . Read it as a rate-of-change-along- operator; feed it and it returns , and it is exactly the transport operator of fluid dynamics with in place of . Iterating that operator generates the Taylor expansion of the field along the line. Each successive term is a higher directional derivative, so is the engine of local approximation.
where: — the second directional derivative, the curvature of along . Read it as the one-dimensional Taylor series of seen from the moving observer, with the operator supplying each derivative in . Finally, because it is built from a linear limit, the directional derivative inherits the two rules every derivative obeys — linearity in the field, and the Leibniz product rule.
where: — real constants; — scalar fields. Read it as the licence to differentiate sums term by term and products by the familiar "this-times-derivative-of-that plus that-times-derivative-of-this".
The goal is to prove the central identity for any field differentiable at the point, converting the direction-dependent limit of equation (1) into a fixed dot product with the gradient. The trick is to collapse the multivariable limit onto a single straight line through , turning it into an ordinary one-variable derivative to which the chain rule applies cleanly.
Step 1. Restrict to the line and define the one-variable function ; then the definition (1) is literally . Why: the directional derivative asks only how behaves along one ray, so nothing is lost by throwing away every direction but and studying a function of the single parameter .
Step 2. Differentiate with the multivariable chain rule. The -th coordinate along the ray is , moving at rate , so . Why: differentiability at the point is exactly what guarantees the chain rule holds and the composite is differentiable, and it is where the hypothesis of the theorem is spent.
Step 3. Evaluate at and recognise the sum. Since is the component-by-component product of and , we get . Why: the inner product is nothing but the bookkeeping that adds up each axis's contribution weighted by how much of the heading points along it.
Step 4. Read off the geometry by writing the dot product in polar form, using . Why: this is where the unit-vector requirement earns its keep — a non-unit heading would multiply the answer by its length and overstate the rate. *For example, with at , and heading give , which matches the limit directly from the definition.*
Go deeper · Derivation B · 1 minSteepest ascent lies along the gradient
The goal is to show that, among all unit headings, the one pointing along the gradient maximises the directional derivative, and that its value is exactly — the fact that makes the direction of steepest ascent and the direction of steepest descent used by every gradient-based optimiser. We optimise the scalar over the unit sphere of directions, with the point held fixed so that is a constant.
Step 1. Start from the geometric form . At a fixed point is a fixed non-negative number, so the only thing the heading controls is the angle it makes with the gradient. Why: separating the fixed magnitude from the steerable angle reduces a vector optimisation to a one-variable question about .
Step 2. Bound the cosine: for every real angle. Hence across all headings. Why: the directional derivative can never exceed the gradient's magnitude in size — the gradient sets a hard speed limit on how fast the field can change per unit step.
Step 3. Attain the maximum. Equality holds precisely when , i.e. , giving ; the minimum occurs at , antiparallel to . Why: this is the operational meaning of the gradient — not merely "a" uphill direction but the uniquely steepest one, with its length reporting that steepest slope. *As a check: at the rate is zero (motion along a level surface) and at it is , consistent with the cosine curve of the second figure and with being normal to level surfaces.*
Go deeper · Derivation C · 1 minThe gradient is normal to level surfaces
The goal is to prove that the gradient at a point is perpendicular to the level surface passing through it, by showing that every direction tangent to that surface yields zero directional derivative. This is the geometric backbone of the whole subject: it is why can be read straight off a contour map as the arrow crossing the contours at right angles, and why equipotentials meet field lines squarely.
Step 1. Parametrise any smooth curve that lies entirely within the level surface, so for all . Its velocity is a tangent vector to the surface at the point. Why: to probe "directions within the surface" we let a curve carry us through the point without ever leaving the level set, so the tangent sweeps out exactly the allowed headings.
Step 2. Differentiate the constraint with the chain rule: , because the left side is the derivative of the constant . Why: the right-hand side is precisely a directional derivative along the tangent, so a constant field along the curve forces that directional derivative to vanish.
Step 3. Conclude normality. Since for every tangent to the surface, and the tangents span the surface's tangent plane, is orthogonal to that plane — it is the surface normal. Why: a vector perpendicular to every direction in a plane can only be the plane's normal, pinning the gradient's direction once the level surface is known. *As a concrete check: this is the entry of the limiting-cases table (tangential headings give ), and it recovers that at is radial, hence normal to the circle .*
Limiting cases
The single formula specialises, one landmark angle at a time, into every fact worth memorising about the gradient.
| Case | Result | Meaning |
|---|---|---|
| Along the gradient () | maximal rate of increase; is the direction of steepest ascent | |
| Tangent to a level surface () | motion along gives no first-order change — this is why is normal to level surfaces | |
| Opposite the gradient () | steepest descent — the update direction of gradient-descent algorithms | |
| Along a coordinate axis () | partial derivatives are just directional derivatives along the basis directions | |
| Zero gradient () | for all | a stationary point — every heading is momentarily flat, the condition for extrema |
Worked examples
1 · Directional derivative of a cubic field (fully worked)
Compute the directional derivative of at the point in the direction of .
Step 1. Build the gradient symbolically by differentiating term by term: . The first component comes from , the second from , the third from .
Step 2. Evaluate at : , , and , so .
Step 3. Normalise the heading — this is the step people skip. , so .
Step 4. Project: . The dot product before normalising is ; dividing by gives the result. .
Step 5. Interpret the sign. The value is negative, so decreases as you step along at this point. Sanity check against the steepest-ascent bound: , and indeed lies comfortably inside , as every directional derivative must.
2 · Steepest ascent on a heated plate (fully worked)
A thin metal plate has temperature in °C, with measured in centimetres. At the point , find (a) the rate of temperature change heading straight toward the origin, (b) the direction and rate of steepest heating, and (c) a direction along which the temperature does not change.
Step 1. Gradient: , so at , °C/cm. Its magnitude is °C/cm.
Step 2 (a). The heading toward the origin from is , of length , so . Then °C/cm. Walking toward the centre, the plate warms at about 4.24 °C per centimetre.
Step 3 (b). Steepest heating is along itself: , with maximal rate °C/cm. Steepest cooling is the exact reverse, , at rate °C/cm — the heading a heat-seeking controller would avoid.
Step 4 (c). No change means perpendicular to the gradient: any with . Rotating by 90° gives , so (and its opposite). These point along the local isotherm — the ellipse through — confirming Derivation 3: the zero-rate directions are exactly the tangents to the level curve, normal to . Steepest heating °C/cm along ; no change along .
Physics of the portrait
The directional derivative has no single inventor — it is the point where two centuries of vector calculus converge on one operation, . Its portrait is really the portrait of the gradient and the symbol that carries it.
Origins · 1 minthe gradient and how this was discovered
The idea that a scalar field has a single "steepest-uphill" vector at each point grew slowly out of nineteenth-century efforts to give physics a coordinate-free language. William Rowan Hamilton, in his work on quaternions around 1846, introduced the differential operator later christened nabla (from the Greek word for a Hebrew harp of that shape), writing it as . Peter Guthrie Tait developed its calculus through the 1860s, and James Clerk Maxwell, applying it to potentials in his 1873 Treatise on Electricity and Magnetism, gave its physical reading as the "slope" of a potential — soon universally called the gradient. The modern, quaternion-free vector analysis in which stands as a clean theorem was forged by Josiah Willard Gibbs (whose 1881 privately printed Elements of Vector Analysis introduced the notation still taught) and Oliver Heaviside, and codified in Gibbs and Wilson's 1901 textbook. Running alongside this pure strand is an applied one: Augustin-Louis Cauchy, seeking to solve systems of equations, proposed in 1847 the method of steepest descent — stepping along to drive a function downhill. That single idea, resting entirely on the directional derivative's extremal property, is the ancestor of gradient descent, the workhorse that trains every modern neural network.
Going further
Texts. Arfken & Weber, Mathematical Methods for Physicists, 6th ed., §1.5–1.6 (gradient and directional derivative) · Stone & Goldbart, Mathematics for Physics (Cambridge, 2009), vector-calculus chapter · Riley, Hobson & Bence, Mathematical Methods for Physics and Engineering, 3rd ed., Ch. 10 · Boas, Mathematical Methods in the Physical Sciences, 3rd ed., Ch. 6 · Schey, Div, Grad, Curl, and All That, 4th ed., Ch. II. Key results to keep in mind: the chain-rule derivation yields ; the bound holds for all headings; Example 1 ( at , ) gives ; Example 2 ( at ) gives and rate toward the origin; and the anchor case at gives , , along .
Prerequisites. Scalar and Vector Fields · Partial Derivatives and Limits · The Dot Product and Unit Vectors. Leads to. The Gradient Operator · Line Integrals · The Del Operator and Vector Differential Identities.
Ask the tutor: Ask me to walk you through the directional derivative of any field you like — pick a function, a point, and a heading, and we will build the gradient and project it together, then find its steepest-ascent direction.
Is the directional derivative just a fancy slope?
Yes — that is exactly the right intuition, with one refinement. On a one-variable graph the slope is ; on a multivariable field there is a different slope for every direction you could walk, and the directional derivative is the slope for the one direction you chose. What makes it more than a slope is the punchline that all those slopes are organised by a single vector: once you know the gradient, you never compute another limit — you just dot. So "fancy slope" is fair, but the real content is that infinitely many slopes are bookkept by one arrow.
Why does the gradient point in the direction of steepest ascent?
Because , and among all unit headings this is largest exactly when , i.e. when is parallel to . The magnitude of the gradient then is the steepest slope, . There is nothing special about "up" being distinguished; the gradient simply collects the partial derivatives, and the direction that best aligns your step with all of them at once is the one that maximises the weighted sum . That direction is the gradient, and the reverse, , is steepest descent — which is why optimisers move that way.
What is the difference between the directional derivative and the gradient?
The directional derivative is a scalar — one number, the rate of change along one chosen heading. The gradient is a vector — it packages the rates along all the coordinate axes into a single object that lives at the point regardless of any heading. They are linked by projection: . Think of the gradient as the master object and each directional derivative as a reading taken from it in a particular direction. Crucially, the gradient carries strictly more information: from it you can recover every directional derivative, but from a single directional derivative you cannot recover the gradient.
Do all the directional derivatives existing guarantee f is differentiable?
No — this is a classic and important subtlety. A function can have a well-defined directional derivative along every direction at a point and still fail to be differentiable there, in which case the neat formula breaks down. The standard example is (with ): at the origin every directional derivative exists, yet they are not a linear (dot-product) function of the heading, so no gradient reproduces them. Differentiability — a stronger condition requiring the field to be well-approximated by a linear map — is what licenses the projection formula. In practice the smooth fields of physics are differentiable, so the formula holds, but the logical order matters.
How does the operator û · ∇ relate to the convective derivative in fluids?
They are the same operator with a different vector plugged in. The directional-derivative operator measures how any field changes as you move along the unit heading . In fluid dynamics you instead move with the flow, at the fluid velocity , so you use — the directional derivative scaled by the flow speed. It appears in the material derivative , which tracks the change a parcel of fluid actually experiences: the explicit time change plus the change swept up by being carried into new field values. So the transport terms of the Navier–Stokes and advection equations are directional derivatives in disguise.
Can a directional derivative be negative or larger than the partial derivatives?
Both. It is negative whenever your heading points even partly downhill — any beyond 90° from the gradient gives , as in Example 1 where the answer was . And along the gradient itself the value is , which can exceed any individual partial derivative: for the steepest slope is , larger than either or . What it can never do is exceed in magnitude — that is the hard ceiling the steepest-ascent derivation established, .