Compute the SVD decomposition of any matrix. Get U, Σ, V matrices with step-by-step solutions. Essential tool for data science, machine learning, and linear algebra.
Singular Value Decomposition (SVD) is a fundamental matrix factorization technique in linear algebra that decomposes any real or complex matrix into three constituent matrices. It has wide applications in signal processing, statistics, machine learning, and data science.
Mathematical Definition:
For any m×n matrix A (with real or complex entries), there exists a factorization of the form:
A = UΣVᵀ
where:
Linear Transformation: Any matrix A represents a linear transformation. SVD shows that this transformation can be decomposed into three simple operations: rotation/reflection (Vᵀ), scaling (Σ), and another rotation/reflection (U).
Eigenvalue Connection: The singular values of A are the square roots of the eigenvalues of AᵀA (or AAᵀ). The columns of U are eigenvectors of AAᵀ, and the columns of V are eigenvectors of AᵀA.
Rank and Null Space: The number of non-zero singular values equals the rank of A. The columns of U and V corresponding to zero singular values span the null space and left null space of A.
| Application | How SVD is Used | Example |
|---|---|---|
| Principal Component Analysis (PCA) | Dimensionality reduction by keeping dominant singular vectors | Data visualization, feature extraction |
| Image Compression | Low-rank approximation by truncating small singular values | JPEG compression, image denoising |
| Recommendation Systems | Matrix completion for user-item rating matrices | Netflix recommendations, Amazon suggestions |
| Natural Language Processing | Latent Semantic Analysis (LSA) for document-term matrices | Document clustering, topic modeling |
| Signal Processing | Noise reduction via singular value thresholding | Audio enhancement, image restoration |
| Linear Least Squares | Solving ill-conditioned systems using pseudoinverse | Regression analysis, curve fitting |
Eckart-Young Theorem: The best rank-k approximation to a matrix A (in Frobenius norm) is given by truncating its SVD to the k largest singular values and corresponding singular vectors.
Pseudoinverse: The Moore-Penrose pseudoinverse A⁺ can be computed from SVD as A⁺ = VΣ⁺Uᵀ, where Σ⁺ is obtained by taking reciprocal of non-zero singular values and transposing.
Matrix Norms: The Frobenius norm of A equals the square root of the sum of squares of singular values. The spectral norm (2-norm) equals the largest singular value.
[[1,0],[0,1]]
Identity
[[3,1],[1,3]]
Symmetric
[[1,2],[2,4]]
Rank-deficient
[[1,0,0],[0,2,0],[0,0,3]]
Diagonal
[[1,2,3],[4,5,6]]
Rectangular