SVD Calculator - 2x2 and 3x3 U, Sigma, V^T Solver

Use this SVD calculator to factor a 2x2 or 3x3 matrix into U, Sigma, and V^T, then verify the result with a reconstruction check.

Updated: June 16, 2026 • Free Tool

SVD Calculator

Pick 2x2 for a 2x2 input or 3x3 for a 3x3 input. Extra entries can be left at zero in 2x2 mode.

Top-left entry of A.

First row, second column. In 2x2 mode this is the only off-diagonal.

First row, third column. Leave at 0 in 2x2.

Second row, first column of A.

Second row, second column of A. Bottom-right in 2x2 mode.

Second row, third column. Leave at 0 in 2x2.

Third row, first column. Leave at 0 in 2x2.

Third row, second column. Leave at 0 in 2x2.

Bottom-right entry of A. Leave at 0 in 2x2.

Results

Largest singular value
0
\u03c3\u2081 (largest) 0
\u03c3\u2082 (middle) 0
\u03c3\u2083 (smallest) 0
Spectral norm \u2016A\u2016\u2082 0
Condition number \u03ba\u2082(A) 0
Numerical rank 0
Reconstruction error 0
U (left singular vectors)
 
\u03a3 (singular values)
 
V (right singular vectors)
 
V\u1d40 (transpose of V)
 

What Is an SVD Calculator?

An SVD calculator turns a real 2x2 or 3x3 matrix into the three building blocks of the singular value decomposition: the orthogonal U of left singular vectors, the diagonal Sigma of singular values, and the orthogonal V of right singular vectors. V^T is shown as a separate panel so you can read A = U * Sigma * V^T directly, with the spectral norm, condition number, numerical rank, and a reconstruction check.

  • PCA prep: Read sigma values and right singular vectors before PCA.
  • Low-rank approximation: Keep the top k sigma values and rebuild a rank-k matrix.
  • Conditioning checks: Pull the condition number before inversion or any iterative solve.
  • Teaching: Compare the output against a hand-derived SVD for [[1, 1], [0, 1]] or diag(3, 4, 5).

The factorization always exists for any real matrix, with the singular values sorted in descending order so sigma_1 is always the largest. For 2x2 the panels are 2x2; for 3x3 they are 3x3. Singular values inherit any physical units of A; the condition number is unitless.

Sign convention: the calculator picks V so the first non-zero entry of each column of V is positive. U is recovered column by column as u_i = (1 / sigma_i) * A * v_i, and a 1e-10 relative tolerance against sigma_1 picks the rank.

For readers who only need the singular values without the full factorization, the Singular Values Calculator reports the same sigma values in a focused panel.

How This Calculator Works

This calculator uses two methods depending on size. A 2x2 input is solved in closed form from the trace and determinant of A^T A. A 3x3 input is solved with the one-sided Jacobi iteration on A^T A, which diagonalizes the symmetric matrix in plane rotations and yields eigenvalues and eigenvectors together.

A = U \u00b7 \u03a3 \u00b7 V\u1d40; \u03a3 = diag(\u03c3\u2081, \u03c3\u2082 [\u03c3\u2083]); \u03c3_i = sqrt(\u03bb_i(A\u1d40 A)); \u2016A\u2016\u2082 = \u03c3_max; \u03ba\u2082(A) = \u03c3_max / \u03c3_min
  • A: The real 2x2 or 3x3 input matrix, entered in row-major order.
  • U: Orthogonal left singular vectors, columns are unit eigenvectors of A A\u1d40.
  • \u03a3: Diagonal matrix of singular values in descending order; all entries non-negative.
  • V: Orthogonal right singular vectors, sign-canonicalized so the first non-zero entry of each column is positive.
  • V\u1d40: Transpose of V, shown as a separate panel for the multiplication U \u00b7 \u03a3 \u00b7 V\u1d40.
  • \u2016A\u2016\u2082: Spectral norm, the largest singular value.
  • \u03ba\u2082(A): Condition number, sigma_max / sigma_min, with a 0 sentinel when sigma_min is below 1e-10.

The result panel sorts the singular values in descending order, then derives the spectral norm, condition number, and numerical rank with a 1e-10 relative tolerance against sigma_1. A 0 in any slot means A does not stretch space in that direction. The reconstruction check is the cheapest verification line. It computes U * Sigma * V^T element by element, subtracts A, and reports the largest absolute difference. A value of 0 to 1e-6 is normal noise; above 1e-3 means the inputs are inconsistent or A is ill-conditioned.

2x2 identity A = I

A = [[1, 0], [0, 1]]. A^T A = I, so eigenvalues are 1 and 1, singular values are 1 and 1, V = I, U = I.

\u03c3\u2081 = 1, \u03c3\u2082 = 1, \u2016A\u2016\u2082 = 1, \u03ba\u2082(A) = 1, rank = 2.

An isometry keeps every unit vector at length 1, which is what sigma_1 = sigma_2 = 1 means geometrically.

Diagonal A = diag(3, 4, 5)

A = [[3, 0, 0], [0, 4, 0], [0, 0, 5]]. A^T A = diag(9, 16, 25), so sigma values are 5, 4, 3.

\u03c3\u2081 = 5, \u03c3\u2082 = 4, \u03c3\u2083 = 3, \u2016A\u2016\u2082 = 5, \u03ba\u2082(A) = 1.6667, rank = 3.

The most stretched axis is 5x the least, so the condition number is 1.6667 and the matrix is full rank.

According to Wikipedia Singular value decomposition, every real m-by-n matrix A admits a factorization A = U Sigma V^T where U and V are real orthogonal and Sigma is a diagonal matrix of non-negative singular values sorted in descending order.

The SVD uses the same symmetric eigensolver on A\u1d40 A that the Eigenvalue Eigenvector Calculator applies to A directly, so the two tools share the underlying eigenvalue routine.

Key Concepts Behind the SVD

Four ideas from linear algebra explain what this SVD calculator reports and why the singular values are sorted in descending order.

The SVD identity A = U \u00b7 \u03a3 \u00b7 V\u1d40

Every real m-by-n matrix A factors as an orthogonal U, a diagonal Sigma with non-negative entries, and the transpose of an orthogonal V. The columns of U are the left singular vectors, the diagonal entries of Sigma are the singular values, and the columns of V are the right singular vectors.

Singular values from A\u1d40 A

The singular values of A are the square roots of the eigenvalues of A\u1d40 A. A\u1d40 A is symmetric positive semi-definite, so its eigenvalues are non-negative and the square roots are well defined.

Spectral norm and condition number

The largest singular value is the spectral norm \u2016A\u2016\u2082. The condition number \u03ba\u2082(A) = sigma_max / sigma_min measures how much A amplifies rounding error. A value of 1 is a perfect isometry; 0 means rank-deficient.

Singular vectors as principal directions

The columns of V are the principal directions in the input space and the columns of U are the principal directions in the output space. Each column of U scaled by its singular value has length equal to that value.

The same identities hold in any dimension, not just 2x2 or 3x3. The calculator restricts itself to small sizes because the page is a teaching tool. Geometrically, the singular values are the semi-axes of the ellipsoid that A maps the unit sphere to, sorted from longest to shortest, the convention used by NumPy, MATLAB, and LAPACK.

According to Wikipedia Singular value decomposition, the columns of U are unit eigenvectors of A A^T and the columns of V are unit eigenvectors of A^T A, each pair sharing the same singular value.

Comparing the orthogonal factor V from the SVD with the Q factor from the QR Decomposition Calculator is the standard way to teach the difference between the two most-used orthogonal decompositions.

How to Use the SVD Calculator

Type the matrix entries in row-major order, choose the size, and read the U, Sigma, V, and V^T panels in the result area.

  1. 1 Pick the size: Select 2x2 or 3x3. Extra entries can stay at zero in 2x2 mode.
  2. 2 Fill in the entries: Type a\u2081\u2081 through a\u2083\u2083 in row-major order.
  3. 3 Read the panels: U, the diagonal Sigma, V, and V\u1d40 appear in the result area.
  4. 4 Check sigma_1 \u2265 sigma_2 \u2265 sigma_3: A 0 in any slot means A is rank-deficient in that direction.
  5. 5 Read the norm, condition number, and rank: Near 1 is well-conditioned, above 100 is poorly conditioned, 0 is rank-deficient.
  6. 6 Confirm the reconstruction check: A value of 0 to 1e-6 is normal noise; above 1e-3 means the matrix is ill-conditioned.

For A = [[3, 0, 0], [0, 4, 0], [0, 0, 5]] the calculator returns U = I, Sigma = diag(5, 4, 3), V = I, V^T = I, norm = 5, condition = 1.6667, rank = 3, and reconstruction error = 0.

Once you have U, Sigma, and V^T from the SVD, the pseudoinverse A\u207b = V \u03a3\u207b\u00b9 U\u1d40 is the next step in many workflows, and the Matrix Inverse Calculator handles the algebra-side inverse of the same A.

Benefits of Using This Calculator

This calculator replaces a hand-coded Jacobi iteration with a tool that returns all four factorization panels plus a reconstruction check in one result area.

  • Full factorization: You get U, Sigma, V, and V^T in one pass.
  • Rank-deficient catch: A zero sigma_min triggers the condition-number sentinel.
  • Cross-check with Cholesky: For SPD A, sigma values match the absolute Cholesky spectrum.
  • Reconstruction check: The max |A - U \u03a3 V\u1d40| line turns cross-multiplication into a single number.
  • Teaching use: Reading U, Sigma, V, V\u1d40 next to the input shows how each axis is stretched.
  • Quick numerical rank: Uses a 1e-10 relative tolerance against sigma_1.

The condition number is a quick sanity check before inversion, a least-squares solve, or any iterative solver. A value above 1e6 means a tiny input perturbation will be amplified a million times, the right signal to switch to truncated SVD or Tikhonov regularization. The same U, Sigma, and V^T drive truncated SVD, the Eckart-Young theorem, and PCA.

For a symmetric positive definite A the Cholesky Decomposition Calculator returns L with A = L L\u1d40, and the SVD spectrum of A matches the absolute Cholesky spectrum, so the two tools cross-check each other.

Factors That Affect the SVD Result

Three factors determine the accuracy of the SVD calculator and one structural limitation matters for users with larger matrices.

Numerical conditioning of A\u1d40 A

When A has both very large and very small singular values, A\u1d40 A can lose several digits of precision during the Jacobi iteration. The 1e-10 tolerance catches the rank drop and surfaces the condition number as the warning signal.

Sweep count and convergence

The Jacobi iteration runs up to 50 sweeps and stops early when the off-diagonal Frobenius norm falls below 1e-24. For typical inputs that converges in under 30 sweeps, keeping the calculation interactive.

Relative tolerance for rank

A singular value below 1e-10 times sigma_1 is treated as zero for ranking. Rank-deficient inputs report a condition number of 0 and a reduced rank, the right behavior for downstream solves.

  • The calculator only handles 2x2 and 3x3 real matrices. The same formulas apply to larger inputs, but the form would not be readable and a library routine such as LAPACK DGESDD is the right next step.
  • The output assumes a real input. A complex matrix needs a different factorization using the conjugate transpose A^*.
  • A reconstruction error near 1e-6 is normal floating-point noise. A reconstruction error above 1e-3 means the matrix is ill-conditioned or the form inputs are inconsistent with the chosen size.

Use the calculator as a quick check on small matrices, not as a tuned numerical library. For production-scale SVDs the right tools are LAPACK DGESDD, NumPy linalg.svd, and MATLAB svd; all of them reduce A to bidiagonal form via Householder reflections before applying divide-and-conquer.

According to Wolfram MathWorld Singular Value Decomposition, the largest singular value equals the spectral norm of A, and the 2-norm condition number of A equals the ratio of the largest to the smallest singular value.

SVD calculator showing a 2x2 or 3x3 input matrix with the U, Sigma, and V^T factorization and reconstruction check result panel
SVD calculator showing a 2x2 or 3x3 input matrix with the U, Sigma, and V^T factorization and reconstruction check result panel

Frequently Asked Questions

Q: What does the SVD calculator return for a 2x2 or 3x3 input?

A: The SVD calculator returns four matrices: U (the left singular vectors), Sigma (the diagonal matrix of singular values in descending order), V (the right singular vectors, sign-canonicalized so the first non-zero entry of each column is positive), and V^T (the transpose of V). It also reports sigma_1, sigma_2, sigma_3, the spectral norm, the 2-norm condition number, the numerical rank, and the maximum absolute reconstruction error max |A - U Sigma V^T|.

Q: How is the SVD different from the eigendecomposition?

A: The eigendecomposition works only on square matrices and returns eigenvalues and eigenvectors from A x = lambda x. The SVD works on any real m-by-n matrix, returns U Sigma V^T, and uses the square roots of the eigenvalues of A^T A. For a square A the two share the spectrum only when A is symmetric positive semi-definite, in which case U = V = Q from the eigendecomposition and the singular values equal the eigenvalues.

Q: Can the SVD calculator factor rectangular matrices?

A: The current form is restricted to 2x2 and 3x3 inputs, so it does not cover m-by-n rectangular matrices in the general sense. The same formulas apply to rectangular inputs, and a library routine such as LAPACK DGESDD or NumPy linalg.svd is the right next step for m-by-n factorization.

Q: How accurate is the SVD for 2x2 and 3x3 inputs?

A: For 2x2 inputs the closed-form quadratic on A^T A gives exact singular values up to floating-point precision. For 3x3 inputs the one-sided Jacobi iteration converges to 1e-24 in the off-diagonal Frobenius norm in under 30 sweeps for typical inputs. The reconstruction error line at the bottom of the result panel is the cheapest accuracy check.

Q: What is the geometric meaning of the SVD?

A: Geometrically, the SVD factors a linear map into a rotation (or reflection) in the input space, a stretching along the principal axes by the singular values, and a rotation (or reflection) in the output space. The right singular vectors in V are the principal axes in the input space and the left singular vectors in U are the principal axes in the output space.

Q: Why does the SVD always exist for a real matrix?

A: A^T A is always symmetric positive semi-definite, so it has a real orthogonal diagonalization V (Lambda) V^T with non-negative eigenvalues. Setting sigma_i = sqrt(lambda_i) and u_i = (1 / sigma_i) A v_i gives the remaining orthogonal factor U, and the decomposition A = U Sigma V^T exists. The sign convention used by the calculator picks V so the first non-zero entry of each column is positive, which removes the only remaining sign ambiguity.