SVD Calculator

JJ Ben-Joseph headshot JJ Ben-Joseph

What is Singular Value Decomposition (SVD)?

Singular Value Decomposition (SVD) is a way to factor a matrix into three simpler pieces that clearly show how it stretches and rotates space. For a real matrix A, the SVD writes

A=UΣVT

where:

For the 2×2 case used by this calculator, you enter a matrix

A=a11a12a21a22.

The calculator then finds matrices U, Σ, and VT such that A=UΣVT. This gives you both the singular values and the associated singular vectors.

Key formulas for the 2×2 SVD

In general, the singular values of A are the square roots of the eigenvalues of ATA. For a 2×2 real matrix, this can be written out explicitly. Let

AT A= b11b12b12b22.

Then the eigenvalues λ1 and λ2 are given by the quadratic formula applied to the characteristic polynomial. In MathML form, the basic relationship between singular values and eigenvalues is:

σ = λ

Here λ is an eigenvalue of ATA, and the corresponding singular value is σ=λ. For a 2×2 matrix, you always get up to two singular values σσ1σ20.

Once the calculator has the singular values, it computes the right singular vectors (columns of V) from the eigenvectors of ATA. Finally, it finds the left singular vectors (columns of U) from

U=AVΣ1,

with appropriate handling of any zero singular values.

Geometric interpretation for 2×2 matrices

Because this tool focuses on 2×2 matrices, you can imagine all of the action in the familiar 2D plane.

In this view, SVD tells you exactly how your matrix stretches and rotates the plane. Large singular values correspond to directions where vectors are strongly stretched. If the smallest singular value is close to zero, there is a direction that is almost collapsed, meaning the transformation nearly loses dimensionality.

How to use this 2×2 SVD calculator

  1. Enter the four entries of your 2×2 matrix into the fields labeled a11, a12, a21, and a22.
  2. Click the “Compute SVD” button.
  3. Review the results: the calculator shows you U, Σ, and VT. Depending on implementation, it may also show intermediate quantities such as ATA, eigenvalues, and eigenvectors.

This makes it much easier to follow the standard SVD procedure without doing all the algebra by hand, especially when numbers are not “nice”.

Interpreting the results

After you compute the SVD, focus on three main pieces of information.

1. Singular values in Σ

The diagonal entries σ1 and σ2 of Σ tell you how much the matrix stretches vectors along certain orthogonal directions.

2. Left singular vectors in U

The columns of U are unit vectors in the output space. Each column corresponds to a principal direction of the ellipse that you get by transforming the unit circle. The first column aligns with the direction of maximum stretching; the second column is orthogonal to it.

3. Right singular vectors in V

The columns of V are unit vectors in the input space. They represent the directions that, when you apply A, are scaled exactly by the corresponding singular values and rotated into the directions given by U.

Together, these pieces let you describe the action of A in a very compact way: rotate by VT, stretch by Σ, then rotate by U.

Worked example: SVD of a 2×2 matrix

Consider the simple matrix

A=[3102].

Below is the outline of the steps the calculator conceptually follows.

Step 1: Form ATA

A T = [ 3 0 1 2 ] , A T A = [ 3 0 1 2 ] [ 3 1 0 2 ] = [ 9 3 3 5 ] .

Step 2: Find eigenvalues of ATA

The characteristic polynomial of ATA is

det(ATA-λI)=|9-λ335-λ|=(9-λ)(5-λ)-9.

Simplifying gives

λλ214λ+36=0.

Solving this quadratic equation yields two eigenvalues λ1 and λ2. Numerically, these are approximately

λ111.944,λ22.056.

Step 3: Compute singular values

Using σ=λ, the singular values are approximately

σ1=11.9443.456,σ2=2.0561.434.

Step 4: Find eigenvectors (right singular vectors)

For each eigenvalue, solve (ATAλI)v=0 to find a nonzero eigenvector v. Normalize each eigenvector to have length 1. These normalized eigenvectors form the columns of V. The calculator performs this step symbolically or numerically so you do not have to.

Step 5: Compute left singular vectors

For each singular value σi and right singular vector vi, compute

ui=1σiAvi.

These vectors are then normalized as needed and collected as the columns of U. The final result displayed by the calculator is the factorization A=UΣVT, with approximate decimal entries for ease of interpretation.

Comparison: SVD vs. other matrix decompositions

The SVD is related to other common decompositions but not identical. The table below summarizes some key differences for real 2×2 matrices.

Decomposition Factorization form Matrix requirements What it reveals
Singular Value Decomposition (SVD) A=UΣVT Any real matrix (square or rectangular) Stretching in orthogonal directions, rank, and conditioning; works even when A is not diagonalizable.
Eigenvalue decomposition A=PDP1 Typically requires a square matrix with a full set of eigenvectors Eigenvalues and eigenvectors; may fail or be complex-valued even when SVD still works cleanly.
QR decomposition A=QR Any real matrix with full column rank (variants handle broader cases) Orthogonal basis (Q) and upper triangular factor (R); used heavily in numerical algorithms.
LU decomposition A=LU Typically requires a square matrix with suitable pivoting Efficient solving of linear systems; less direct information about geometry than SVD.

Applications of SVD

Even though this calculator works with small 2×2 matrices, the same ideas extend to much larger systems. SVD is central in:

Studying the 2×2 case with this tool is a good way to build geometric intuition before moving on to larger matrices.

Assumptions and limitations of this calculator

Tips for using the SVD in practice

Enter matrix values.

Embed this calculator

Copy and paste the HTML below to add the 2×2 SVD Calculator – Compute U, Σ, and Vᵀ to your website.