4.5.39 · D4Linear Algebra (Full)

Exercises — Quadratic forms — positive definite, negative definite, indefinite

2,602 words12 min readBack to topic

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?"

Figure — Quadratic forms — positive definite, negative definite, indefinite

Level 1 — Recognition

Here is already diagonal, so and the diagonal entries are the eigenvalues. Just read the signs.

Recall Solution L1.1

WHAT: matrix is , diagonal, so eigenvalues are and . WHY: for a diagonal matrix there are no cross terms, so the diagonal numbers are exactly the in . Both ⇒ every input gives a positive output (unless ). Positive definite (the blue bowl).

Recall Solution L1.2

, eigenvalues , both . Every output is negative for . Negative definite (the orange dome).

Recall Solution L1.3

: opposite signs. Feed ; feed . Both signs occur. Indefinite (the red saddle in the figure).

Recall Solution L1.4

, eigenvalues . Never negative, but with . 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 -axis.

Recall Solution L1.5

, eigenvalues . Never positive (both eigenvalues ), but with . Negative semidefinite (NSD) — the gray flat-topped trough. This is the mirror of L1.4: all eigenvalues with at least one zero. The surface is a downward trough that is flat along the whole -axis — a dome in the -direction, level in the -direction.


Level 2 — Application

Now the matrices have cross terms. Building correctly is the first job.

Then use Sylvester's leading principal minors (, ) and cross-check with eigenvalues.

Recall Solution L2.1

Build : diagonals ; the -coefficient is , and (as shown above) the off-diagonal is half of it because the cross term is counted twice, so . Thus . Sylvester (WHY it certifies PD): by the pivot fact above, and together mean both pivots and are positive, so is a sum of positive squares — the very definition of PD. Compute: ; . All positive ⇒ PD. Cross-check eigenvalues: , both . ✓

Recall Solution L2.2

Build : diagonals ; the -coefficient is , halved (counted twice) gives off-diagonal . So . Sylvester for ND — WHY the pattern : is ND exactly when is PD. PD requires all leading minors of positive. But scaling a block by multiplies its determinant by , so the -th minor of equals . Demanding each gives (from : ) and (from : ) — the alternating pattern. Check: ✓; ✓. ND. Eigenvalues: , both . ✓

Recall Solution L2.3

Build : diagonals ; -coefficient , halved ⇒ off-diagonal . So . but . Not PD (need ), and fails the ND pattern too. A negative means the eigenvalues have opposite signs. Indefinite. Check: . ✓

Recall Solution L2.4

Build : diagonals ; only cross term is , halved ⇒ ; no or , so those off-diagonals are . Thus . ; ; . WHY (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 . The third column here is , so the only surviving term is the in position : sign , and deleting row 3 & column 3 leaves exactly the top-left block whose determinant is . Hence . All three PD.


Level 3 — Analysis

Now 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 (always true) and . . Answer: . At , ⇒ PSD boundary; beyond, indefinite.

Recall Solution L3.2

Build : the -coefficient is , halved ⇒ off-diagonal . So , . Indefinite ⇔ eigenvalues opposite signs ⇔ : . Answer: .

Recall Solution L3.3

ND needs and (the alternating pattern from L2.2). or . Intersect with : . Answer: . (Eigenvalues , both negative exactly when . ✓)


Level 4 — Synthesis

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. ; . So is critical. ✓ Step 2 — Hessian. , , . At : . Step 3 — classify . Eigenvalues ⇒ PD ⇒ local minimum (the blue bowl). Bonus — the other critical point : , mixed ⇒ indefinite ⇒ saddle (the red surface). This is the whole Second Derivative Test.

Recall Solution L4.2

WHAT (complete the square in ): WHY it proves PD: a sum of two squares is , and it equals only when and , i.e. . So for all PD. Implied eigenvalue signs: PD ⇒ both eigenvalues (indeed , , so and : both positive). This completing-the-square factorisation is exactly the idea behind Cholesky Decomposition — PD is precisely the condition that lets you write .

Recall Solution L4.3

always. Switch happens when changes sign: .

  • : PD.
  • : indefinite.
  • At : ⇒ one eigenvalue is , the other () positive ⇒ PSD. The knife-edge value is , type there = PSD.

Level 5 — Mastery

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, . Set . Because is orthogonal it preserves length, so , meaning . Step 2 — rewrite. . This is a weighted average of the eigenvalues with weights summing to . Step 3 — bound the average. Any weighted average lies between the smallest and largest ingredient: Step 4 — definiteness follows. If then for all unit (hence all by scaling) ⇒ PD. If ⇒ ND. If , the bounds straddle zero and the eigenvector directions realize both signs ⇒ indefinite.

Recall Solution L5.2

WHAT we must show: for all . Step 1 — substitute and regroup: Here we used to fold the two outer factors into one vector. Step 2 — name the inner vector. Let . Then Step 3 — WHY invertibility matters. We started with . Since is invertible, would force , a contradiction. Hence . Step 4 — apply PD of . Because is PD and , we have . Therefore So is positive definite. This is why a change of variables (as in Least Squares, where the normal-equation matrix is ) keeps a form positive definite.

Recall Solution L5.3

Sylvester: . . : expand along top row . All PD. Eigenvalues: for this tridiagonal matrix they are for , i.e. — all positive. ✓ PD confirmed.