1.2.6 · D3Calculus & Optimization Basics

Worked examples — The Hessian matrix

3,374 words15 min readBack to topic

Before anything, one reminder in plain words:


The scenario matrix

Every critical point falls into exactly one cell below. The ", , eigenvalues" columns are the fingerprint you read off; the "shape" is the verdict. Here is the top-left diagonal curvature (not to be confused with or with the eigenvalues). The three cases (E, F, I) are all inconclusive but have distinct eigenvector structure, so we split them out.

Cell Situation eigenvalues (with structure) Shape / verdict
A pure bowl (no coupling) local minimum
B pure dome local maximum
C saddle any saddle
D tilted valley (off-diagonal ) , eigenvectors rotated minimum, rotated axes
E one flat direction, (axis-aligned) one , one ; flat axis = or inconclusive, check higher order
F zero Hessian, ; every direction flat inconclusive, no eigen-info at all
G word problem (real units) apply the test to a model classify a real minimum
H exam twist: gradient test not licensed here cannot classify (not critical)
I one flat direction, (skewed) one , one ; flat axis is tilted inconclusive, flat along a tilted line

How the three cells differ: in E the zero-eigenvalue direction lies along a coordinate axis (because ), so you can read the flat direction straight off the diagonal. In I the coupling rotates that flat direction onto a tilted line — you must compute the eigenvector to find it. In F both eigenvalues are zero, so there is no preferred direction at all and the Hessian gives you nothing; only the raw function values decide the shape.

We now hit each cell in the order the matrix lists them: A, B, C, D, E, F, G, H, I.


Cell A — the clean bowl

Figure 1 (below): the surface rendered as a 3-D bowl, with the plum dot marking the minimum at . Notice the surface rises no matter which way you step off the dot — the picture of "both eigenvalues positive". Look at how the teal mesh curves upward along both the and ridges.

Figure — The Hessian matrix

Cell B — the dome


Cell C — the saddle

Figure 2 (below): the saddle surface . Follow the teal ridge along (curving up) and the orange ridge along (curving down); the plum dot at is simultaneously a valley and a peak depending on which way you walk — the geometric meaning of mixed-sign eigenvalues.

Figure — The Hessian matrix

Cell D — the tilted valley (off-diagonal bites)

This is the case people fumble: the surface is still a bowl, but its axes are rotated, so you cannot eyeball it from the diagonal alone.

Figure 3 (below): the contour map of . The teal ellipses are the level curves; the orange arrow is the steep eigen-axis with , and the plum arrow is the gentle eigen-axis with . Notice the ellipses are squashed along the orange arrow — big curvature there — and stretched along the plum arrow. The bowl's real axes are tilted , exactly what the eigenvectors report.

Figure — The Hessian matrix

Cell E — a genuine flat direction, no coupling (inconclusive)

The zero direction here is axis-aligned because — you can spot the flat axis directly on the diagonal.


Cell F — the totally flat critical point (zero Hessian)

Both eigenvalues are zero, so — unlike E and I — there is no preferred direction at all; the Hessian tells you nothing.


Cell G — a word problem with real units


Cell H — the exam twist: the gradient is NOT zero

This is the trap that catches careful students: a perfectly nice, positive-definite Hessian at a point that isn't critical. The correct move is to refuse to classify.


Cell I — a skewed flat direction, with coupling (inconclusive)

Cell E's flat direction lay along the -axis. But a zero eigenvalue can point along a tilted line when the off-diagonal . Here is that case, so you recognise it too.


Where each case sends you next

If you found… It means Relevant tool
all (Cells A, D, G) local minimum, [[Convex functions convex]] locally
mixed signs (Cell C) saddle Gradient descent can stall / escape slowly
some (Cells E, F, I) flat direction need higher-order terms
(Cell H) not critical keep descending
Recall Quick self-test

Cell for at a critical point? ::: Cell B — , → maximum. Cell for ? ::: Cell C — → saddle (eigenvalues ). Cell for at origin? ::: Cell E — , flat along the -axis, test inconclusive (though it's really a min). Cell for along ? ::: Cell I — , flat along the tilted line , test inconclusive. Cell for at origin? ::: Cell F — , both eigenvalues zero, fully inconclusive (it's an inflection). Can you classify at ? ::: No — Cell H, gradient , not a critical point.