Singular Value Decomposition (SVD)
Eigendecomposition rotates, stretches, and rotates back (
SVD rotates from one basis, stretches, and rotates into a possibly different basis (
Understanding Singular Value Decomposition (SVD)
SVD is a powerful matrix decomposition technique that decomposes a matrix

-
: Left Singular Vectors ( ) - Columns of
are orthogonal eigenvectors of the symmetric matrix . - Provides the directions of maximum variance among the row space (features) of
.
- Columns of
-
: Singular Values ( ) - A diagonal matrix containing the singular values (
) of . Singular values measure the "strength" or importance of each mode (principal component).
- A diagonal matrix containing the singular values (
-
: Right Singular Vectors ( ) - Columns of
are orthogonal eigenvectors of the symmetric matrix . - Represents the Principal Components in the column space, or the directions where the data is most spread out.
- Columns of
Each of these components has a specific role in describing the structure and action of the matrix.
1. Left Singular Vectors ( from )
Mathematical Insight:
- The columns of
are called left singular vectors ( ); - They are orthogonal eigenvectors of the symmetric matrix
.
Role:
captures the relationships (covariance relationships) among the rows of (row-space). - If the rows represent features of data points,
identifies the directions of maximum variance among the row-space of the data.
Properties:
- Orthogonality: All left singular vectors are orthogonal (
for ). - Unit Length: Each ui u_i ui is normalized (
). - Variance Directions: Left singular vectors point in the directions that maximize the variance within the row-space of the matrix.
2. Right Singular Vectors ( from )
Mathematical Insight:
- The columns of
are called right singular vectors ( ); - They are orthogonal eigenvectors of the symmetric matrix
.
Role
- V describes the relationships ( covariance relationships ) among the columns of
(column-space). Columns in often correspond to features of data points. - If the rows of
represent data points, then identifies the principal components of the data: the directions in the feature space where the data exhibits the greatest variance.
Properties:
- Orthogonality: All right singular vectors are orthogonal (
for ). - Unit Length: Each vi v_i vi is normalized (
). - Principal Components: Same as the principal components calculated in Principal Component Analysis (PCA), pointing in the directions where the data has the highest variance (spread).
3. Singular Values ( )
Mathematical Insight:
is a diagonal matrix containing singular values ( ), which are always non-negative and ordered in decreasing magnitude:
Role:
- The singular values represent the "strength" of each mode or principal component of the matrix A.
- They indicate how much variance or "energy" is captured in the directions defined by the singular vectors.
Properties:
- Singular values are the square roots of the eigenvalues of both
and . - The number of non-zero singular values corresponds to the rank of the matrix
. - Geometrically, singular values are the lengths of the semi-axes of the ellipse obtained when transforming the unit circle via matrix
.
4. Mutual Properties of SVD (Orthonormal Bases & Vector Spaces)
- Both Left (
) and Right ( ) singular vectors form orthonormal bases for the row-space and column-space, respectively: - Orthogonal: Singular vectors are mutually perpendicular, implying they capture independent characteristics of the matrix.
- Normalized: Singular vectors are of unit length.
- These orthonormal bases allow SVD to expound the structure of the matrix
in terms of directions of maximum variance.
Geometric Interpretation of SVD
SVD explains

Physical Steps, Right-to-Left:
-
— Rotate the Input:
Align the incoming vector () with the "natural input axes" ( , the right singular vectors). -
— Stretch:
Scale each of the input axes by the singular values (). This step changes the lengths of vectors, i.e., the magnitude of stretching or shrinking. -
— Rotate the Output:
Reorient the stretched input vector (), turning it into the "natural output axes" ( , the left singular vectors).
Derivation: Where , , and Come From
The Trick — Turn a Rectangular Matrix Into a Symmetric One
The problem with a general
There are two ways to do this, and each hands us one half of the decomposition:
Both are symmetric (
Assembling the Three Factors
Start from the claim
Compare this with the eigendecomposition
| SVD factor | Comes from | Meaning |
|---|---|---|
| eigenvectors of |
natural axes of the input space | |
| eigenvalues of |
how much each axis stretches | |
| eigenvectors of |
natural axes of the output space |
That is the whole derivation. SVD is just two coupled eigendecompositions — one for the input space (
The right singular vectors are literally the eigenvectors of
Worked Example — SVD, Step by Step
Let us decompose:
Step 1 — Form
Step 2 — Eigenvalues of
Solve
The singular values are the square roots:
Sanity check: the product of singular values equals
. Here , and ✓
Step 3 — Right singular vectors
For
For
Step 4 — Left singular vectors
Step 5 — Assemble and verify
Multiplying
Applications & Practical Use
Low-Rank Approximation — The Superpower
Because the singular values are sorted
Keeping only the top
| Application | How SVD is used |
|---|---|
| Dimensionality reduction / PCA | Keep the top- |
| Image compression | Store only the top- |
| Recommender systems | Factor the sparse user–item matrix; latent factors = singular vectors |
| Latent Semantic Analysis (NLP) | SVD of a term–document matrix reveals hidden topics |
| Noise reduction / denoising | Small singular values usually correspond to noise — drop them |
| Solving least-squares / pseudo-inverse | The Moore–Penrose pseudo-inverse is built directly from the SVD |
A grayscale image is just a matrix of pixel intensities. Its SVD often has a handful of large singular values and a long tail of tiny ones. Reconstructing with only the top ~50 singular values (out of, say, 1000) can look nearly identical to the eye while storing a fraction of the numbers — that is lossy compression, powered entirely by dropping small
When to Reach for SVD?
- You have a rectangular matrix (more samples than features, or vice versa).
- You need numerical stability and can't afford the precision loss of forming a covariance matrix.
- You want a best low-rank approximation (compression, denoising, latent factors).
- You are implementing PCA and want the robust route.
Common Questions & Answers
Q1. How PCA and SVD Differ
They compute the same directions, but they are not interchangeable in practice. The differences matter.
| Aspect | PCA | SVD |
|---|---|---|
| What it operates on | The covariance matrix |
The data matrix |
| Requires centering? | Yes — data must be mean-centered (and usually standardized) | No — works on any matrix; centering is optional and only needed to make it equal PCA |
| Matrix shape | Needs a square, symmetric covariance matrix | Works on any |
| Numerical stability | Forming |
Operates on |
| Output | Eigenvectors (PCs) + eigenvalues (variance) | |
| Scope | A specific application (variance-maximizing projection) | A general matrix factorization — PCA is one of its many uses |
PCA is SVD in disguise. The principal components (
Real libraries (scikit-learn's PCA, NumPy, etc.) implement PCA using SVD under the hood, precisely because forming the covariance matrix throws away numerical precision. So even when you call PCA, SVD is usually doing the work.
This is worth repeating because it trips people up. Eigenvalues can be negative or complex (they describe how a square matrix scales a direction, sign included). Singular values are always
Q2. How SVD Orders Importance?
In Singular Value Decomposition (
By mathematical convention, the singular values in the diagonal matrix
Because the matrices
Q3. Why Are Singular Values ( ) Never Negative?
There are two primary ways to understand why
1. Geometrically: Scaling Factors Cannot Be Negative
Singular values represent the lengths of the principal semi-axes of the hyper-ellipsoid mapped by the matrix.
- Just as the length, width, or height of a physical box cannot be negative, the stretching factor (
) along a singular vector cannot be negative. - If a transformation reverses the direction of a vector, that directional flip is handled entirely by a sign change in the corresponding left singular vector (
), never by making the singular value ( ) negative.
2. Algebraically: They Are Square Roots of Positive Eigenvalues
The right singular vectors
Because
The singular values
Since we always take the principal (positive) square root of a non-negative number
Q4. What is "Thin" or "Truncated" or "Reduced" SVD?
In practical computer science and data science applications (like PCA or image compression), we often use a variation called Thin SVD (or Reduced SVD).
If
is truncated to size (which is not square). becomes a square diagonal matrix. remains square at .