Worked examples — Singular Value Decomposition (SVD) — full derivation
Everything below leans on the parent recipe: the four-step SVD recipe. When we say "form " we mean the gateway from Positive Semi-Definite Matrices whose eigenbasis comes from the Spectral Theorem.
The scenario matrix
Every matrix you could be handed falls into one of these case classes. The last column says which worked example nails that cell.
| # | Case class | What makes it tricky | Covered by |
|---|---|---|---|
| C1 | Square, full-rank, symmetric | Do equal the eigenvalues? Signs! | Example 1 |
| C2 | Square, negative eigenvalue | but | Example 2 |
| C3 | Square, complex eigenvalues (rotation-like) | has no real eigenvectors | Example 3 |
| C4 | Diagonal with mixed signs | Is just $ | A |
| C5 | Tall, rank-deficient (, ) | Zero , null space, extend | Example 5 |
| C6 | Wide, full row rank (, ) | Null space lives in the 's | Example 6 |
| C7 | Wide, rank-deficient (, ) | Zeros in BOTH the 's and 's | Example 7 |
| C8 | Zero / degenerate matrix | , limiting case | Example 8 |
| C9 | Word problem (data / stretching) | Read geometry off the | Example 9 |
Notation reminder, so no symbol is unearned:
- = transpose: flip across its diagonal (rows become columns).
- = length of vector , .
- if , else (the "are-they-the-same-index?" switch).
- = determinant; solving finds eigenvalues of (see Eigenvalues and Eigenvectors).
- = rank = number of nonzero singular values = number of truly independent directions keeps.
- and : defined in the callout above.
Example 1 — C1: symmetric, full-rank square
Forecast: guess the singular values before reading. Diagonal, positive... does just copy ?
- Form . Why this step? It is the safe symmetric gateway from the parent recipe.
- Eigenvalues. Already diagonal: . So . Why this step? ; ordering biggest-first means .
- Build . Eigenvector of is ; of is . So . Why this step? We must list the in the same order as the .
- Define . ; . So . Why this step? Defining from locks the correct sign (avoids the parent's "sign trap").
Verify: ✓ Note 's got reordered from 's entries — copying is not automatic.
Example 2 — C2: a negative eigenvalue
Forecast: has eigenvalue . Will a singular value be ?
- Form . . Why this step? Squaring kills the sign — that is exactly the point.
- Eigenvalues of : . So . Why this step? always, unlike .
Verify: , not . The reflection (negative eigenvalue) is stored inside , not . Sanity: . ✓ This directly answers the parent's mistake box: singular values are never the eigenvalues of .
Example 3 — C3: complex eigenvalues (a rotation)
Forecast: a rotation turns every vector without changing its length. What should the be?

Figure s01 (Example 3). Left: the blue unit circle of inputs. Right: the same circle after applying (red) — still a unit circle, and the yellow arrow shows one input landing at the same length. Use it in step 3: no direction is stretched, so every .
- Recall the trap. 's eigenvalues are — complex, so has no real eigenvectors. Eigen-decomposition fails over . SVD does not care. Why this step? Motivates why (real, symmetric) rescues us.
- Form . Any rotation satisfies , so . Why this step? Rotation columns are orthonormal, giving the identity.
- Eigenvalues of : the characteristic polynomial is , a repeated root (multiplicity two). So . Why this step? : a rotation stretches nothing — matching figure s01.
- Build . With , any orthonormal works — take . Then , so . Why this step? , so trivially. The whole matrix hides in the rotation .
Verify: and both singular values equal (the characteristic polynomial has the single distinct root ). Geometrically, the red circle in figure s01 never grew. ✓
Example 4 — C4: diagonal with mixed signs
Forecast: which entry becomes ?
- Form . Diagonal squared: . Why this step? Gateway; diagonals square entrywise.
- Eigenvalues . Rank . Why this step? Order biggest-first: .
- : columns are standard basis reordered to match — . Why this step? 's columns must appear in the same order as the — carries , carries , and carries , so they line up as .
- : ; ; complete with . Why this step? The sign in absorbs 's negative entry.
Verify: singular values are sorted — absolute values, then descending. ✓
Example 5 — C5: tall, rank-deficient
Forecast: the second column is exactly twice the first... how many nonzero ?
- Form . . Why this step? is (not square), so it has no eigenvalues of its own; is the symmetric gateway we can diagonalize.
- Eigenvalues: . So . Rank . Why this step? One zero eigenvalue confirms the dependent columns.
- : for : , so . For : . Why this step? (with ) spans the null space: .
- : . Then extend by Gram–Schmidt to ; e.g. , . Why this step? span the left null space — the directions never reaches.
Verify: . ✓ And . ✓
Example 6 — C6: wide, full row rank
Forecast: more input directions () than output (). Where does the extra dimension go?
- Form (): . Why this step? is always ; here that is .
- Eigenvalues . Rank . Why this step? , ordered biggest-first; the single zero eigenvalue tells us one input direction is killed even though the two rows are independent.
- : (the direction has ). Why this step? is the null direction: .
- (): ; . . Why this step? Only left singular vectors are needed and , so is already complete.
- is : . Why this step? takes the shape of — the parent's third mistake box.
Verify: : has rows . Reconstruction gives back . Check sum of squared entries of (Frobenius). ✓
Example 7 — C7: wide AND rank-deficient
Forecast: wide and the rows are dependent. How many nonzero , and how many zero directions in total?
- Form (): . Why this step? The safe gateway; it will expose two zero eigenvalues (one from the wide shape, one from the dependent rows).
- Eigenvalues: the top-left block gives ; the third row/column contributes another . So . Rank . Why this step? Only one nonzero singular value survives — the matrix truly keeps a single direction.
- : for : , so . The null space (spanning ) is . Why this step? both satisfy — the whole -dimensional null space of a wide rank-deficient matrix.
- (): . Complete with . Why this step? spans the left null space; never reaches that output direction.
Verify: . ✓ Both and . ✓ Two zero directions confirm the double .
Example 8 — C8: the zero / degenerate matrix
Forecast: a matrix that sends everything to the origin. What is ?
- Form . Why this step? Even a fully degenerate matrix runs through the same gateway; is still symmetric and its eigenvalues still give the .
- Eigenvalues both . Rank . Why this step? No stretching in any direction — total collapse.
- : , so any orthonormal work; take . Why this step? With we can never use (division by ), so we free-choose an orthonormal completion — the parent's Gram–Schmidt extension in the extreme.
Verify: . ✓ This is the limit of shrinking every : the geometry degenerates to a point.
Example 9 — C9: a word problem (stretching data)
Forecast: the biggest possible over unit is exactly — guess it.

Figure s02 (Example 9). Left: the blue unit circle of possible unit inputs, with the best direction (yellow) and the erased direction (red). Right: after , the circle collapses to the red flat segment of half-length on the -axis; the yellow arrow is the maximal stretch, and lands on the origin. Read part (a) off the yellow arrow's length and part (b) off the red arrow.
- Model. Max amplification ; erased directions have . Why this step? This is the operational meaning of singular values.
- Form . Why this step? The gateway again: its top eigenvalue's square root is precisely that maximal amplification factor we were asked for, and its zero eigenvalue flags the erased direction.
- Eigenvalues: . So . Why this step? answers (a); flags an erased direction.
- Right vectors: : , . : . Why this step? is the input direction with : the answer to (b).
Verify (a): feed the best input : , length . ✓ Verify (b): — the direction (i.e. to ) is erased. ✓ See figure s02: the blue unit circle becomes the red flat segment of half-length on the -axis; the perpendicular blue arrow lands on the origin.
Recall Which cell did each example solve?
C1→Ex1, C2→Ex2, C3→Ex3, C4→Ex4, C5→Ex5, C6→Ex6, C7→Ex7, C8→Ex8, C9→Ex9. ::: Every row of the scenario matrix is covered, including both wide-full-rank and wide-rank-deficient.
Related pages worth revisiting after this: Low-Rank Approximation (keep only the top ), Principal Component Analysis (PCA) (SVD of centred data), and Moore-Penrose Pseudoinverse (invert by on nonzero ).