Intuition What this page does (WHY)
The parent note told you the tests . This page runs those tests against every kind of matrix you can meet — every sign pattern, the borderline zero cases, a degenerate all-zeros machine, a limiting "one dial turns it from bowl to saddle" family, a real-world word problem, and an exam trap.
If a test can behave differently depending on what you feed it, there is an example below that feeds it exactly that. You should finish this page unable to imagine a case you haven't seen.
We lean on two tools throughout — the eigenvalue test (via the Spectral Theorem for Symmetric Matrices ) and Sylvester's determinant test. We close with the Hessian Matrix / Second Derivative Test payoff.
Every 2 × 2 symmetric quadratic form lands in exactly one row below. The columns tell you what the two tests should say, so you can check yourself.
#
Cell (what makes it special)
Eigenvalue signs
Sylvester D 1 , D 2
Type
A
Both dials up
+ , +
+ , +
PD
B
Both dials down
− , −
− , +
ND
C
One up, one down
+ , −
any, −
Indefinite
D
One dial flat (up branch)
+ , 0
+ , 0
PSD (not PD)
E
One dial flat (down branch)
− , 0
− , 0
NSD (not ND)
F
Both dials flat — degenerate zero machine
0 , 0
0 , 0
Both PSD & NSD (only zero output)
G
Limiting family — a parameter tips PD → PSD → indefinite
crosses 0
D 2 crosses 0
transitions
H
Trap: "D 1 > 0 so it's PD" (Sylvester misread)
—
+ , −
Indefinite (not PD)
I
Word problem — real Hessian, minimize a cost
+ , +
+ , +
PD → minimum
J
Exam twist — 3 × 3 , mixed
mixed
—
Indefinite
The examples below hit every one of A–J.
Worked example Cell A: both dials up
Classify Q ( x , y ) = 5 x 2 + 4 x y + 2 y 2 .
Forecast: All coefficients are positive and the cross term is small. Guess: PD (a bowl) . Write your guess down before reading on.
Build A . Diagonals are the square coefficients 5 and 2 ; the off-diagonal is half the cross coefficient, 4/2 = 2 .
A = ( 5 2 2 2 ) .
Why this step? The tests act on the symmetric matrix, not the raw formula.
Sylvester. D 1 = 5 > 0 , and D 2 = det A = 5 ⋅ 2 − 2 ⋅ 2 = 6 > 0 .
Why this step? PD ⟺ every leading minor is positive — fastest hand check.
Both positive ⇒ PD.
Verify (eigenvalues, and a sum of squares): λ solve ( 5 − λ ) ( 2 − λ ) − 4 = 0 ⇒ λ 2 − 7 λ + 6 = 0 ⇒ λ = 1 , 6 — both > 0 ✓. Also complete the square: 5 x 2 + 4 x y + 2 y 2 = 5 ( x + 5 2 y ) 2 + 5 6 y 2 > 0 unless x = y = 0 . A genuine sum of positive squares. ✓
Worked example Cell B: both dials down
Classify Q ( x , y ) = − 2 x 2 + 2 x y − 3 y 2 .
Forecast: Both square coefficients are negative. Guess: ND (a dome) — but watch the Sylvester pattern , not just "all negative".
Build A : diagonals − 2 , − 3 ; off-diagonal 2/2 = 1 .
A = ( − 2 1 1 − 3 ) .
Sylvester for ND — the signs must alternate − , + . D 1 = − 2 < 0 ✓ (needs < 0 ); D 2 = ( − 2 ) ( − 3 ) − 1 = 5 > 0 ✓ (needs > 0 ).
Why this step? ND means − A is PD; the k × k minor of − A is ( − 1 ) k D k , so we need D 1 < 0 , D 2 > 0 .
Alternating pattern holds ⇒ ND.
Verify: eigenvalues solve ( − 2 − λ ) ( − 3 − λ ) − 1 = 0 ⇒ λ 2 + 5 λ + 5 = 0 ⇒ λ = 2 − 5 ± 5 ≈ − 1.38 , − 3.62 — both < 0 ✓.
Worked example Cell C: one dial up, one down
Classify Q ( x , y ) = x 2 + 4 x y + y 2 .
Forecast: Small squares, a big cross term. The cross term can overpower the squares. Guess: indefinite (a saddle) .
Build A : diagonals 1 , 1 ; off-diagonal 4/2 = 2 .
A = ( 1 2 2 1 ) .
Eigenvalues. ( 1 − λ ) 2 − 4 = 0 ⇒ 1 − λ = ± 2 ⇒ λ = 3 , − 1 . Mixed signs ⇒ indefinite .
Why this step? Mixed-sign eigenvalues are the definition of indefinite — one direction curves up, one curves down.
Confirm with actual vectors. Along the eigenvector for λ = 3 (the direction ( 1 , 1 ) ): Q ( 1 , 1 ) = 1 + 4 + 1 = 6 > 0 . Along ( 1 , − 1 ) : Q ( 1 , − 1 ) = 1 − 4 + 1 = − 2 < 0 . Both signs appear.
Verify (Sylvester consistency): D 1 = 1 > 0 but D 2 = 1 − 4 = − 3 < 0 . A negative D 2 already forbids PD and ND, forcing indefinite ✓.
Look at the saddle: the pale-yellow ridge (going up) is the λ = 3 eigendirection, the chalk-blue valley (going down) is the λ = − 1 direction. Standing at the center, you go up one way and down the other — that is what "indefinite" looks like.
Worked example Cell D: one dial flat, up branch
Classify Q ( x , y ) = x 2 − 2 x y + y 2 .
Forecast: This is ( x − y ) 2 . A perfect square is never negative, but it is zero when x = y . Guess: PSD, not PD .
Build A : diagonals 1 , 1 ; off-diagonal − 2/2 = − 1 .
A = ( 1 − 1 − 1 1 ) .
Sylvester stalls at the boundary. D 1 = 1 > 0 , D 2 = 1 − 1 = 0 . A zero minor means "not strictly PD" — we're on the borderline.
Why this step? Sylvester's strict version can certify PD but the moment a D k = 0 we must fall back to eigenvalues.
Eigenvalues. ( 1 − λ ) 2 − 1 = 0 ⇒ λ = 0 , 2 . One zero, one positive ⇒ PSD .
Witness the zero. Q ( 1 , 1 ) = 1 − 2 + 1 = 0 with ( 1 , 1 ) = 0 . So it touches zero — PSD, not PD.
Verify: Q = ( x − y ) 2 ≥ 0 always, and = 0 exactly on the line x = y ✓.
Worked example Cell E: one dial flat, down branch
Classify Q ( x , y ) = − x 2 + 2 x y − y 2 .
Forecast: This is − ( x − y ) 2 . Never positive, hits zero on x = y . Guess: NSD, not ND — the mirror image of Example 4.
Build A : diagonals − 1 , − 1 ; off-diagonal 2/2 = 1 .
A = ( − 1 1 1 − 1 ) .
Eigenvalues. ( − 1 − λ ) 2 − 1 = 0 ⇒ λ = 0 , − 2 . One zero, one negative ⇒ NSD .
Why this step? ≤ 0 with equality possible is exactly NSD.
Witness the zero. Q ( 1 , 1 ) = − 1 + 2 − 1 = 0 .
Verify: Q = − ( x − y ) 2 ≤ 0 , zero on x = y ✓. Sylvester: D 1 = − 1 < 0 but D 2 = 0 (not > 0 ), so it fails strict ND — consistent with the boundary ✓.
Worked example Cell F: both dials flat
Classify the "machine that does nothing": Q ( x , y ) = 0 ⋅ x 2 + 0 ⋅ x y + 0 ⋅ y 2 .
Forecast: Every input gives 0 . It never goes positive and never goes negative. Guess: it is simultaneously PSD and NSD (the only overlap case), and not indefinite.
Build A : the zero matrix A = ( 0 0 0 0 ) .
Eigenvalues. Both λ = 0 . All eigenvalues ≥ 0 (so PSD) and all ≤ 0 (so NSD).
Why this step? The semidefinite definitions include equality, and 0 satisfies both ≥ 0 and ≤ 0 .
Why not indefinite? Indefinite needs both a strictly positive and a strictly negative output. Here the output is never nonzero, so it cannot be indefinite.
Verify: Q ( x ) = 0 for all x ; D 1 = D 2 = 0 ✓. This is the unique degenerate cell — the flat plane.
Worked example Cell G: watch definiteness change continuously
A parameterized machine: Q t ( x , y ) = x 2 + 2 t x y + y 2 for a real dial t . Find the values of t where the type changes .
Forecast: At t = 0 it's x 2 + y 2 (PD). For huge t the cross term dominates (indefinite, like Example 3). Guess: PD near t = 0 , and it tips somewhere.
Build A : A = ( 1 t t 1 ) .
Track D 2 . D 1 = 1 > 0 (fixed), D 2 = 1 − t 2 . This is the switch.
Why this step? D 1 never changes sign, so the whole story lives in the sign of D 2 = 1 − t 2 .
Read the three regimes:
∣ t ∣ < 1 : D 2 > 0 with D 1 > 0 ⇒ PD .
∣ t ∣ = 1 : D 2 = 0 ⇒ borderline PSD (this is Example 4's matrix when t = − 1 , and ( x + y ) 2 when t = 1 ).
∣ t ∣ > 1 : D 2 < 0 ⇒ indefinite .
Eigenvalue confirmation. λ = 1 ± t . Both positive ⟺ − 1 < t < 1 ; one hits zero at t = ± 1 ; opposite signs when ∣ t ∣ > 1 . Same story.
Verify: at t = 2 1 , λ = 1.5 , 0.5 (PD) ✓; at t = 1 , λ = 2 , 0 (PSD) ✓; at t = 2 , λ = 3 , − 1 (indefinite) ✓.
The figure plots the two eigenvalues 1 + t (pale yellow) and 1 − t (chalk blue) against the dial t . PD is the band where both curves sit above the axis ; at t = ± 1 one curve touches zero (PSD); outside that, one curve crosses below → indefinite. Definiteness is literally "are both curves above the line?"
D 1 > 0 , so it must be PD" — resist it
Classify Q ( x , y ) = x 2 + 6 x y + y 2 .
Forecast: A tempting-but-wrong reflex: "D 1 = 1 > 0 , positive-looking squares, call it PD." Force yourself to compute D 2 before deciding.
Build A : diagonals 1 , 1 ; off-diagonal 6/2 = 3 .
A = ( 1 3 3 1 ) .
Compute BOTH minors. D 1 = 1 > 0 , but D 2 = 1 − 9 = − 8 < 0 .
Why this step? PD needs every D k > 0 . One positive minor proves nothing on its own.
A negative D 2 ⇒ indefinite (it's not PD, and it's not the alternating ND pattern either).
Verify: eigenvalues λ = 1 ± 3 = 4 , − 2 — mixed signs, indefinite ✓. Witness: Q ( 1 , 1 ) = 8 > 0 , Q ( 1 , − 1 ) = 1 − 6 + 1 = − 4 < 0 ✓.
Common mistake The trap in one line
Checking only D 1 (or only the diagonal) is not Sylvester. You must verify the whole chain D 1 > 0 , D 2 > 0 , … to claim PD.
Worked example Cell I: is this cost surface a genuine minimum?
A factory's daily cost (in thousands) as a function of two throughput dials x , y is
f ( x , y ) = 3 x 2 − 2 x y + 3 y 2 − 8 x − 4 y + 20.
You solved ∇ f = 0 and found a critical point. Is it a minimum, a maximum, or a saddle?
Forecast: The purely quadratic part is 3 x 2 − 2 x y + 3 y 2 , big positive squares, tiny cross term. Guess: a real minimum (bowl-shaped cost).
The Hessian is constant here. ∂ x 2 ∂ 2 f = 6 , ∂ y 2 ∂ 2 f = 6 , ∂ x ∂ y ∂ 2 f = − 2 , so
H = ( 6 − 2 − 2 6 ) .
Why this step? The Second Derivative Test classifies a critical point by the definiteness of the Hessian quadratic form.
Test H with Sylvester. D 1 = 6 > 0 , D 2 = 36 − 4 = 32 > 0 ⇒ PD .
PD Hessian ⇒ local minimum (bowl). So yes — cost really bottoms out there.
Verify (locate it, units check): solving ∇ f = 0 : 6 x − 2 y = 8 and − 2 x + 6 y = 4 ⇒ x = 4 7 , y = 4 5 . Eigenvalues of H : λ = 6 ± 2 = 8 , 4 , both > 0 ✓ PD. Cost has units of thousands and H 's entries are (thousands)/(dial2 ), consistent — a positive curvature in every direction means every deviation raises cost ✓.
Worked example Cell J: three variables, don't panic
Classify Q ( x , y , z ) = x 2 + y 2 − z 2 + 2 x y .
Forecast: The − z 2 smells like a downward direction while x , y look upward. Guess: indefinite — but check whether the 2 x y ruins the x , y block.
Build the 3 × 3 A : diagonals 1 , 1 , − 1 ; the only cross term is 2 x y so A 12 = A 21 = 1 , all other off-diagonals 0 .
A = 1 1 0 1 1 0 0 0 − 1 .
Block structure ⇒ eigenvalues are easy. The top-left 2 × 2 block ( 1 1 1 1 ) has eigenvalues 0 and 2 ; the isolated − 1 gives λ = − 1 . So the spectrum is { 2 , 0 , − 1 } .
Why this step? A block-diagonal matrix's eigenvalues are just the union of the blocks' eigenvalues — no messy cubic needed.
Mixed signs (a + 2 and a − 1 ) ⇒ indefinite. The extra zero eigenvalue also means it is not strictly definite in any case.
Verify: witnesses — Q ( 1 , 1 , 0 ) = 1 + 1 + 2 = 4 > 0 ; Q ( 0 , 0 , 1 ) = − 1 < 0 . Both signs, plus a null direction ( 1 , − 1 , 0 ) giving Q = 1 + 1 − 2 = 0 . Indefinite confirmed ✓.
Recall Quick self-test across the matrix
Which cell has D 1 > 0 , D 2 = 0 and eigenvalues 0 , + ? ::: Cell D — PSD, not PD.
Which single cell is simultaneously PSD and NSD? ::: Cell F — the zero machine (only zero output).
In the family x 2 + 2 t x y + y 2 , at what t does PD end? ::: ∣ t ∣ = 1 (there D 2 = 1 − t 2 = 0 ).
Why is D 1 > 0 alone NOT enough for PD? ::: PD needs the whole chain D 1 > 0 , D 2 > 0 , … ; one minor can be positive while D 2 < 0 (indefinite) — the Cell H trap.
A PD Hessian at a critical point signals what? ::: A local minimum (bowl).
Mnemonic One line to remember the whole matrix
"Both up = bowl, both down = dome, one each = saddle, one flat = it kisses zero, both flat = it sleeps."
Bowl = PD, dome = ND, saddle = indefinite, kiss = semidefinite, sleep = the degenerate zero form.