Singular Value Decomposition (SVD) Calculator

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.

A
m × n
=
U
m × m
×
Σ
m × n
×
Vᵀ
n × n

SVD Definition: For any m×n matrix A, there exists a factorization A = UΣVᵀ where U is an m×m orthogonal matrix, Σ is an m×n diagonal matrix with non-negative real numbers (singular values), and V is an n×n orthogonal matrix.

Grid Input
Text Input
Random Matrix
Matrix A
Enter matrix values separated by spaces, commas, or tabs. Each row on a new line.
Simple 2×2
Identity 3×3
Rank Deficient
Symmetric
Image-like
Data Science
Computing SVD...

Understanding Singular Value Decomposition

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:

  • U is an m×m orthogonal matrix (left singular vectors)
  • Σ is an m×n diagonal matrix with non-negative real numbers on the diagonal (singular values)
  • V is an n×n orthogonal matrix (right singular vectors)

Geometric Interpretation

1

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).

2

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.

3

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.

Applications of SVD

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

SVD Properties and Theorems

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.

Frequently Asked Questions

Eigenvalue decomposition (A = QΛQ⁻¹) only exists for square diagonalizable matrices. SVD (A = UΣVᵀ) exists for any matrix (rectangular or square). For symmetric positive definite matrices, SVD and eigenvalue decomposition coincide.

PCA is essentially SVD applied to a mean-centered data matrix. The principal components are the right singular vectors (columns of V), and the explained variance is proportional to the squared singular values.

For an m×n matrix (with m ≥ n), the computational complexity is O(mn²). For large matrices, truncated SVD algorithms (like randomized SVD) can compute only the top k singular values and vectors with complexity O(mnk).

The condition number is the ratio of the largest to smallest singular value (σ₁/σᵣ). A large condition number (>> 1) indicates the matrix is ill-conditioned, meaning small changes in input can cause large changes in output (sensitive to numerical errors).

An image can be represented as a matrix of pixel values. SVD compresses it by keeping only the k largest singular values and corresponding singular vectors. This creates a rank-k approximation that captures most of the image information with much less storage: instead of m×n values, we store k×(m+n+1) values.