Singular Value Decomposition

Factor any m×n matrix into A = U Σ Vᵀ with the one-sided Jacobi method. Singular values are usually irrational, so this tool is numerical.
Computed
Enter a matrix and decompose it.
Input matrix A3×2
Singular values (Σ diagonal)
0.00000.0000

Rank: 0

U

0
0
0
0
0
0

Σ (as a diagonal matrix)

0
0
0
0

Vᵀ

1
0
0
1

A = U · Σ · Vᵀ

How it works

  1. 1

    Singular Value Decomposition (A = U Σ Vᵀ)

    Input is 3×2. Using one-sided Jacobi rotations to orthogonalize pairs of columns of A.

    • Goal: factor A = U Σ Vᵀ where U (m×r) and V (n×r) have orthonormal columns and Σ is diagonal with nonnegative singular values.
    • Method: one-sided Jacobi — repeatedly rotate pairs of columns (i, j) of A until every column pair is orthogonal.
    • After convergence: σₖ = ‖(rotated A)ₖ‖, Uₖ = (rotated A)ₖ / σₖ, and V accumulates the rotations.
  2. 2

    Convergence

    Jacobi converged after 1 sweep(s) and 0 rotation(s); all column pairs are now orthogonal within tolerance.

    • Per-pair skip rule: |γ| ≤ 1e-12 · √(αβ), where α = ‖Bᵢ‖², β = ‖Bⱼ‖², γ = 2·Bᵢ·Bⱼ.
    • Jacobi angle: ζ = (β − α) / γ, t = sign(ζ) / (|ζ| + √(1 + ζ²)), c = 1/√(1+t²), s = t·c.
    • Each rotation [[c, s], [−s, c]] is applied to columns i, j of both B and V.
  3. 3

    Singular values & rank

    Found 2 singular value(s); rank = 0.

    • σ = [0, 0]
    • Each σₖ is the column norm of the rotated A, sorted descending.
    • 2 singular value(s) are below the rank tolerance 1e-9 (numerically zero).
  4. 4

    Reconstruction check

    ‖A − U Σ Vᵀ‖_F ≈ 0.000e+0 (should be ~0 within numerical precision).

    • U (3×2):
    • [ 0, 0 ] [ 0, 0 ] [ 0, 0 ]
    • Σ (diagonal): [0, 0]
    • V (2×2):
    • [ 1, 0 ] [ 0, 1 ]