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, Du^fD_{\hat{\mathbf{u}}}f: the instantaneous rate of change of ff per unit length as you move through a point along a chosen unit vector u^\hat{\mathbf{u}}. 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, Du^f=∇f⋅u^D_{\hat{\mathbf{u}}}f=\nabla f\cdot\hat{\mathbf{u}}. Knowing one arrow, ∇f\nabla f, 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, ∇f⋅u^=∣∇f∣cos⁡θ\nabla f\cdot\hat{\mathbf{u}}=|\nabla f|\cos\theta, the formula says the field climbs fastest straight along the gradient, holds dead level along the surfaces f=constf=\text{const}, 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 u^⋅∇\hat{\mathbf{u}}\cdot\nabla 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.

Key takeaways
  • The directional derivative Du^fD_{\hat{\mathbf{u}}}f is the rate of change of a scalar field ff per unit length as you move through a point along a unit vector u^\hat{\mathbf{u}} — the slope you feel underfoot facing that way.
  • For a field differentiable at the point it equals the gradient projected onto the heading: Du^f=∇f⋅u^D_{\hat{\mathbf{u}}}f=\nabla f\cdot\hat{\mathbf{u}}. One vector encodes the slope in every direction.
  • Geometrically Du^f=∣∇f∣cos⁡θD_{\hat{\mathbf{u}}}f=|\nabla f|\cos\theta, so the field rises fastest along ∇f\nabla f (rate ∣∇f∣|\nabla f|), is flat along level surfaces (θ=90°\theta=90°), and falls fastest opposite the gradient.
  • Partial derivatives are the special case u^=e^i\hat{\mathbf{u}}=\hat{\mathbf{e}}_i: De^if=∂f/∂xiD_{\hat{\mathbf{e}}_i}f=\partial f/\partial x_i.
  • Concrete anchor: for f=x2+y2f=x^2+y^2 at (3,4)(3,4), ∇f=(6,8)\nabla f=(6,8), ∣∇f∣=10|\nabla f|=10, and heading along the xx-axis gives D=10cos⁡53.1°=6D=10\cos 53.1°=6.
  • Key idea: the directional derivative is the gradient projected onto a direction, Du^f=∇f⋅u^=∣∇f∣cos⁡θD_{\hat{\mathbf{u}}}f=\nabla f\cdot\hat{\mathbf{u}}=|\nabla f|\cos\theta. 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 Dv^f=lim⁡h→0[f(x+hv)−f(x)]/hD_{\hat{\mathbf{v}}}f=\lim_{h\to0}[f(\mathbf{x}+h\mathbf{v})-f(\mathbf{x})]/h exactly and cheaply, propagating a directional perturbation through a computation graph in one sweep; reverse-mode (backpropagation) instead assembles the full gradient ∇f\nabla f, whose steepest-descent direction −∇f-\nabla f each optimiser step then follows. The extremal property proved above — that −∇f-\nabla f is the locally fastest-decreasing heading — is the entire justification for gradient descent, Adam, and their kin. Beyond optimisation, the operator u^⋅∇\hat{\mathbf{u}}\cdot\nabla is the transport term of physics: the convective derivative v⋅∇\mathbf{v}\cdot\nabla 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 ∇f\nabla f is normal to the level surface f=0f=0. 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 ff is altitude. Stand at a point and choose a compass heading u^\hat{\mathbf{u}}. 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 ∇f\nabla f 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 f=x2+y2f=x^2+y^2 whose contours are circles.

Figure
The scalar field f = x² + y² near the point (3, 4): the gradient ∇f = (6, 8) has magnitude 10 and points straight uphill, normal to the circular level curves, while a heading along the x-axis feels only D = 10 cos 53.1° = 6
The gradient points uphill, normal to level curves; a heading feels its projection D = ∇f · û level curve f = 25 O tangent to level curve: D = 0 ∇f = (6, 8), |∇f| = 10 û = (1, 0) D = 10 cos θ = 6 θ = 53.1° P (3, 4)

Because the answer is ∣∇f∣cos⁡θ|\nabla f|\cos\theta, 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 ∣∇f∣=10|\nabla f|=10. 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.

Figure
The cosine law of steepness: with the gradient magnitude fixed at 10, the directional derivative D varies as 10 cos θ while the heading swings around — peaking at +10 along the gradient (θ = 0), vanishing along the level surface (θ = 90°), and bottoming at −10 in steepest descent (θ = 180°)
D = |∇f| cos θ — the same number seen from every heading, here with |∇f| = 10 +10 +5 0 −5 −10 0° 90° 180° 270° 360° angle θ between heading û and gradient ∇f directional derivative D steepest ascent +10 level surface 0 steepest descent −10

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 hh along the unit heading u^\hat{\mathbf{u}}, measure the change in ff, divide by hh, and let h→0h\to0.

Du^f(r)=lim⁡h→0f(r+hu^)−f(r)h(1)D_{\hat{\mathbf{u}}}f(\mathbf{r})=\lim_{h\to0}\frac{f(\mathbf{r}+h\hat{\mathbf{u}})-f(\mathbf{r})}{h} \qquad (1)

where: ff — scalar field f:Rn→Rf:\mathbb{R}^n\to\mathbb{R}; r\mathbf{r} — the point at which the rate is evaluated; u^\hat{\mathbf{u}} — unit direction vector, ∣u^∣=1|\hat{\mathbf{u}}|=1; hh — signed step length along u^\hat{\mathbf{u}}. Read it as the ordinary derivative of ff restricted to the straight line through r\mathbf{r} in the direction u^\hat{\mathbf{u}}. For any field differentiable at r\mathbf{r} 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.

Du^f=∇f⋅u^(2)D_{\hat{\mathbf{u}}}f=\nabla f\cdot\hat{\mathbf{u}} \qquad (2)

where: ∇f\nabla f — the gradient of ff, the vector of first partial derivatives; ⋅\cdot — the Euclidean inner product. Read it as: build ∇f\nabla f 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.

Du^f=∣∇f∣cos⁡θ(3)D_{\hat{\mathbf{u}}}f=|\nabla f|\cos\theta \qquad (3)

where: ∣∇f∣|\nabla f| — the magnitude of the gradient, the maximum possible rate of increase; θ\theta — the angle between ∇f\nabla f and the heading u^\hat{\mathbf{u}}. Read it as: the slope you feel is the full steepness ∣∇f∣|\nabla f| 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.

∇f=∂f∂x x^+∂f∂y y^+∂f∂z z^(4)\nabla f=\frac{\partial f}{\partial x}\,\hat{\mathbf{x}}+\frac{\partial f}{\partial y}\,\hat{\mathbf{y}}+\frac{\partial f}{\partial z}\,\hat{\mathbf{z}} \qquad (4)

where: x^,y^,z^\hat{\mathbf{x}},\hat{\mathbf{y}},\hat{\mathbf{z}} — the orthonormal Cartesian basis vectors. Read it as: each component of ∇f\nabla f reports how ff 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 u^\hat{\mathbf{u}}.

u^⋅∇=ux∂∂x+uy∂∂y+uz∂∂z(5)\hat{\mathbf{u}}\cdot\nabla=u_x\frac{\partial}{\partial x}+u_y\frac{\partial}{\partial y}+u_z\frac{\partial}{\partial z} \qquad (5)

where: ux,uy,uzu_x,u_y,u_z — the Cartesian components of u^\hat{\mathbf{u}}. Read it as a rate-of-change-along-u^\hat{\mathbf{u}} operator; feed it ff and it returns Du^fD_{\hat{\mathbf{u}}}f, and it is exactly the transport operator v⋅∇\mathbf{v}\cdot\nabla of fluid dynamics with v\mathbf{v} in place of u^\hat{\mathbf{u}}. Iterating that operator generates the Taylor expansion of the field along the line. Each successive term is a higher directional derivative, so u^⋅∇\hat{\mathbf{u}}\cdot\nabla is the engine of local approximation.

f(r+hu^)=f(r)+h (u^⋅∇)f+12h2(u^⋅∇)2f+⋯(6)f(\mathbf{r}+h\hat{\mathbf{u}})=f(\mathbf{r})+h\,(\hat{\mathbf{u}}\cdot\nabla)f+\tfrac{1}{2}h^2(\hat{\mathbf{u}}\cdot\nabla)^2 f+\cdots \qquad (6)

where: (u^⋅∇)2f(\hat{\mathbf{u}}\cdot\nabla)^2 f — the second directional derivative, the curvature of ff along u^\hat{\mathbf{u}}. Read it as the one-dimensional Taylor series of ff seen from the moving observer, with the operator supplying each derivative in hh. 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.

Du^(αf+βg)=α Du^f+β Du^g,Du^(fg)=f Du^g+g Du^f(7)D_{\hat{\mathbf{u}}}(\alpha f+\beta g)=\alpha\,D_{\hat{\mathbf{u}}}f+\beta\,D_{\hat{\mathbf{u}}}g,\qquad D_{\hat{\mathbf{u}}}(fg)=f\,D_{\hat{\mathbf{u}}}g+g\,D_{\hat{\mathbf{u}}}f \qquad (7)

where: α,β\alpha,\beta — real constants; f,gf,g — 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".

Derivation AThe projection formula from the chain rule

The goal is to prove the central identity Du^f=∇f⋅u^D_{\hat{\mathbf{u}}}f=\nabla f\cdot\hat{\mathbf{u}} 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 r\mathbf{r}, turning it into an ordinary one-variable derivative to which the chain rule applies cleanly.

Step 1. Restrict ff to the line and define the one-variable function g(h)=f(r+hu^)g(h)=f(\mathbf{r}+h\hat{\mathbf{u}}); then the definition (1) is literally Du^f=g′(0)D_{\hat{\mathbf{u}}}f=g'(0). Why: the directional derivative asks only how ff behaves along one ray, so nothing is lost by throwing away every direction but u^\hat{\mathbf{u}} and studying a function of the single parameter hh.

Step 2. Differentiate with the multivariable chain rule. The ii-th coordinate along the ray is ri+huir_i+hu_i, moving at rate d(ri+hui)/dh=ui\mathrm{d}(r_i+hu_i)/\mathrm{d}h=u_i, so g′(h)=∑i(∂f/∂xi) uig'(h)=\sum_i (\partial f/\partial x_i)\,u_i. 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 h=0h=0 and recognise the sum. Since ∑i(∂f/∂xi)ui\sum_i (\partial f/\partial x_i)u_i is the component-by-component product of ∇f\nabla f and u^\hat{\mathbf{u}}, we get g′(0)=∇f⋅u^g'(0)=\nabla f\cdot\hat{\mathbf{u}}. 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, ∇f⋅u^=∣∇f∣ ∣u^∣cos⁡θ=∣∇f∣cos⁡θ\nabla f\cdot\hat{\mathbf{u}}=|\nabla f|\,|\hat{\mathbf{u}}|\cos\theta=|\nabla f|\cos\theta using ∣u^∣=1|\hat{\mathbf{u}}|=1. 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 f=x2+y2f=x^2+y^2 at (3,4)(3,4), ∇f=(6,8)\nabla f=(6,8) and heading u^=(1,0)\hat{\mathbf{u}}=(1,0) give ∇f⋅u^=6=∂f/∂x\nabla f\cdot\hat{\mathbf{u}}=6=\partial f/\partial x, which matches the limit [f(3+h,4)−f(3,4)]/h→6[f(3+h,4)-f(3,4)]/h\to6 directly from the definition.*

Go deeper · Derivation B · 1 minSteepest ascent lies along the gradient
Derivation BSteepest 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 ∣∇f∣|\nabla f| — the fact that makes ∇f\nabla f the direction of steepest ascent and −∇f-\nabla f the direction of steepest descent used by every gradient-based optimiser. We optimise the scalar Du^fD_{\hat{\mathbf{u}}}f over the unit sphere of directions, with the point held fixed so that ∣∇f∣|\nabla f| is a constant.

Step 1. Start from the geometric form Du^f=∣∇f∣cos⁡θD_{\hat{\mathbf{u}}}f=|\nabla f|\cos\theta. At a fixed point ∣∇f∣|\nabla f| is a fixed non-negative number, so the only thing the heading controls is the angle θ\theta it makes with the gradient. Why: separating the fixed magnitude from the steerable angle reduces a vector optimisation to a one-variable question about cos⁡θ\cos\theta.

Step 2. Bound the cosine: −1≤cos⁡θ≤1-1\le\cos\theta\le1 for every real angle. Hence −∣∇f∣≤Du^f≤∣∇f∣-|\nabla f|\le D_{\hat{\mathbf{u}}}f\le|\nabla f| 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 cos⁡θ=1\cos\theta=1 holds precisely when θ=0\theta=0, i.e. u^=∇f/∣∇f∣\hat{\mathbf{u}}=\nabla f/|\nabla f|, giving max⁡Du^f=∣∇f∣\max D_{\hat{\mathbf{u}}}f=|\nabla f|; the minimum −∣∇f∣-|\nabla f| occurs at θ=π\theta=\pi, antiparallel to ∇f\nabla f. 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 θ=π/2\theta=\pi/2 the rate is zero (motion along a level surface) and at θ=π\theta=\pi it is −∣∇f∣-|\nabla f|, consistent with the cosine curve of the second figure and with ∇f\nabla f being normal to level surfaces.*

Go deeper · Derivation C · 1 minThe gradient is normal to level surfaces
Derivation CThe gradient is normal to level surfaces

The goal is to prove that the gradient at a point is perpendicular to the level surface f=cf=c 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 ∇f\nabla f 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 r(t)\mathbf{r}(t) that lies entirely within the level surface, so f(r(t))=cf(\mathbf{r}(t))=c for all tt. Its velocity dr/dt\mathrm{d}\mathbf{r}/\mathrm{d}t 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: ddtf(r(t))=∇f⋅drdt=0\dfrac{\mathrm{d}}{\mathrm{d}t}f(\mathbf{r}(t))=\nabla f\cdot\dfrac{\mathrm{d}\mathbf{r}}{\mathrm{d}t}=0, because the left side is the derivative of the constant cc. 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 ∇f⋅t=0\nabla f\cdot\mathbf{t}=0 for every tangent t\mathbf{t} to the surface, and the tangents span the surface's tangent plane, ∇f\nabla f 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 θ=90°\theta=90° entry of the limiting-cases table (tangential headings give cos⁡θ=0\cos\theta=0), and it recovers that ∇(x2+y2)=(6,8)\nabla(x^2+y^2)=(6,8) at (3,4)(3,4) is radial, hence normal to the circle x2+y2=25x^2+y^2=25.*

Limiting cases

The single formula Du^f=∣∇f∣cos⁡θD_{\hat{\mathbf{u}}}f=|\nabla f|\cos\theta specialises, one landmark angle at a time, into every fact worth memorising about the gradient.

CaseResultMeaning
Along the gradient (θ=0\theta=0)Du^f=∣∇f∣D_{\hat{\mathbf{u}}}f=\vert\nabla f\vertmaximal rate of increase; u^=∇f/∣∇f∣\hat{\mathbf{u}}=\nabla f/\vert\nabla f\vert is the direction of steepest ascent
Tangent to a level surface (θ=90°\theta=90°)Du^f=0D_{\hat{\mathbf{u}}}f=0motion along f=constf=\text{const} gives no first-order change — this is why ∇f\nabla f is normal to level surfaces
Opposite the gradient (θ=180°\theta=180°)Du^f=−∣∇f∣D_{\hat{\mathbf{u}}}f=-\vert\nabla f\vertsteepest descent — the update direction of gradient-descent algorithms
Along a coordinate axis (u^=e^i\hat{\mathbf{u}}=\hat{\mathbf{e}}_i)De^if=∂f∂xiD_{\hat{\mathbf{e}}_i}f=\dfrac{\partial f}{\partial x_i}partial derivatives are just directional derivatives along the basis directions
Zero gradient (∇f=0\nabla f=\mathbf{0})Du^f=0D_{\hat{\mathbf{u}}}f=0 for all u^\hat{\mathbf{u}}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 f(x,y,z)=x2y+yz2f(x,y,z)=x^2y+yz^2 at the point (1,2,−1)(1,2,-1) in the direction of a=(2,−1,2)\mathbf{a}=(2,-1,2).

Step 1. Build the gradient symbolically by differentiating term by term: ∇f=(2xy,  x2+z2,  2yz)\nabla f=(2xy,\;x^2+z^2,\;2yz). The first component comes from ∂(x2y)/∂x\partial(x^2y)/\partial x, the second from ∂(x2y+yz2)/∂y\partial(x^2y+yz^2)/\partial y, the third from ∂(yz2)/∂z\partial(yz^2)/\partial z.

Step 2. Evaluate at (1,2,−1)(1,2,-1): 2xy=2(1)(2)=42xy=2(1)(2)=4, x2+z2=1+1=2x^2+z^2=1+1=2, and 2yz=2(2)(−1)=−42yz=2(2)(-1)=-4, so ∇f(1,2,−1)=(4, 2, −4)\nabla f(1,2,-1)=\mathbf{(4,\,2,\,-4)}.

Step 3. Normalise the heading — this is the step people skip. ∣a∣=22+(−1)2+22=9=3|\mathbf{a}|=\sqrt{2^2+(-1)^2+2^2}=\sqrt{9}=3, so u^=13(2,−1,2)\hat{\mathbf{u}}=\tfrac13(2,-1,2).

Step 4. Project: Du^f=∇f⋅u^=13(4⋅2+2⋅(−1)+(−4)⋅2)=13(8−2−8)=13(−2)D_{\hat{\mathbf{u}}}f=\nabla f\cdot\hat{\mathbf{u}}=\tfrac13\big(4\cdot2+2\cdot(-1)+(-4)\cdot2\big)=\tfrac13(8-2-8)=\tfrac13(-2). The dot product before normalising is ∇f⋅a=−2\nabla f\cdot\mathbf{a}=-2; dividing by ∣a∣=3|\mathbf{a}|=3 gives the result. Du^f(1,2,−1)=−23D_{\hat{\mathbf{u}}}f(1,2,-1)=-\tfrac{2}{3}.

Step 5. Interpret the sign. The value is negative, so ff decreases as you step along u^\hat{\mathbf{u}} at this point. Sanity check against the steepest-ascent bound: ∣∇f∣=16+4+16=6|\nabla f|=\sqrt{16+4+16}=6, and indeed −23-\tfrac23 lies comfortably inside [−6,+6][-6,+6], as every directional derivative must.

2 · Steepest ascent on a heated plate (fully worked)

A thin metal plate has temperature T(x,y)=50−x2−2y2T(x,y)=50-x^2-2y^2 in °C, with x,yx,y measured in centimetres. At the point (1,1)(1,1), 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: ∇T=(−2x, −4y)\nabla T=(-2x,\,-4y), so at (1,1)(1,1), ∇T=(−2, −4)\nabla T=\mathbf{(-2,\,-4)} °C/cm. Its magnitude is ∣∇T∣=(−2)2+(−4)2=20=25≈4.47|\nabla T|=\sqrt{(-2)^2+(-4)^2}=\sqrt{20}=2\sqrt5\approx\mathbf{4.47} °C/cm.

Step 2 (a). The heading toward the origin from (1,1)(1,1) is (−1,−1)(-1,-1), of length 2\sqrt2, so u^=12(−1,−1)\hat{\mathbf{u}}=\tfrac{1}{\sqrt2}(-1,-1). Then Du^T=∇T⋅u^=12((−2)(−1)+(−4)(−1))=62=32≈+4.24D_{\hat{\mathbf{u}}}T=\nabla T\cdot\hat{\mathbf{u}}=\tfrac{1}{\sqrt2}\big((-2)(-1)+(-4)(-1)\big)=\tfrac{6}{\sqrt2}=3\sqrt2\approx\mathbf{+4.24} °C/cm. Walking toward the centre, the plate warms at about 4.24 °C per centimetre.

Step 3 (b). Steepest heating is along ∇T\nabla T itself: u^max⁡=∇T∣∇T∣=(−2,−4)25=(−1,−2)5≈(−0.447,−0.894)\hat{\mathbf{u}}_{\max}=\dfrac{\nabla T}{|\nabla T|}=\dfrac{(-2,-4)}{2\sqrt5}=\dfrac{(-1,-2)}{\sqrt5}\approx(-0.447,-0.894), with maximal rate ∣∇T∣=25≈4.47|\nabla T|=2\sqrt5\approx\mathbf{4.47} °C/cm. Steepest cooling is the exact reverse, (1,2)/5(1,2)/\sqrt5, at rate −4.47-4.47 °C/cm — the heading a heat-seeking controller would avoid.

Step 4 (c). No change means perpendicular to the gradient: any u^\hat{\mathbf{u}} with ∇T⋅u^=0\nabla T\cdot\hat{\mathbf{u}}=0. Rotating (−1,−2)(-1,-2) by 90° gives (2,−1)(2,-1), so u^0=15(2,−1)\hat{\mathbf{u}}_0=\tfrac{1}{\sqrt5}(2,-1) (and its opposite). These point along the local isotherm — the ellipse 50−x2−2y2=4750-x^2-2y^2=47 through (1,1)(1,1) — confirming Derivation 3: the zero-rate directions are exactly the tangents to the level curve, normal to ∇T\nabla T. Steepest heating 25≈4.472\sqrt5\approx4.47 °C/cm along (−1,−2)/5(-1,-2)/\sqrt5; no change along (2,−1)/5(2,-1)/\sqrt5.

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, ∇f⋅u^\nabla f\cdot\hat{\mathbf{u}}. Its portrait is really the portrait of the gradient and the symbol ∇\nabla that carries it.

Origins · 1 minthe gradient and how this was discovered
TG
the gradient
the operator ∇ and its projection ∇f·û · vector calculus of scalar fields

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 ∇=x^ ∂x+y^ ∂y+z^ ∂z\nabla=\hat{\mathbf{x}}\,\partial_x+\hat{\mathbf{y}}\,\partial_y+\hat{\mathbf{z}}\,\partial_z. 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 ∇V\nabla V its physical reading as the "slope" of a potential — soon universally called the gradient. The modern, quaternion-free vector analysis in which Du^f=∇f⋅u^D_{\hat{\mathbf{u}}}f=\nabla f\cdot\hat{\mathbf{u}} 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 −∇f-\nabla f 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.

History
1846
— Hamilton introduces the differential operator later named ∇ (nabla)
1847
— Cauchy proposes the method of steepest descent, stepping along −∇f
1873
— Maxwell deploys ∇ in his Treatise, reading ∇V as the slope of a potential
1881
— Gibbs's Elements of Vector Analysis fixes the modern gradient notation ∇f
1901
— Gibbs and Wilson's Vector Analysis states D_u f = ∇f · û as a theorem
1986
— Backpropagation popularises gradient descent for training neural networks

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 Du^f=∇f⋅u^D_{\hat{\mathbf{u}}}f=\nabla f\cdot\hat{\mathbf{u}}; the bound −∣∇f∣≤Du^f≤∣∇f∣-|\nabla f|\le D_{\hat{\mathbf{u}}}f\le|\nabla f| holds for all headings; Example 1 (f=x2y+yz2f=x^2y+yz^2 at (1,2,−1)(1,2,-1), a=(2,−1,2)\mathbf{a}=(2,-1,2)) gives −23-\tfrac23; Example 2 (T=50−x2−2y2T=50-x^2-2y^2 at (1,1)(1,1)) gives ∣∇T∣=25≈4.47|\nabla T|=2\sqrt5\approx4.47 and rate 32≈4.243\sqrt2\approx4.24 toward the origin; and the anchor case f=x2+y2f=x^2+y^2 at (3,4)(3,4) gives ∇f=(6,8)\nabla f=(6,8), ∣∇f∣=10|\nabla f|=10, D=6D=6 along (1,0)(1,0).

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 dy/dx\mathrm{d}y/\mathrm{d}x; 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 u^\hat{\mathbf{u}} 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 Du^f=∣∇f∣cos⁡θD_{\hat{\mathbf{u}}}f=|\nabla f|\cos\theta, and among all unit headings this is largest exactly when cos⁡θ=1\cos\theta=1, i.e. when u^\hat{\mathbf{u}} is parallel to ∇f\nabla f. The magnitude of the gradient then is the steepest slope, ∣∇f∣|\nabla f|. 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 ∑i(∂f/∂xi)ui\sum_i(\partial f/\partial x_i)u_i. That direction is the gradient, and the reverse, −∇f-\nabla f, 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: Du^f=∇f⋅u^D_{\hat{\mathbf{u}}}f=\nabla f\cdot\hat{\mathbf{u}}. 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 Du^f=∇f⋅u^D_{\hat{\mathbf{u}}}f=\nabla f\cdot\hat{\mathbf{u}} breaks down. The standard example is f(x,y)=x2y/(x2+y2)f(x,y)=x^2y/(x^2+y^2) (with f(0,0)=0f(0,0)=0): 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 u^⋅∇\hat{\mathbf{u}}\cdot\nabla measures how any field changes as you move along the unit heading u^\hat{\mathbf{u}}. In fluid dynamics you instead move with the flow, at the fluid velocity v\mathbf{v}, so you use v⋅∇\mathbf{v}\cdot\nabla — the directional derivative scaled by the flow speed. It appears in the material derivative D/Dt=∂/∂t+v⋅∇\mathrm{D}/\mathrm{D}t=\partial/\partial t+\mathbf{v}\cdot\nabla, 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 θ\theta beyond 90° from the gradient gives cos⁡θ<0\cos\theta<0, as in Example 1 where the answer was −23-\tfrac23. And along the gradient itself the value is ∣∇f∣|\nabla f|, which can exceed any individual partial derivative: for ∇f=(6,8)\nabla f=(6,8) the steepest slope is ∣∇f∣=10|\nabla f|=10, larger than either ∂f/∂x=6\partial f/\partial x=6 or ∂f/∂y=8\partial f/\partial y=8. What it can never do is exceed ∣∇f∣|\nabla f| in magnitude — that is the hard ceiling the steepest-ascent derivation established, −∣∇f∣≤Du^f≤∣∇f∣-|\nabla f|\le D_{\hat{\mathbf{u}}}f\le|\nabla f|.

Before this

Where this leads