🧮
🧮 Math & statistics

SVD Calculator (singular value decomposition A = U·Σ·Vᵀ)

Results update as you type.

Your numbers

Understanding the singular value decomposition calculator — concept and principle

This calculator computes the singular value decomposition (SVD) A = U·Σ·Vᵀ of any matrix. It returns the singular values, the left singular vectors U, the diagonal matrix Σ, the right singular vectors V, the rank and the shapes of the thin SVD. Use it in linear algebra courses, data compression, principal component analysis, least squares and signal processing.

Singular value decomposition of a 2×3 matrixA = U · Σ · VᵀA (2×3)1−13311=U.707−.707.707.707Σ4002.449V.707.5770.577.707−.577rotate → stretch → rotateAAᵀ = [11 5; 5 11] → 16, 6σ₁, σ₂4, 2.44949σ = √16, √6 · rank 2
The singular values 4 and √6 are the square roots of the eigenvalues 16 and 6 of AAᵀ.

How it is calculated

The page uses a one-sided Jacobi method and fixes signs so the largest entry of each vᵢ is positive; singular vectors are unique only up to such sign flips (and rotations within repeated σ).

The principle

Every linear map can be broken into three simple steps: a rotation or reflection (Vᵀ), a stretch along perpendicular axes (Σ), and another rotation or reflection (U). The SVD finds those steps. The right singular vectors are the input directions that A maps to perpendicular output directions; the singular values are the stretch factors. Keeping only the largest few singular values gives the best low-rank approximation of A, which is the idea behind image compression and PCA.

Worked example

Default: A = [1 −1 3; 3 1 1].

  1. AAᵀ = [11 5; 5 11], with eigenvalues 16 and 6, so σ = 4, 2.44949 (√6).
  2. v₁ = (1, 0, 1)/√2 ≈ (0.707107, 0, 0.707107); v₂ = (1, 1, −1)/√3 ≈ (0.57735, 0.57735, −0.57735).
  3. u₁ = A·v₁ ÷ 4 = (4/√2, 4/√2) ÷ 4 = (0.707107, 0.707107).
  4. u₂ = A·v₂ ÷ √6 = (−3/√3, 3/√3) ÷ √6 ≈ (−0.707107, 0.707107).
  5. Σ = [4 0; 0 2.44949]; rank 2; shapes U 2×2, Σ 2×2, V 3×2.

How to read the result

The number of non-zero singular values is the rank. The ratio σ₁ ÷ σ_k shows how close the matrix is to losing rank. Each term σᵢ·uᵢ·vᵢᵀ is a rank-one piece of A; the first terms capture most of its "energy" when the singular values drop quickly. Different software may show opposite signs for a pair uᵢ, vᵢ; both are correct.

Common mistakes

Keep in mind: Results are numerical approximations. Tiny singular values may be rounding noise; decide on a tolerance relative to σ₁ before treating them as zero.

Frequently asked questions

What is the difference between SVD and eigendecomposition?

SVD exists for every matrix and uses two orthonormal bases; eigendecomposition needs a square matrix and may not exist.

How is SVD used for compression?

Keeping the largest r singular values and their vectors gives the best rank-r approximation in the least-squares sense.

Why does my software show different signs?

Flipping the sign of both uᵢ and vᵢ gives the same product, so both versions are valid.

Sources: Coordinated Linear Algebra (University of Nebraska–Lincoln), §7.7 Singular Value Decomposition · J. Demmel, UC Berkeley Math 221, Lecture 3 (Fall 2011)

Checked 9 Nov 2026. Coordinated Linear Algebra (University of Nebraska–Lincoln), §7.7 Extra Topic: Singular Value Decomposition — Definition 7.7.1 (singular values = square roots of the positive eigenvalues of AᵀA), Theorem 7.7.3 (A = UΣVᵀ with orthogonal U, V), Example 7.7.5 (the default matrix: σ₁ = 4, σ₂ = √6); J. Demmel, UC Berkeley Math 221, Lecture 3 (Fall 2011).

🧮 All math & statistics tools →🌍 Calculators by country →