SVD Calculator

Decompose a two-by-two matrix into U, singular values, and V transpose with deterministic numeric results.

Singular value decomposition
Enter exactly two rows, separating values with commas and rows with a semicolon.

Use commas between values and a semicolon between the two rows.

About singular value decomposition

Singular value decomposition, usually shortened to SVD, factors a real matrix into three structured matrices. The conventional equation states that the original matrix equals U multiplied by Sigma multiplied by V transpose. U and V are orthogonal matrices, so their columns form perpendicular unit directions. Sigma is diagonal and contains nonnegative singular values arranged from largest to smallest. This calculator performs that decomposition for any real two-by-two matrix. The computation begins with the symmetric matrix formed by multiplying the transpose of the input by the input. Its eigenvalues are always nonnegative apart from tiny floating-point effects. Their square roots are the singular values, and their normalized eigenvectors become the columns of V. Multiplying the original matrix by each right singular vector and dividing by its nonzero singular value produces the corresponding column of U. When a singular value is zero, the calculator completes an orthonormal basis deterministically so the displayed factors remain valid. Singular values describe how strongly a matrix stretches space along special directions. A large first value and a much smaller second value indicate that most of the transformation is concentrated along one direction. A zero second value means the matrix has rank one or zero and collapses the plane onto a line or point. The ratio of the largest to the smallest nonzero singular value is related to numerical conditioning, although this page displays the decomposition itself rather than a condition number. SVD is used in least-squares fitting, pseudoinverses, dimensionality reduction, image compression, recommendation systems, signal processing, and noise filtering. Unlike an eigenvalue decomposition, it exists for every real matrix and is not restricted to symmetric or square inputs. This Phase 1 calculator deliberately limits input to two-by-two matrices so it can provide a compact, transparent, dependency-free implementation with predictable formatting. The underlying ideas, however, extend directly to rectangular matrices of any size. Results are rounded to six decimal places and insignificant zeroes are removed. Orthogonal factors are not mathematically unique: signs of matching columns in U and V may both be reversed without changing their product, and repeated singular values allow additional rotations within a subspace. Therefore another reliable SVD package may show different signs or basis vectors while reconstructing exactly the same input. This calculator chooses a consistent orientation, making repeated entries and fixture examples stable.

SVD examples

Input matrixSingular valuesObservation
3,0;0,23, 2A positive diagonal matrix is already aligned with its singular directions.
4,0;0,14, 1The matrix stretches the first axis four times and leaves the second unchanged.
1,0;0,01, 0A zero singular value identifies a rank-one matrix.
0,2;2,02, 2Equal singular values indicate equal stretching in two perpendicular directions.

How to use the SVD calculator

  1. Type the first row as two comma-separated numbers.
  2. Add a semicolon and then type the second comma-separated row.
  3. Select Calculate SVD.
  4. Read the singular values and the U, Sigma, and V transpose matrices.

SVD calculator FAQ

What do singular values represent?

Singular values measure the amount of stretching along special perpendicular directions. Larger values represent stronger scaling, while a zero value indicates a collapsed dimension.

Why are U and V orthogonal?

Their columns are unit vectors that are mutually perpendicular. Orthogonality preserves lengths and angles, so these factors represent rotations or reflections rather than additional scaling.

Can different SVD answers both be correct?

Yes, paired singular vectors can have both signs reversed without changing the reconstructed matrix. Repeated singular values also permit different valid orthonormal bases.

Does this calculator support rectangular matrices?

No, this Phase 1 implementation accepts arbitrary real two-by-two matrices only. Larger and rectangular matrices require a broader numerical decomposition routine.

What does a zero singular value mean?

It means the matrix loses at least one independent direction and is singular. For a two-by-two matrix, one positive value and one zero value indicate rank one.