Singular value decomposition
A supplied real SVD writes a matrix action as input coordinates, nonnegative axial scaling, then output coordinates.
On this page 9 sections
- Overview
- Singular value decomposition, or SVD, describes what a matrix does to vectors
- U and V are orthogonal: they preserve lengths and angles, and may rotate or reflect
- Sometimes a problem gives the output basis columns instead of an action rule
- A closer look
- Key takeaway
- Further questions
- Sources & further reading
- Concept connections
01Singular value decomposition, or SVD, describes what a matrix does to vectors#
Singular value decomposition, or SVD, describes what a matrix does to vectors. A matrix may mix coordinates so its individual entries hide which directions it stretches or loses. SVD separates that action into a change of coordinates, a stretch along perpendicular axes, and a change to output coordinates.
Imagine a two-input sensor whose outputs mix both measurements. SVD finds perpendicular input directions that the sensor handles separately. Each has a matching output direction and a nonnegative stretch factor. A large factor means a strong response along that direction; a zero factor means that direction disappears.
The factorization is . The columns of are input directions; measures a vector along them. The diagonal entries of are the singular values, written . The columns of are output directions. Here the factors are supplied: you will follow their action, rather than calculate a factorization from scratch.
Matrix products act on a vector from the right. First calculate , then , then . These are three different coordinate lists. Writing each one down prevents a common mistake: treating the scaled internal coordinates as the final output .
In the example ahead, means “put the second input first, then negate the first.” For , substitute , giving . The letters are placeholders; use the newest pair at every stage.
Start with . It gives right-singular coordinates. For and , these are .
Continue with right coordinates . Scales give . Then turns those into output .
Follow the complete example again: becomes . Scaling by gives . Finally gives . Each factor consumes the previous result, never the original input again.
SVD: ; ; . Input . Output?
Show answer and explanation
; output .
02U and V are orthogonal: they preserve lengths and angles, and may rotate or reflect#
and are orthogonal: they preserve lengths and angles, and may rotate or reflect. scales along coordinate axes; a zero scale erases that coordinate. Apply these actions in their supplied order.
SVD: ; ; . Input . Using first gave . Repair.
Show answer and explanation
First: .
03Sometimes a problem gives the output basis columns instead of an action rule#
Sometimes a problem gives the output basis columns instead of an action rule. If has columns , then . Multiply each entire column by its matching coefficient, then add matching entries. This is the column-combination view of matrix multiplication you already learned.
For and singular values , first get . With and , the contributions are and . Adding gives . The pair was a pair of weights, not the answer in the original output axes.
Right coordinates can be supplied directly. For , scales give . With and , return to output coordinates by combining these basis vectors.
Right coordinates ; scales . Left basis: , . Output?
Show answer and explanation
give .
04A closer look#
In a data matrix, this separation lets us describe strong patterns with a few direction pairs. Later lessons keep the largest components to compress a matrix and use input directions to build PCA features. Reading the three factors now makes those methods interpretable instead of turning them into unexplained formulas.
The small problems use square, two-dimensional factors so every step is visible. SVD also works for rectangular matrices: the input and output spaces can have different sizes. A full real factorization of an matrix uses of size , of size , and of size .
Read right to left: use V-transpose for input coordinates, Sigma for their scales, and U for output coordinates.
- Interpret the three transformations in a supplied SVD.
Further questions
How do the singular scales reveal rank?
Sources & further reading
- [1]
- [2]Jay Gopalakrishnan, The Singular Value Decomposition ↗Textbook · Book