How this calculation works
Scale the matrix to evaluate a stable two-by-two singular-value formula, then construct orthogonal factors and reconstruct the entered matrix. Singular values are nonnegative and sorted from largest to smallest. Equivalent decompositions can differ in vector signs or bases for repeated singular values.
A=UΣVᵀ; σᵢ² are eigenvalues of AᵀA; U and V are orthogonalA worked example
For diagonal matrix [[3,0],[0,2]], the singular values are 3 and 2. Identity orthogonal factors reconstruct A exactly in this simple case, and the two-norm condition number is 3/2.
Good to know
Real 2×2 matrices only. Numerical rank uses the stated relative 10⁻¹² threshold; it is not exact algebraic rank. Tiny singular values can be sensitive to determinant cancellation. No general rectangular/complex SVD or regression is provided.
Reference: SciPy: singular value decomposition convention (opens in a new tab) ↗
Singular values separate stretching from orthogonal factors
A real matrix can be written A=UΣVᵀ with orthogonal U and V and a diagonal nonnegative Σ. For this two-by-two calculator, the singular values are ordered from larger to smaller and the factors are displayed explicitly.
A diagonal matrix with entries 3 and 2 has singular values 3 and 2. Its condition number in the two-norm is 3/2. A negative diagonal entry changes an orthogonal factor’s sign rather than requiring a negative singular value.
The basis and dimension finder uses bounded exact rational elimination. The 2×2 SVD calculator also describes numerical stretching and conditioning under its declared threshold.
Equivalent factor matrices can look different
Flipping the same associated column signs in U and V preserves their product with Σ. Repeated singular values allow still more freedom in choosing bases. Matching another implementation’s factor entries character for character is therefore not a reliable correctness test.
Reconstruction and orthogonality are better checks. This page multiplies its factors back together and reports the Frobenius norm of the difference from the input. Floating-point rounding can leave a small nonzero residual.
Numerical rank is threshold dependent
The displayed rank counts the smaller singular value only when it exceeds 10⁻¹² times the larger one. That is a declared numerical convention, not a claim about exact rank over rational numbers. The reconstruction still retains the computed small singular value.
The basis and dimension finder uses exact rational elimination under its own bounded-input scope. Its rank question differs from the conditioning question shown here. The Gram–Schmidt calculator constructs an orthogonal basis; it does not by itself compute this singular-value factorization.
A few questions, answered
Why can another SVD use opposite vector signs?
Associated orthogonal-factor sign changes can preserve the same decomposition. Compare reconstruction and orthogonality rather than signs alone.
Does numerical rank one prove the matrix is exactly singular?
No. A very small second singular value can fall below the chosen threshold without being exactly zero.
Can I enter a rectangular matrix?
No. This page is deliberately scoped to a real two-by-two matrix.