SVD Calculator

Enter the four entries of a 2×2 matrix A = [[a, b], [c, d]] to compute its singular value decomposition A = UΣVᵀ — the singular values σ₁, σ₂ and the orthogonal matrices U and V.

Quick Facts

Decomposition
A = UΣVᵀ
U and V are orthogonal matrices (unit-length, mutually perpendicular columns); Σ is diagonal with non-negative entries.
Singular values
σᵢ = √λᵢ(AᵀA)
The σᵢ are the square roots of the eigenvalues of AᵀA, ordered largest to smallest.
Rank & conditioning
rank(A) = # of σᵢ > 0
The condition number σ₁/σ₂ measures how close A is to singular; larger means more ill-conditioned.

Your Results

Calculated
σ₁ (largest singular value)
-
√(largest eigenvalue of AᵀA)
σ₂ (smallest singular value)
-
√(smallest eigenvalue of AᵀA)
U (left singular vectors)
-
Orthogonal matrix, columns u₁, u₂
V (right singular vectors)
-
Orthogonal matrix, columns v₁, v₂
Rank
-
Number of non-zero singular values
Condition number
-
σ₁ / σ₂

Ready

Enter the four entries of a 2×2 matrix, then press Calculate.

How the SVD Calculator works

The singular value decomposition (SVD) factors any matrix A into three parts: A = UΣVᵀ, where U and V are orthogonal matrices — their columns are unit-length and mutually perpendicular — and Σ is a diagonal matrix of non-negative singular values, ordered from largest to smallest. For a 2×2 matrix A = [[a, b], [c, d]], this calculator computes the exact, closed-form SVD directly from a, b, c, and d — no iteration required.

Formula and method

The singular values come from the eigenvalues of AᵀA, a symmetric 2×2 matrix with entries m₁₁ = a² + c², m₂₂ = b² + d², and m₁₂ = ab + cd. Its eigenvalues are λ = (m₁₁ + m₂₂)/2 ± √[((m₁₁ − m₂₂)/2)² + m₁₂²], so the singular values are σ₁ = √λ₁ (the larger root) and σ₂ = √λ₂ (the smaller root). The right singular vectors — the columns of V — are the eigenvectors of AᵀA, found from the rotation angle θ = ½·atan2(2m₁₂, m₁₁ − m₂₂): v₁ = (cos θ, sin θ) and v₂ = (−sin θ, cos θ). The left singular vectors — the columns of U — then follow directly from uᵢ = A·vᵢ / σᵢ whenever σᵢ > 0; if a singular value is zero, its paired left vector is instead chosen perpendicular to the other one so that U stays orthogonal.

Reading the result

σ₁ is always the larger singular value and equals the matrix's operator (spectral) 2-norm — the largest factor by which A can stretch a unit vector. σ₂ is the smallest stretch factor. If σ₂ = 0, the matrix is singular (rank 1, assuming A is not the zero matrix) and collapses some direction to the zero vector. The ratio σ₁/σ₂ is the condition number: values near 1 mean the matrix scales all directions similarly, while very large values signal a matrix that is nearly singular and numerically sensitive to round-off in applications such as solving linear systems or matrix inversion.

Common sources of error

  • Row/column mix-up: this calculator uses A = [[a, b], [c, d]] with a, b as row 1 and c, d as row 2 — double-check your entries match that layout before comparing against another source.
  • Sign ambiguity: singular vectors are only unique up to a sign flip (u and −u paired with −v and v give the same product) — different tools may report a mathematically equivalent but sign-flipped U and V.
  • Rounding early: the closed-form angle θ and σᵢ should be carried at full precision; rounding σᵢ before computing U can visibly break the orthogonality of U's columns.

Applications

  • Image compression and noise reduction keep only the largest singular values/vectors to approximate a matrix with less data.
  • Principal component analysis (PCA) uses the SVD of a centered data matrix to find directions of maximum variance.
  • Numerical linear algebra uses the condition number σ₁/σ₂ to flag matrices that will amplify round-off error when solving Ax = b.
  • Least-squares and pseudoinverse (Moore–Penrose) solutions are built directly from a matrix's SVD.

Frequently Asked Questions

What does A = UΣVᵀ mean?
It means any matrix A can be written as a rotation/reflection V, followed by scaling along orthogonal axes by the singular values in Σ, followed by another rotation/reflection U. U and V are orthogonal matrices and Σ is diagonal with non-negative entries sorted from largest to smallest.
How do you find the SVD of a 2×2 matrix by hand?
Compute AᵀA, find its eigenvalues λ₁ ≥ λ₂ (the singular values are σ₁ = √λ₁, σ₂ = √λ₂) and its eigenvectors (the columns of V), then get each column of U from uᵢ = A·vᵢ / σᵢ. For a 2×2 matrix this reduces to closed-form rotation-angle formulas, so no iterative algorithm is needed.
What happens if a singular value is zero?
A zero singular value means the matrix is singular (not invertible) — it collapses at least one direction to the zero vector. The rank of the matrix equals the number of non-zero singular values, so a 2×2 matrix with one zero singular value has rank 1.
How are singular values different from eigenvalues?
Eigenvalues are only defined for square matrices and can be negative or complex; singular values are always real and non-negative and are defined for any matrix, including non-square ones. For a symmetric positive semi-definite matrix the singular values equal the eigenvalues; in general the singular values of A are the square roots of the eigenvalues of AᵀA.