Before we start, one reference figure fixes all five shapes in your mind — every classification below is really asking "which of these surfaces is it?"
Here A is already diagonal, so Q=λ1x2+λ2y2+… and the diagonal entries are the eigenvalues. Just read the signs.
Recall Solution L1.1
WHAT: matrix is A=(5003), diagonal, so eigenvalues are 5 and 3.
WHY: for a diagonal matrix there are no cross terms, so the diagonal numbers are exactly the λi in ∑λiyi2.
Both >0 ⇒ every input gives a positive output (unless x=0). Positive definite (the blue bowl).
Recall Solution L1.2
A=(−200−7), eigenvalues −2,−7, both <0. Every output is negative for x=0. Negative definite (the orange dome).
Recall Solution L1.3
λ=1,−4: opposite signs. Feed (1,0) → +1; feed (0,1) → −4. Both signs occur. Indefinite (the red saddle in the figure).
Recall Solution L1.4
A=(0006), eigenvalues 0,6. Never negative, but Q(1,0)=0 with x=0. Positive semidefinite (not PD) — this is the green flat-bottomed trough in the figure. The zero eigenvalue is the whole point: it's the flat direction x-axis.
Recall Solution L1.5
A=(−5000), eigenvalues −5,0. Never positive (both eigenvalues ≤0), but Q(0,1)=0 with x=0. Negative semidefinite (NSD) — the gray flat-topped trough.
This is the mirror of L1.4: all eigenvalues ≤0with at least one zero. The surface is a downward trough that is flat along the whole y-axis — a dome in the x-direction, level in the y-direction.
Now the matrices have cross terms. Building A correctly is the first job.
Then use Sylvester's leading principal minors (D1=A11, D2=detA) and cross-check with eigenvalues.
Recall Solution L2.1
Build A: diagonals 3,3; the xy-coefficient is 2, and (as shown above) the off-diagonal is half of it because the cross term is counted twice, so A12=A21=22=1. Thus A=(3113).
Sylvester (WHY it certifies PD): by the pivot fact above, D1>0 and D2>0 together mean both pivots d1=D1=3 and d2=D2/D1=8/3 are positive, so Q is a sum of positive squares — the very definition of PD. Compute: D1=3>0; D2=9−1=8>0. All positive ⇒ PD.
Cross-check eigenvalues:(3−λ)2−1=0⇒λ=2,4, both >0. ✓
Recall Solution L2.2
Build A: diagonals −4,−4; the xy-coefficient is 4, halved (counted twice) gives off-diagonal 24=2. So A=(−422−4).
Sylvester for ND — WHY the pattern D1<0,D2>0:A is ND exactly when −A is PD. PD requires all leading minors of −A positive. But scaling a k×k block by −1 multiplies its determinant by (−1)k, so the k-th minor of −A equals (−1)kDk. Demanding each (−1)kDk>0 gives D1<0 (from k=1: −D1>0) and D2>0 (from k=2: D2>0) — the alternating pattern. Check: D1=−4<0 ✓; D2=16−4=12>0 ✓. ND.Eigenvalues:(−4−λ)2−4=0⇒−4−λ=±2⇒λ=−2,−6, both <0. ✓
Recall Solution L2.3
Build A: diagonals 1,1; xy-coefficient 6, halved ⇒ off-diagonal 3. So A=(1331). D1=1>0 but D2=1−9=−8<0.
Not PD (need D2>0), and D1<0 fails the ND pattern too. A negative D2=detA=λ1λ2 means the eigenvalues have opposite signs. Indefinite.
Check: λ=4,−2. ✓
Recall Solution L2.4
Build A: diagonals 2,2,2; only cross term is 2xy, halved ⇒ A12=A21=1; no xz or yz, so those off-diagonals are 0. Thus A=210120002.
D1=2>0; D2=det(2112)=3>0; D3=detA.
WHY D3=2⋅D2 (cofactor expansion along the last column): a determinant can be expanded along any row or column — you march down that line, multiply each entry by the smaller determinant left after deleting its row and column (its "minor"), and attach the checkerboard sign (−1)i+j. The third column here is (0,0,2)⊤, so the only surviving term is the 2 in position (3,3): sign (−1)3+3=+1, and deleting row 3 & column 3 leaves exactly the top-left 2×2 block whose determinant is D2. Hence D3=2⋅D2=2⋅3=6>0. All three >0 ⇒ PD.
Now A contains a parameter. Find the range of the parameter for a required type. This is where Sylvester earns its keep.
Recall Solution L3.1
PD via Sylvester: need D1=2>0 (always true) andD2=16−k2>0.
16−k2>0⟺k2<16⟺−4<k<4.
Answer:−4<k<4. At k=±4, D2=0 ⇒ PSD boundary; beyond, indefinite.
Recall Solution L3.2
Build A: the xy-coefficient is 2k, halved ⇒ off-diagonal k. So A=(1kk4), D2=4−k2=λ1λ2.
Indefinite ⇔ eigenvalues opposite signs ⇔ D2<0: 4−k2<0⟺k2>4⟺k<−2 or k>2.
Answer:∣k∣>2.
Recall Solution L3.3
ND needsD1=k<0andD2=k2−1>0 (the alternating pattern from L2.2).
k2−1>0⟺k<−1 or k>1. Intersect with k<0: k<−1.
Answer:k<−1. (Eigenvalues k±1, both negative exactly when k<−1. ✓)
Combine the form with its origin (a formula, a Hessian, a completed square). Multiple tools in one problem.
Recall Solution L4.1
Step 1 — critical point check.fx=3x2−3=0⇒x=±1; fy=2y=0⇒y=0. So (1,0) is critical. ✓
Step 2 — Hessian.fxx=6x, fyy=2, fxy=0. At (1,0): H=(6002).
Step 3 — classify H. Eigenvalues 6,2>0 ⇒ PD ⇒ local minimum (the blue bowl).
Bonus — the other critical point (−1,0):H=(−6002), λ=−6,2 mixed ⇒ indefinite ⇒ saddle (the red surface). This is the whole Second Derivative Test.
Recall Solution L4.2
WHAT (complete the square in x):x2+4xy+5y2=(x+2y)2−4y2+5y2=(x+2y)2+y2.WHY it proves PD: a sum of two squares is ≥0, and it equals 0 only when x+2y=0andy=0, i.e. x=y=0. So Q>0 for all x=0 ⇒ PD.
Implied eigenvalue signs: PD ⇒ both eigenvalues >0 (indeed D1=1>0, D2=5−4=1>0, so λ1λ2=1>0 and λ1+λ2=6>0: both positive).
This completing-the-square factorisation is exactly the idea behind Cholesky Decomposition — PD is precisely the condition that lets you write A=LL⊤.
Recall Solution L4.3
D1=9>0 always. Switch happens when D2=9k−36 changes sign: 9k−36=0⇒k=4.
k>4: D2>0 ⇒ PD.
k<4: D2<0 ⇒ indefinite.
At k=4:D2=detA=0 ⇒ one eigenvalue is 0, the other (trace=13>0) positive ⇒ PSD.
The knife-edge value is k=4, type there = PSD.
Prove structural facts. These are the "why the tests are even true" problems.
Recall Solution L5.1
Step 1 — rotate to diagonal. By the Spectral Theorem, A=QΛQ⊤. Set y=Q⊤x. Because Q is orthogonal it preserves length, so ∥y∥=∥x∥=1, meaning ∑yi2=1.
Step 2 — rewrite.Q(x)=∑iλiyi2. This is a weighted average of the eigenvalues with weights yi2≥0 summing to 1.
Step 3 — bound the average. Any weighted average lies between the smallest and largest ingredient:
λmin=λmin∑yi2≤∑λiyi2≤λmax∑yi2=λmax.Step 4 — definiteness follows. If λmin>0 then Q(x)≥λmin>0 for all unit x (hence all x=0 by scaling) ⇒ PD. If λmax<0 ⇒ ND. If λmin<0<λmax, the bounds straddle zero and the eigenvector directions realize both signs ⇒ indefinite. ■
Recall Solution L5.2
WHAT we must show:x⊤Bx>0 for all x=0.
Step 1 — substitute B=C⊤AC and regroup:x⊤Bx=x⊤C⊤ACx=(Cx)⊤A(Cx).
Here we used (Cx)⊤=x⊤C⊤ to fold the two outer factors into one vector.
Step 2 — name the inner vector. Let w=Cx. Then
x⊤Bx=w⊤Aw.Step 3 — WHY invertibility matters. We started with x=0. Since C is invertible, Cx=0 would force x=C−10=0, a contradiction. Hence w=Cx=0.
Step 4 — apply PD of A. Because A is PD and w=0, we have w⊤Aw>0. Therefore
x⊤Bx=w⊤Aw>0for all x=0.
So B is positive definite. ■
This is why a change of variables (as in Least Squares, where the normal-equation matrix is C⊤C) keeps a form positive definite.
Recall Solution L5.3
Sylvester:D1=2>0. D2=det(2−1−12)=4−1=3>0. D3=detA: expand along top row =2(4−1)−(−1)(−2−0)=6−2=4>0. All >0 ⇒ PD.
Eigenvalues: for this tridiagonal matrix they are 2−2cos4kπ for k=1,2,3, i.e. 2−2,2,2+2 — all positive. ✓ PD confirmed.