Singular Value Decomposition (SVD)
Source: Unit 4 §10
Every matrix does the same two things to a vector: it scales it and it rotates it. SVD is the statement that those two effects can always be pulled apart and written down separately.
The slides for this section are largely image and equation pictures that do not extract as text. The statements, the matrix table and the applications come straight from them, but the derivations and the worked example are reconstructed from standard material and follow the slide flow rather than being transcribed from it. The same caveat applies to FP-Growth. Treat the results as reliable and the exact wording of the intermediate steps as this page's, not the lecturer's.
Intuition: what a matrix does to a vector
When you multiply a matrix by a vector, the vector scales and/or rotates. Do it to a whole set of vectors forming a circle or a sphere and the same thing happens to the shape. SVD finds the matrices that capture that rotation and that scaling.
- Multiplying by matrix gives a new coordinate system U, the principal axes.
- It also gives stretch factors α, the singular values.
The decomposition
Any matrix can be written as a product of three matrices:
| Matrix | What it is |
|---|---|
| U (m×m) | columns = **orthonormal eigenvectors of AAᵀ (the left** singular vectors uᵢ) |
| Σ (m×n) | diagonal, holding the singular values (the square roots of the eigenvalues) in descending order |
| Vᵀ (n×n) | rows = **orthonormal eigenvectors of AᵀA (the right** singular vectors vᵢ) |
Why AAᵀ and AᵀA are special
For any matrix , both AAᵀ and AᵀA are:
- Symmetric
- Square
- have the same positive eigenvalues
- have the same rank
ras
Because they are symmetric, their eigenvectors can be chosen to be
orthonormal - perpendicular and of unit length. Those are the singular
vectors: uᵢ from AAᵀ and vᵢ from AᵀA. The square roots of the shared
eigenvalues are the singular values .
Two vectors are orthogonal when their inner (dot) product is 0, which means the angle between them is 90°. Orthonormal means orthogonal and unit length.
The recipe
- Compute
AAᵀ, find its eigenvalues and eigenvectors, orthonormalize them (Gram-Schmidt): these are the columns of U. - Compute
AᵀA, find its eigenvalues and eigenvectors, orthonormalize them: these are the columns of V. - Build Σ as the diagonal of singular values , in descending order.
A compact worked example
Take the matrix .
- Form
AAᵀ. The diagonal entries are the squared row norms and the off-diagonal is the dot product of the two rows: . - Eigenvalues of
AAᵀare , so and . - Singular values are their square roots: and .
- Assemble Σ at the size of A:
.
U comes from the eigenvectors of
AAᵀ, and V from those ofAᵀA.
Three views of SVD, and its applications
- Dimensionality reduction - capture the essence of moving from higher to lower dimensions.
- Variance ordering - identify and order the dimensions along which the data varies most.
- Decorrelation - transform correlated variables into uncorrelated ones that expose the relationships.
Applications: Page Ranking, Recommendation Systems, Image Compression, Facial Recognition, Noise reduction.
A high-dimensional image of you is still recognisably you using just the top ~20% of dimensions - the ones with the largest singular values. The rest is redundancy and noise. That is low-rank approximation via SVD: keep the largest singular values, drop the small ones, and get massive compression with little information loss.