Math July 19, 2026 · 11 min read

Singular Value Decomposition: A Complete Guide to SVD and Singular Values

Learn how to compute singular values using Singular Value Decomposition (SVD). Understand the formula A = UΣV^T, see step-by-step examples, and explore applications in data compression and PCA.

Singular Value Decomposition (SVD) is often called the "Swiss army knife" of linear algebra because it solves an astonishing variety of problems. From compressing images to finding patterns in data, from computing pseudoinverses to detecting numerical rank, SVD provides a unified framework that works for any matrix — square or rectangular, symmetric or asymmetric, full-rank or rank-deficient. Understanding singular values and the decomposition that produces them is essential for anyone working in data science, machine learning, signal processing, or computational science.

The singular values of a matrix measure how much the matrix "stretches" space in different directions. They generalize eigenvalues to non-square and non-symmetric matrices, providing a complete description of a matrix's geometric behavior. The SVD factorization A = UΣV^T separates the rotation, scaling, and rotation components of a matrix, revealing its fundamental structure.

Key Takeaway

Singular Value Decomposition factors any matrix A into UΣV^T, where U and V are orthogonal matrices and Σ is a diagonal matrix of non-negative singular values. The singular values are the square roots of the eigenvalues of ATA (or AAT). SVD is unique up to ordering, provides the best low-rank approximation (Eckart-Young theorem), and is fundamental to PCA, data compression, and pseudoinverse computation.

What Is the Singular Value Decomposition?

The Singular Value Decomposition expresses any m × n matrix A as the product of three matrices: A = UΣVT. Here, U is an m × m orthogonal matrix whose columns are the left singular vectors, Σ is an m × n diagonal matrix with non-negative real entries (the singular values) arranged in descending order on the diagonal, and VT is the transpose of an n × n orthogonal matrix V whose columns are the right singular vectors.

The left singular vectors (columns of U) form an orthonormal basis for the column space of A, while the right singular vectors (columns of V) form an orthonormal basis for the row space of A. The singular values quantify the magnitude of each "direction" of transformation — they tell you how much A stretches along each singular vector direction.

A = U × Σ × VT

U: m × m orthogonal (left singular vectors)
Σ: m × n diagonal with σ₁ ≥ σ₂ ≥ ... ≥ σᵣ > 0
V: n × n orthogonal (right singular vectors)

Singular values: σᵢ = √(eigenvalue of ATA)

Relationship to Eigenvalues

The singular values of A are intimately related to the eigenvalues of ATA. Specifically, if λ₁ ≥ λ₂ ≥ ... ≥ λₙ are the eigenvalues of ATA, then the singular values are σᵢ = √λᵢ. This relationship provides the computational foundation for SVD: compute ATA, find its eigenvalues, take square roots, and construct the singular vectors from the eigenvectors. For symmetric positive semi-definite matrices, the singular values equal the eigenvalues.

Ordering of Singular Values

By convention, singular values are ordered in descending order: σ₁ ≥ σ₂ ≥ ... ≥ σᵣ > 0 = σᵣ₊₁ = ... = σₘ, where r is the rank of A. The number of non-zero singular values equals the rank of the matrix. The largest singular value σ₁ equals the spectral norm ||A||₂, measuring the maximum stretching factor of the matrix. The ratio σ₁/σₙ (for full-rank square matrices) is the condition number, which measures numerical sensitivity.

How to Compute Singular Values

Computing singular values involves a sequence of steps that reduces the problem to an eigenvalue computation. For a matrix A of size m × n, first compute the product ATA (an n × n symmetric positive semi-definite matrix). Then find the eigenvalues of ATA using any eigenvalue algorithm (such as the QR algorithm). The singular values are the square roots of these eigenvalues. The right singular vectors are the eigenvectors of ATA, and the left singular vectors can be computed as uᵢ = Avᵢ/σᵢ.

Consider the 2×2 matrix A = [[3, 0], [0, 2]]. Computing ATA gives [[9, 0], [0, 4]], which has eigenvalues 9 and 4. The singular values are √9 = 3 and √4 = 2. The singular vectors are the standard basis vectors since ATA is already diagonal. This simple example illustrates the general process — for larger matrices, the eigenvalue computation requires iterative algorithms.

StepOperationResult
1Compute ATAn × n symmetric positive semi-definite matrix
2Find eigenvalues of ATAλ₁ ≥ λ₂ ≥ ... ≥ λₙ ≥ 0
3Compute σᵢ = √λᵢSingular values in descending order
4Compute right singular vectors VEigenvectors of ATA form columns of V
5Compute left singular vectors Uuᵢ = Avᵢ / σᵢ for non-zero σᵢ

For numerical computation, most software uses bidiagonalization followed by the QR algorithm rather than explicitly forming ATA, because this approach is more numerically stable and preserves the condition number. Libraries like LAPACK, NumPy, and MATLAB implement optimized SVD algorithms that handle large matrices efficiently.

Properties of Singular Values

Singular values have several fundamental properties that make them powerful tools for matrix analysis. They are always non-negative real numbers, regardless of whether the original matrix is real or complex. The largest singular value equals the spectral norm of the matrix: σ₁ = ||A||₂, which measures the maximum factor by which A can stretch a unit vector. The number of non-zero singular values equals the rank of the matrix.

Properties:
σᵢ ≥ 0 for all i
σ₁ = ||A||₂ (spectral norm)
rank(A) = number of non-zero σᵢ
||A||_F = √(σ₁² + σ₂² + ... + σᵣ²) (Frobenius norm)

The Frobenius norm of A equals the square root of the sum of squared singular values. The nuclear norm equals the sum of singular values. These norm relationships connect SVD to optimization, where minimizing nuclear norm promotes low-rank solutions — a principle used in matrix completion and compressed sensing.

Eckart-Young Theorem

The Eckart-Young theorem states that the best rank-k approximation to a matrix A (in both the spectral norm and Frobenius norm) is obtained by truncating the SVD: keep only the k largest singular values and their corresponding singular vectors. The approximation error equals σₖ₊₁ (for spectral norm) or √(σₖ₊₁² + ... + σᵣ²) (for Frobenius norm). This theorem is the theoretical foundation for principal component analysis and data compression via SVD.

Applications

Data Compression

Truncated SVD is widely used for data compression. An m × n matrix requires mn values to store. A rank-k approximation using truncated SVD requires only k(m + n) values — a dramatic reduction when k is much smaller than m and n. For images, this means storing a few singular values and vectors instead of every pixel, achieving significant compression while preserving the most important visual information.

Principal Component Analysis

PCA identifies the directions of maximum variance in a dataset. Computing the SVD of the centered data matrix yields the principal components as the right singular vectors, and the variance explained by each component is proportional to the square of the corresponding singular value. PCA is fundamental to dimensionality reduction, visualization, and feature extraction in machine learning.

Recommender Systems

In collaborative filtering (as popularized by the Netflix Prize), SVD decomposes the user-item rating matrix to discover latent factors. By truncating to a small number of singular values, the algorithm captures the most important patterns in user preferences while filtering out noise. This low-rank approximation predicts missing ratings and powers recommendation engines.

Pseudoinverse Computation

The Moore-Penrose pseudoinverse A⁺ is computed from the SVD as A⁺ = VΣ⁺UT, where Σ⁺ is formed by taking the reciprocal of each non-zero singular value. The pseudoinverse provides the least squares solution to Ax = b: x = A⁺b. It works for any matrix — square or rectangular, full-rank or rank-deficient — making it a generalization of the matrix inverse.

Numerical Stability

SVD is used to assess and improve numerical stability. The condition number κ(A) = σ₁/σₙ measures how sensitive solutions are to perturbations in the input. Large condition numbers indicate ill-conditioned systems where small errors in the data produce large errors in the solution. SVD-based methods (like truncated SVD regularization) can stabilize these computations by filtering out small singular values that amplify noise.

Common Mistakes

  • Confusing singular values with eigenvalues: Singular values are square roots of eigenvalues of ATA, not eigenvalues of A. For non-symmetric matrices, eigenvalues can be complex while singular values are always real and non-negative.
  • Ignoring ordering: Singular values must be listed in descending order. Incorrect ordering breaks the truncated SVD approximation and the Eckart-Young theorem application.
  • Assuming SVD is unique: While the singular values are unique, the singular vectors are not — each singular vector can be multiplied by −1 without changing the SVD. For repeated singular values, the corresponding singular vectors are not uniquely determined.
  • Using SVD for small problems: For small, well-conditioned square systems, direct methods (LU decomposition, Gaussian elimination) are faster than SVD. SVD excels for large, rectangular, or ill-conditioned problems.
  • Forgetting numerical precision: In floating-point computation, very small singular values may be spurious (due to rounding errors). Treat singular values below a threshold (typically ε × σ₁) as zero to avoid numerical instability.

FAQs

What are singular values? Singular values are the non-negative real numbers σ₁ ≥ σ₂ ≥ ... that appear on the diagonal of the Σ matrix in SVD. They measure how much the matrix stretches along each principal direction and are equal to the square roots of the eigenvalues of ATA.

Can singular values be negative? No. By definition, singular values are always non-negative real numbers. They are square roots of eigenvalues, which are non-negative for the symmetric positive semi-definite matrix ATA.

What is the difference between SVD and eigendecomposition? Eigendecomposition applies only to square matrices and produces A = PDP-1, where D contains eigenvalues (which can be negative or complex). SVD applies to any matrix and produces A = UΣVT, where Σ contains non-negative singular values. For symmetric positive semi-definite matrices, SVD and eigendecomposition coincide.

How does truncated SVD work for compression? Truncated SVD keeps only the k largest singular values and their corresponding singular vectors, discarding the rest. This produces a rank-k approximation that captures the most important information in the matrix, achieving compression by storing k(m + n) values instead of mn.

What is the condition number? The condition number κ(A) = σ₁/σₙ is the ratio of the largest to smallest singular value. It measures how sensitive the matrix is to perturbations: κ ≈ 1 means well-conditioned (stable), while κ >> 1 means ill-conditioned (unstable). A singular matrix has κ = ∞.

Conclusion

Singular Value Decomposition is one of the most powerful and versatile tools in linear algebra. By decomposing any matrix into its singular values and vectors, SVD reveals the fundamental geometric structure of the transformation it represents. From data compression to PCA, from recommender systems to numerical stability analysis, SVD provides elegant solutions to a vast range of problems.

Ready to compute the singular values of your matrix? Use our Singular Values Calculator for instant results with the complete SVD decomposition. Explore related tools for Pseudoinverse, QR Decomposition, and Matrix Rank to deepen your understanding of matrix factorizations.