4.4.13 · D2Multivariable Calculus

Visual walkthrough — Second derivative test — Hessian determinant

2,300 words10 min readBack to topic

Everything below assumes only two things: you know what a function is (a height above the floor at each point ), and you know what a partial derivative is (the slope of that height if you walk in only one direction, freezing the other). Everything else we build here.


Step 1 — The flat spot we are standing on

WHAT. We pick a point on the floor where the surface is flat in every direction. "Flat" means: if you walk east–west the ground has zero slope, and if you walk north–south the ground has zero slope. In symbols,

Here is the east–west slope and the north–south slope. A point where both are zero is called a critical point (see Critical points and gradient).

WHY start here. A flat spot is the only place where a max, min, or saddle can hide. On a slope you can always walk downhill, so you are at none of them. Flatness is our permission slip to look at curvature next.

PICTURE. Three flat spots — a bowl bottom, a dome top, a saddle pass — all share the same horizontal tangent plane (the amber sheet). The slopes are zero; only the bending differs.

Figure — Second derivative test — Hessian determinant

Step 2 — Zoom in: the linear part dies, curvature is all that's left

WHAT. We want the surface's shape near , so we write as a sum of a flat part plus a slope part plus a bending part. This is the Taylor expansion to second order. Let and measure how far we stepped from the flat spot:

  • — tiny steps east and north.
  • — how the east–west slope itself changes as you go east (curvature along ).
  • — curvature along .
  • — the coupling: how the east–west slope changes as you walk north. It measures a diagonal twist.

WHY. Because we are at a critical point, , so the entire slope part vanishes. The constant just shifts the whole surface up or down and never changes its shape. So the only thing that decides bowl vs dome vs saddle is the bending part.

PICTURE. Same surface, blown up under a magnifying glass. Far out it looks curved; zoomed in the flat sheet and the parabolic bending are all that survive — the slope arrows shrink to nothing.

Figure — Second derivative test — Hessian determinant

Step 3 — Name the survivor: the quadratic form

WHAT. Strip away the constant and the dead linear terms. What remains (times ) is a single expression in and :

This is a quadratic form (see Quadratic forms and definiteness): every term is degree two in . Reading it left to right:

  • — pure east–west bending, always same sign as .
  • — the twist; it is positive in some corners of the plane and negative in others because flips sign across the axes.
  • — pure north–south bending.

WHY. The height near the flat spot is . So the surface curves up where and down where . Our whole problem shrinks to one question:

Is always positive, always negative, or does it take both signs?

Always positive → valley (minimum). Always negative → peak (maximum). Both signs → saddle.

PICTURE. The floor coloured by the sign of : cyan where , amber where . A bowl is all cyan; a saddle splits the plane into cyan and amber wedges.

Figure — Second derivative test — Hessian determinant

Step 4 — The obstacle: that middle term

WHAT. If the twist term were gone, life would be easy: , two clean squares whose signs we just read off. The trouble is mixes and , so we cannot tell the sign at a glance.

WHY we need a tool. We reach for completing the square — the classic move that rewrites as . Why this tool and not, say, factoring? Because a perfect square is guaranteed ; once we bottle the messy cross-term inside one square, whatever is left over becomes a clean, isolated coefficient we can sign-test. Factoring would need us to know the roots first; completing the square never asks that.

We must assume to pull it out as a common factor. (Step 8 handles separately.)

PICTURE. The tilted trough of : the ridge/valley line runs at an angle because of . Completing the square is really rotating our coordinates to line up with that tilt.

Figure — Second derivative test — Hessian determinant

Step 5 — Do the algebra: the square appears

WHAT. Factor out of the two terms containing :

Now complete the square inside the bracket. The pattern with gives:

Term by term:

  • — a perfect square, never negative. Its coefficient is .
  • — a second square (never negative) times a leftover coefficient. That subtracted is exactly the price the twist charged us.

WHY. We have now written as (positive coefficient?) times (square) + (leftover coefficient) times (square). Since both squares are , the sign of is decided purely by the two coefficients out front.

PICTURE. The two coefficient "dials". One reads ; the other reads the leftover. Their signs light up green (positive) or red (negative).

Figure — Second derivative test — Hessian determinant

Step 6 — The number is born

WHAT. Tidy the leftover coefficient over a common denominator:

That numerator is precisely the determinant of the Hessian matrix . (The two off-diagonal entries are equal by Clairaut's theorem.) So becomes:

Now every symbol is earned. The two coefficients are and .

WHY the subtraction, not a product. Notice is minus . The is the memory of the twist we absorbed. Ignore it (Mistake 1 in the parent) and you throw away the tilt entirely.

PICTURE. The two-by-two grid of second derivatives with the "diagonal product minus off-diagonal square" arrows drawn on top — the determinant made visible.

Figure — Second derivative test — Hessian determinant

Step 7 — Read off the three main cases

WHAT. . Both squares . So:

WHY it's airtight. For we didn't wave hands — we constructed one direction where and another where . That is the honest definition of a saddle.

PICTURE. Three side-by-side height plots keyed to the coefficient signs: all-up bowl, all-down dome, and the split saddle with its two coloured escape directions arrowed.

Figure — Second derivative test — Hessian determinant

Step 8 — The degenerate edges: and

WHAT. Two loose ends the tidy algebra skipped.

Case (couldn't factor). Then . If this is a product of two independent linear factors, so it changes sign as you cross either line → saddle (consistent with ). If also , then — flat along the entire -axis → degenerate, and indeed .

Case . One coefficient in Step 6 vanishes, so is a single square (or zero) — it stays (or ) but touches zero along a whole line, not just a point. Along that valley-floor line the quadratic term gives no information; the true shape is decided by third- or fourth-order terms we threw away. Hence inconclusive. Example: has a genuine minimum yet at the origin.

WHY these deserve their own step. The contract: the reader must never hit a scenario we didn't show. breaks the factoring; breaks the strict inequality. Both are real inputs, so both get handled.

PICTURE. Left: , a flat-bottomed bowl whose base is a point but curves like a plate — , still a min. Right: a "monkey saddle" gutter where vanishes along a line. Both defeat the second-order test.

Figure — Second derivative test — Hessian determinant

The one-picture summary

WHAT. The whole logic on a single map: flat spot → drop linear terms → quadratic form → complete the square → coefficients and → sign combinations → verdict.

Figure — Second derivative test — Hessian determinant
Recall Feynman retelling — the whole walk in plain words

You're standing where the ground is dead level under your feet — no slope any way you turn. To know if you're in a valley, on a hill, or on a mountain pass, you ignore the flatness (it tells you nothing) and study how the ground curves. Write the curving as one expression . It has a friendly part (pure east–west and north–south bending) and an annoying twisty part (the term) that tilts everything. The trick called "completing the square" rotates your view so the tilt hides inside one neat squared bracket, leaving behind two plain dials: one reads , the other reads , where . If both dials point positive, the ground curves up everywhere — valley (min). Both negative — peak (max). One up, one down — you're on a saddle, because you found one direction going up and another going down. And if a dial reads exactly zero, the ground is flat along a whole line and the curving alone can't decide — you have to look closer. That single number is the detector; the sign of is just "smile or frown".


Active recall

Why do linear terms drop from the Taylor expansion here?
At a critical point , so the whole slope part is zero.
After completing the square, what are the two coefficients of ?
and , each multiplying a non-negative square.
Where does the in come from?
From the leftover when completing the square, with .
Why is definitely a saddle?
The two coefficients have opposite signs, so is positive in one direction and negative in another.
What happens to the derivation if ?
Can't factor it out; write — sign-changing product (saddle) unless too (degenerate, ).
Why is inconclusive?
becomes a single square vanishing along a whole line; second-order info is flat there, so higher terms decide.

Connections

Concept Map

expand

linear dies

obstacle

removed by

numerator

both positive

both negative

opposite signs

equals zero

Flat spot fx=fy=0

Taylor to 2nd order

Quadratic form Q

Cross term twist

Complete the square

Coefficients fxx and D over fxx

D = fxx fyy - fxy squared

Minimum

Maximum

Saddle

Inconclusive