4.4.8Multivariable Calculus

Directional derivative — definition, formula

1,743 words8 min readdifficulty · medium6 backlinks

WHAT is it?

Why must u\mathbf{u} be a unit vector? Because hh in the limit measures actual distance travelled. If u=2\|\mathbf{u}\|=2, then moving by hh in "u\mathbf{u}-steps" covers 2h2h real distance, and the slope would be doubled artificially. Forcing u=1\|\mathbf{u}\|=1 makes "rate per unit distance" meaningful.


HOW do we get the working formula? (Derivation from scratch)

We don't want to compute that limit every time. Let's reduce it to something we already know — partial derivatives.

Step 1 — Restrict ff to the line through a\mathbf{a} in direction u\mathbf{u}. Define a single-variable helper g(h)=f(a+hu).g(h) = f(\mathbf{a} + h\mathbf{u}). Why this step? Walking in a straight line turns the multivariable problem into a 1-D problem. The directional derivative is exactly g(0)g'(0): Duf(a)=limh0g(h)g(0)h=g(0).D_{\mathbf{u}}f(\mathbf{a}) = \lim_{h\to0}\frac{g(h)-g(0)}{h} = g'(0).

Step 2 — Differentiate gg with the chain rule. Write a+hu=(a1+hu1,  ,  an+hun)\mathbf{a}+h\mathbf{u} = (a_1 + h u_1,\; \dots,\; a_n + h u_n). Each coordinate is xi(h)=ai+huix_i(h) = a_i + h u_i, so dxidh=ui\frac{dx_i}{dh}=u_i. By the multivariable chain rule: g(h)=i=1nfxi(a+hu)dxidh=i=1nfxiui.g'(h) = \sum_{i=1}^{n}\frac{\partial f}{\partial x_i}\Big(\mathbf{a}+h\mathbf{u}\Big)\cdot\frac{dx_i}{dh} = \sum_{i=1}^{n}\frac{\partial f}{\partial x_i}\cdot u_i. Why this step? The chain rule sums up "how ff changes via each coordinate" ×\times "how fast that coordinate moves."

Step 3 — Evaluate at h=0h=0 (so the point is a\mathbf{a}). Duf(a)=i=1nfxi(a)ui=f(a)u\boxed{\,D_{\mathbf{u}}f(\mathbf{a}) = \sum_{i=1}^{n}\frac{\partial f}{\partial x_i}(\mathbf{a})\,u_i = \nabla f(\mathbf{a})\cdot\mathbf{u}\,}

Figure — Directional derivative — definition, formula

Geometric meaning via the dot product

Since Duf=fu=fucosθ=fcosθD_{\mathbf{u}}f = \nabla f\cdot\mathbf{u} = \|\nabla f\|\,\|\mathbf{u}\|\cos\theta = \|\nabla f\|\cos\theta (because u=1\|\mathbf{u}\|=1):


Worked examples


Forecast-then-Verify

Recall Forecast before computing

For f(x,y)=x2+y2f(x,y)=x^2+y^2 at (3,4)(3,4), predict DufD_{\mathbf{u}}f along u=(0,1)\mathbf{u}=(0,1), then check. Forecast: moving purely in +y+y, slope should equal fy=2y=8f_y=2y=8. Verify: f=(2x,2y)=(6,8)\nabla f=(2x,2y)=(6,8); Duf=(6,8)(0,1)=8.D_{\mathbf{u}}f=(6,8)\cdot(0,1)=8. ✓ (A directional derivative along an axis = that partial derivative.)


Common mistakes (Steel-manned)


Recall Feynman: explain to a 12-year-old

Imagine a hilly field and you're standing somewhere. If you face exactly East and take a tiny step, you might go up. If you face North, you might go up faster, or even go down. The "directional derivative" is just a number that says: for the way I'm facing right now, how steeply does the ground rise as I step forward? There's one special direction — straight up the hill — where you climb fastest. That arrow is called the gradient. For any other facing, you climb less, by an amount equal to how much that facing leans toward the gradient.


Flashcards

Define the directional derivative of ff at a\mathbf{a} in direction u\mathbf{u} (limit form).
Duf(a)=limh0f(a+hu)f(a)hD_{\mathbf{u}}f(\mathbf{a})=\lim_{h\to0}\frac{f(\mathbf{a}+h\mathbf{u})-f(\mathbf{a})}{h}, with u=1\|\mathbf{u}\|=1.
Why must u\mathbf{u} be a unit vector?
So that hh measures actual distance travelled; otherwise the slope is scaled by u\|\mathbf{u}\|.
Working formula for DufD_{\mathbf{u}}f (differentiable ff)?
Duf(a)=f(a)uD_{\mathbf{u}}f(\mathbf{a}) = \nabla f(\mathbf{a})\cdot\mathbf{u}.
How is the formula derived?
Set g(h)=f(a+hu)g(h)=f(\mathbf{a}+h\mathbf{u}); then Duf=g(0)D_{\mathbf{u}}f=g'(0) and the chain rule gives g(0)=fxiui=fug'(0)=\sum f_{x_i}u_i=\nabla f\cdot\mathbf{u}.
In which direction is DufD_{\mathbf{u}}f largest, and what is its value?
Along u=f/f\mathbf{u}=\nabla f/\|\nabla f\|; max value =f=\|\nabla f\|.
What is DufD_{\mathbf{u}}f when uf\mathbf{u}\perp\nabla f?
Zero — you move along a level curve.
Is the directional derivative a scalar or a vector?
A scalar (a single slope number).
When can the dot-product formula fail despite the limit existing?
When ff is not differentiable at a\mathbf{a} (e.g. a sharp point), even if all directional derivatives exist.
Relation between DufD_{\mathbf{u}}f and partial derivatives along axes?
Deif=f/xiD_{\mathbf{e}_i}f = \partial f/\partial x_i (axis direction recovers the partial).

Connections

  • Gradient vector — the direction of steepest ascent; Duf=fuD_{\mathbf{u}}f=\nabla f\cdot\mathbf{u}.
  • Partial derivatives — special case when u\mathbf{u} is a coordinate axis.
  • Multivariable chain rule — the engine behind the derivation.
  • Level curves and level sets — where Duf=0D_{\mathbf{u}}f=0.
  • Tangent planes and differentiability — the condition that validates the formula.
  • Dot product and cosine of angle — gives the fcosθ\|\nabla f\|\cos\theta interpretation.

Concept Map

generalized to any direction

required so h is real distance

defined by

restrict f to line

Du f equals g prime 0

apply chain rule

evaluate at h=0

dotted with u

requires

equals norm grad f times cos theta

max when theta=0

Partial derivative east only

Directional derivative Du f

Unit vector u

Limit of difference quotient

Helper g h = f a+hu

1-D problem

Sum of dfdxi times ui

Du f = grad f dot u

Gradient grad f

f differentiable at a

Geometric meaning

Steepest ascent

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, partial derivative sirf ye batata hai ki agar tum exactly xx-axis ke direction me chalo to function kitna fast change hota hai. Lekin zindagi me sirf East-West thodi chalna hai — tum kisi bhi direction me ja sakte ho. Directional derivative wahi cheez hai: tum ek point a\mathbf{a} pe khade ho, ek direction u\mathbf{u} choose karte ho, aur poochhte ho "is taraf chaloon to height kitni tezi se badhegi?" Ye answer ek number hota hai (slope), vector nahi.

Formula bahut simple hai: Duf=fuD_{\mathbf{u}}f = \nabla f \cdot \mathbf{u} — yaani gradient ka dot product unit direction ke saath. Yaad rakhne ka trick: GUN — Gradient nikaalo, direction ko Unit banao (length 1 karo), phir Number nikaalo dot product se. Sabse important galti jo log karte hain: direction vector ko normalise karna bhool jaate hain. Agar direction (3,4)(3,4) di hai to uski length 5 hai, to pehle 55 se divide karke u=(3/5,4/5)\mathbf{u}=(3/5,4/5) banao, warna answer 5 guna galat aayega.

Ek aur khaas baat: fu=fcosθ\nabla f\cdot\mathbf{u} = \|\nabla f\|\cos\theta. Iska matlab — jab tum gradient ke saath-saath chalo (θ=0\theta=0), slope maximum hota hai aur uski value f\|\nabla f\| hoti hai. Yahi reason hai ki gradient ko "steepest ascent direction" kehte hain. Aur agar tum gradient ke perpendicular chalo, slope zero — tum level curve pe ghoom rahe ho, height constant. Ye intuition hill-climbing aur optimization (gradient descent) me directly kaam aati hai, isliye ise rat-ta na maaro, samajh ke yaad rakho.

Go deeper — visual, from zero

Test yourself — Multivariable Calculus

Connections