4.4.9Multivariable Calculus

Gradient vector ∇f — definition, properties

1,565 words7 min readdifficulty · medium6 backlinks

1. Building it from scratch (HOW)

1.1 Partial derivatives — slope along one axis

Hold yy fixed, wiggle xx: fx=fx=limh0f(x+h,y)f(x,y)hf_x = \frac{\partial f}{\partial x} = \lim_{h\to 0}\frac{f(x+h,y)-f(x,y)}{h} Similarly fy=f/yf_y = \partial f/\partial y. Each is the slope of a 1D slice.

1.2 The directional derivative (WHAT we really want)

The rate of change of ff as we step in a unit direction u^=(u1,u2)\hat u = (u_1,u_2): Du^f=limh0f(p+hu^)f(p)hD_{\hat u}f = \lim_{h\to 0}\frac{f(\mathbf p + h\hat u)-f(\mathbf p)}{h}

Derive it. Let g(h)=f(p1+hu1,p2+hu2)g(h)=f(p_1+hu_1,\,p_2+hu_2). By the chain rule: Du^f=g(0)=fxd(p1+hu1)dh+fyd(p2+hu2)dh=fxu1+fyu2D_{\hat u}f = g'(0) = f_x\cdot\frac{d(p_1+hu_1)}{dh}+f_y\cdot\frac{d(p_2+hu_2)}{dh} = f_x u_1 + f_y u_2

Why this step? The chain rule splits "moving in direction u^\hat u" into "how fast xx changes" times "how fast ff changes with xx", plus the same for yy. This is a dot product: Du^f=(fx,fy)(u1,u2)D_{\hat u}f = (f_x,f_y)\cdot(u_1,u_2)

That first vector (fx,fy)(f_x,f_y) is forced into existence. We name it:


2. The three big properties (with WHY)

2.1 Direction of steepest ascent

Since Du^f=fcosθD_{\hat u}f = |\nabla f|\cos\theta where θ\theta is the angle between u^\hat u and f\nabla f:

  • cosθ\cos\theta is maximised at θ=0\theta=0 ⟹ walk along f\nabla f, getting rate f|\nabla f|.
  • Minimised at θ=π\theta=\pi ⟹ steepest descent is f-\nabla f, rate f-|\nabla f|.
  • Zero at θ=π/2\theta=\pi/2 ⟹ moving perpendicular to f\nabla f keeps ff constant.

2.2 Gradient ⟂ level sets

On a level curve f=cf=c, ff doesn't change, so Du^f=0D_{\hat u}f=0 for u^\hat u tangent to the curve. But 0=fu^0=\nabla f\cdot\hat u means fu^\nabla f\perp\hat u. Hence f\nabla f is normal to the level set.

2.3 Linearity & tangent plane

(af+bg)=af+bg\nabla(af+bg)=a\nabla f+b\nabla g. The tangent plane to z=f(x,y)z=f(x,y) at p\mathbf p: z=f(p)+f(p)(xp)z = f(\mathbf p)+\nabla f(\mathbf p)\cdot(\mathbf x-\mathbf p) because near p\mathbf p, ff's best linear approximation uses exactly its partial slopes.

Figure — Gradient vector ∇f — definition, properties

3. Worked examples



Recall Feynman: explain to a 12-year-old

Imagine standing on a bumpy hill in fog. You can't see the whole hill, but you can feel the ground tilt under your feet. The gradient is like an arrow lying on the ground that points straight uphill, and the longer the arrow, the steeper the climb. If you walk sideways across the arrow, you stay at the same height. If you want to walk a little uphill in some other direction, just shine the arrow's "shadow" onto your direction (that's the dot product) — that shadow length tells you how fast you'll climb.


Connections


Flashcards

Define the gradient f\nabla f.
The vector of partial derivatives (fx,fy,)(f_x,f_y,\dots); a vector field giving all directional slopes.
How is the directional derivative related to f\nabla f?
Du^f=fu^D_{\hat u}f=\nabla f\cdot\hat u for unit u^\hat u.
In which direction does ff increase fastest?
Along f\nabla f; the rate is f|\nabla f|.
What is the relationship between f\nabla f and level curves f=cf=c?
f\nabla f is perpendicular (normal) to them.
Why must u^\hat u be a unit vector in Du^fD_{\hat u}f?
Otherwise the rate is scaled by v|\mathbf v|, not a true per-unit-length rate.
Maximum rate of change of ff at a point?
f|\nabla f| (a scalar).
Derive Du^f=fxu1+fyu2D_{\hat u}f=f_xu_1+f_yu_2.
Set g(h)=f(p+hu^)g(h)=f(\mathbf p+h\hat u), apply chain rule, g(0)=fxu1+fyu2g'(0)=f_xu_1+f_yu_2.
Equation of tangent plane via gradient?
z=f(p)+f(p)(xp)z=f(\mathbf p)+\nabla f(\mathbf p)\cdot(\mathbf x-\mathbf p).
Direction of steepest descent?
f-\nabla f, rate f-|\nabla f|.

Concept Map

slope along one axis

used to derive

equals dot product

packs all slopes

D_u f = ∇f · û = ∇f cosθ

θ = 0 maximises cosθ

max rate

θ = π/2 gives zero

tangent û keeps f constant

linear near a point

linearity

Partial derivatives fx fy

Directional derivative D_u f

Chain rule

Gradient vector ∇f

Core dot-product formula

Steepest ascent along ∇f

Max rate = ∇f magnitude

∇f perpendicular to level set

Level curve f = c

Tangent plane approximation

∇ af+bg = a∇f + b∇g

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Socho tum ek pahaadi (hill) par khade ho jahan height ko function f(x,y)f(x,y) describe karta hai. Ek hi point par alag-alag directions mein chalo to slope alag aata hai. Toh ek single number se kaam nahi chalega — humein ek vector chahiye jo saari directions ki slope ko ek saath store kar le. Wahi hai gradient f=(fx,fy)\nabla f = (f_x, f_y), yaani partial derivatives ka vector.

Magic ye hai: kisi bhi unit direction u^\hat u mein slope nikalne ke liye bas dot product lo — Du^f=fu^D_{\hat u}f = \nabla f \cdot \hat u. Aur dot product tab sabse bada hota hai jab dono vector ek hi taraf point karein. Isliye sabse steep uphill direction hamesha f\nabla f ki taraf hoti hai, aur uski steepness f|\nabla f| hoti hai. Agar tum f\nabla f ke perpendicular chaloge, slope zero — yaani height constant — isliye gradient hamesha level curve ke normal (perpendicular) hota hai.

Do common galtiyan yaad rakho: pehli, direction vector ko hamesha unit banao warna answer scale ho jaata hai. Doosri, gradient curve ke saath nahi, curve ke across (perpendicular) point karta hai. Yeh concept gradient descent (machine learning), Lagrange multipliers, aur tangent plane sab mein use hota hai — isliye iski intuition pakki kar lo, ratte se kuch nahi banega.

Go deeper — visual, from zero

Test yourself — Multivariable Calculus

Connections