Singular Value Decomposition Calculator — SVD with Steps

Factor any real 2×2 through 8×8 matrix into A = UΣVᵀ. See the thin SVD, singular values, rank, Jacobi sweeps, and accuracy checks. Your entries stay in your browser.

Enter Matrix A

Enter real integers, decimals, or scientific notation. Display rounding does not change the calculation.

Separate entries with spaces, commas, or tabs and rows with new lines. Paste 2–8 rows and 2–8 entries per row.

Thin SVD Factors

Enter a valid matrix to calculate A = UΣVᵀ.
σ₁ = —

U

Σ

Vᵀ

Numerical rank
2-norm condition
Max orthogonality error
Relative reconstruction error

Advertisement

Step-by-Step SVD Working

The calculator scales A, uses right Jacobi rotations to make its working columns orthogonal, then normalizes and sorts those columns. For a wide matrix, it decomposes Aᵀ and swaps the left and right factors.

Calculate a matrix to see the orientation, column-correlation sweeps, singular-value extraction, and verification.

Singular Value Decomposition Formulas

For an m × n matrix and k = min(m,n), the thin SVD uses U of size m × k, diagonal Σ of size k × k, and Vᵀ of size k × n.

Factorization

A = UΣVᵀ

The columns of U and V are orthonormal, and the diagonal entries of Σ are nonnegative.

Singular values

σᵢ = √λᵢ(AᵀA)

Equivalently, the one-sided Jacobi method obtains each σᵢ as the norm of an orthogonalized working column.

Rank and 2-norm

rank(A) = #{σᵢ > τ}, ‖A‖₂ = σ₁

A scale-aware tolerance τ separates retained singular directions from numerical zero.

Numerical convention: Singular values are sorted largest first. Signs of matching columns of U and V may differ from other correct decompositions. Repeated singular values do not have unique singular vectors. The reported rank uses a floating-point tolerance, not an exact symbolic test.

How to Use the SVD Calculator

  1. Select the row and column counts, then enter every value or paste a complete matrix.
  2. Choose the displayed decimal places; intermediate calculations retain full browser precision.
  3. Select Calculate SVD to find U, Σ, and Vᵀ.
  4. Review the ordered singular values, rank, condition estimate, Jacobi sweeps, and reconstruction check. Copy or download the result if useful.

Worked 2×2 SVD Example

For the diagonal matrix A = [[3,0],[0,2]], its column directions are already orthogonal. The singular values are their lengths, 3 and 2, so one valid decomposition is:

U = I, Σ = diag(3,2), Vᵀ = I

The product UΣVᵀ reconstructs A exactly, the numerical rank is 2, and the 2-norm condition number is 3/2 = 1.5.

What SVD Is Used For

Least squares and pseudoinverses

Small singular values reveal directions where a linear system is weakly determined and can be truncated or regularized.

Low-rank approximation

Keeping the largest singular values gives the best rank-r approximation in the 2-norm and Frobenius norm.

Data compression and PCA

Dominant singular vectors identify strong directions in images, text matrices, and centered data.

SVD Calculator FAQs

What is singular value decomposition?

SVD writes any real matrix as A = UΣVᵀ. U and V supply orthonormal directions, while the nonnegative diagonal of Σ measures the strength of each paired direction.

Can I calculate SVD for a rectangular matrix?

Yes. This calculator accepts tall, square, and wide real matrices from 2×2 through 8×8 and returns the thin SVD.

What is the difference between full and thin SVD?

The full SVD includes complete square orthogonal U and V matrices. The thin form keeps only k = min(m,n) paired columns, which is enough to reconstruct A and is more compact.

How does this calculator find the SVD?

It uses one-sided Jacobi rotations on a scaled tall working matrix. Each sweep reduces correlations between column pairs. The final column lengths become singular values, normalized columns form one singular-vector factor, and the accumulated rotations form the other.

Why are my singular vectors different from another result?

Negating matching singular vectors leaves the product unchanged. If singular values repeat, any orthonormal basis of the corresponding singular subspace is valid.

How is rank estimated?

The calculator counts singular values above a tolerance based on the largest singular value, dimensions, and double-precision machine epsilon. Near the threshold, rank can change with small input perturbations.

Are my matrix values private?

Yes. Calculation, clipboard text, and downloaded files are created locally in your browser. This page does not send or save matrix entries.

Calculation Notes

Last reviewed: August 5, 2026 by the Starlight Tools editorial team.

Inputs use JavaScript double-precision arithmetic and must be zero or have magnitude from 10⁻¹⁰⁰ through 10¹⁰⁰. The one-sided Jacobi iteration is limited to 80 sweeps. Extremely ill-conditioned or nearly rank-deficient problems may require higher-precision numerical software.

Explore more tools