4.4.13Multivariable Calculus

Second derivative test — Hessian determinant

1,690 words8 min readdifficulty · medium

WHAT is the Hessian?


HOW the test works


WHY does this work? (Derivation from scratch)

We want to know the shape of ff near a critical point (a,b)(a,b). Taylor expand to second order. Since fx=fy=0f_x=f_y=0 there, the linear terms vanish and the quadratic part controls everything. Let u=xau=x-a, v=ybv=y-b:

f(a+u,b+v)f(a,b)+12(fxxu2+2fxyuv+fyyv2)f(a+u,b+v) \approx f(a,b) + \tfrac12\big(f_{xx}u^2 + 2f_{xy}uv + f_{yy}v^2\big)

The shape depends entirely on the quadratic form Q(u,v)=fxxu2+2fxyuv+fyyv2Q(u,v)=f_{xx}u^2 + 2f_{xy}uv + f_{yy}v^2. We ask: is QQ always positive (bowl), always negative (dome), or both signs (saddle)?

Step — complete the square. Assume fxx0f_{xx}\neq 0:

Q=fxx(u2+2fxyfxxuv)+fyyv2Q = f_{xx}\left(u^2 + \frac{2f_{xy}}{f_{xx}}uv\right) + f_{yy}v^2

Why this step? Pulling fxxf_{xx} out lets us complete the square in uu, turning a messy cross-term into something we can sign-analyse.

Q=fxx(u+fxyfxxv)2+(fyyfxy2fxx)v2Q = f_{xx}\left(u + \frac{f_{xy}}{f_{xx}}v\right)^2 + \left(f_{yy} - \frac{f_{xy}^2}{f_{xx}}\right)v^2

Why this step? The squared bracket is 0\ge 0 always. So the sign behaviour now hinges on the two coefficients.

Multiply the second coefficient out: fyyfxy2fxx=fxxfyyfxy2fxx=Dfxxf_{yy} - \frac{f_{xy}^2}{f_{xx}} = \frac{f_{xx}f_{yy} - f_{xy}^2}{f_{xx}} = \frac{D}{f_{xx}}

So: Q=fxx(u+fxyfxxv)2+Dfxxv2Q = f_{xx}\left(u + \frac{f_{xy}}{f_{xx}}v\right)^2 + \frac{D}{f_{xx}}\,v^2

Now read off the cases:

  • If D>0D>0 and fxx>0f_{xx}>0: both coefficients fxxf_{xx} and D/fxxD/f_{xx} are positive → Q>0Q>0 always → minimum.
  • If D>0D>0 and fxx<0f_{xx}<0: both coefficients negative → Q<0Q<0 always → maximum. (Note D>0D>0 forces fxxf_{xx} and fyyf_{yy} to have the same sign, so checking fxxf_{xx} alone suffices.)
  • If D<0D<0: fxxf_{xx} and D/fxxD/f_{xx} have opposite signs → QQ can be made positive (pick v=0v=0) or negative (kill the bracket) → saddle.
  • If D=0D=0: one coefficient vanishes, quadratic info is flat along a direction → inconclusive.
Figure — Second derivative test — Hessian determinant

Worked examples



Recall Feynman: explain it to a 12-year-old

Imagine you're standing on a hill where the ground is perfectly flat under your feet (no slope in any direction). Are you at the bottom of a valley, the top of a hill, or on a mountain pass? Look at how the ground curves. If it curves up in every direction, you're in a valley (minimum). If it curves down everywhere, you're on a peak (maximum). If it curves up one way but down another — like sitting on a horse's saddle — you're at a pass. The "Hessian determinant" is just a number we compute from the curving that tells us which of these three it is, like a magic detector.


Active recall

What is the Hessian determinant DD for f(x,y)f(x,y)?
D=fxxfyy(fxy)2D = f_{xx}f_{yy} - (f_{xy})^2
What must be true before applying the second derivative test?
The point must be critical: fx=fy=0f_x=f_y=0.
D>0D>0 and fxx>0f_{xx}>0 implies what?
Local minimum.
D>0D>0 and fxx<0f_{xx}<0 implies what?
Local maximum.
D<0D<0 implies what?
Saddle point.
D=0D=0 implies what?
Test is inconclusive — investigate directly.
Why does the test only use second-order Taylor terms?
At a critical point the gradient (linear terms) is zero, so the quadratic form controls local shape.
What is DD in terms of the Hessian's eigenvalues?
D=λ1λ2D=\lambda_1\lambda_2 (product of curvatures).
Why must we subtract (fxy)2(f_{xy})^2 and not ignore it?
It comes from completing the square; fxyf_{xy} encodes the tilt/coupling of the two curvature directions.
For f=x2y2f=x^2-y^2 at origin, what is DD and the conclusion?
D=4<0D=-4<0, saddle point.

Connections

Concept Map

expand around

linear terms vanish

symmetric via

determinant

analysed by

used in

D>0 and fxx>0

D>0 and fxx<0

D<0

D=0

Critical point fx=fy=0

Taylor expansion 2nd order

Quadratic form Q u,v

Hessian matrix

Clairaut theorem

Discriminant D = fxx fyy - fxy^2

Complete the square

Local minimum

Local maximum

Saddle point

Inconclusive

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, jab humein kisi function f(x,y)f(x,y) ka maximum ya minimum nikalna hota hai, sabse pehle hum critical point dhoondhte hain — yani jahan fx=0f_x=0 aur fy=0f_y=0 ho (surface ki tangent flat ho jaye). Lekin yeh critical point teen cheez ho sakta hai: ek katora (minimum), ek pahaad ki choti (maximum), ya ek ghode ki saddle (na max na min). In teeno mein farak kaise karein? Yahin Hessian determinant kaam aata hai.

Hessian determinant hai D=fxxfyy(fxy)2D = f_{xx}f_{yy} - (f_{xy})^2. Rule simple hai: agar D>0D>0 aur fxx>0f_{xx}>0 to minimum; D>0D>0 aur fxx<0f_{xx}<0 to maximum; D<0D<0 to saddle; aur D=0D=0 to test fail — khud check karna padega. Yeh sab kahan se aaya? Taylor expansion se. Critical point pe linear term zero ho jaate hain, to bachta hai sirf quadratic term, aur usko "complete the square" karke dekhte hain ki woh hamesha positive hai (bowl), hamesha negative hai (dome), ya dono signs leta hai (saddle).

Sabse common galti yeh hoti hai ki students (fxy)2(f_{xy})^2 wala term bhool jaate hain ya D=0D=0 ko "no extremum" samajh lete hain. Yaad rakho — D=0D=0 ka matlab "pata nahi", "nahi hai" nahi. Aur intuition ke liye: DD actually Hessian ke do eigenvalues ka product hai, jo do directions mein curvature batate hain. Same sign curvature = bowl/dome, opposite sign = saddle. Bas itna samajh lo, baaki sab plug-and-chug hai.

Go deeper — visual, from zero

Test yourself — Multivariable Calculus

Connections