Singular Values Calculator (2×2 SVD)
Test cases replayed : 4 of 4 match · Methodology · No outside source listed
Enter the four entries of a 2×2 matrix A to get its singular values σ₁ ≥ σ₂ ≥ 0 and the rotation matrices U and Vᵀ of A = UΣVᵀ.
Result
Largest singular value σ₁ = Q + R
E = (a + d) ÷ 2
- F = (a − d) ÷ 2
- G = (c + b) ÷ 2
- H = (c − b) ÷ 2
- Q = √(E² + H²)
- R = √(F² + G²)
- Smallest singular value σ₂ = |Q − R|
- Condition number σ₁ ÷ σ₂
- Frobenius norm √(σ₁² + σ₂²)
- Rotation angle θ = (atan2(H, E) − atan2(G, F)) ÷ 2 (radians)
- Rotation angle φ = (atan2(H, E) + atan2(G, F)) ÷ 2 (radians)
- Sign of Q − R (−1 flips the second row of Vᵀ)
- U row 1, column 1 = cos φ
- U row 1, column 2 = −sin φ
- U row 2, column 1 = sin φ
- U row 2, column 2 = cos φ
- Vᵀ row 1, column 1 = cos θ
- Vᵀ row 1, column 2 = −sin θ
- Vᵀ row 2, column 1
- Vᵀ row 2, column 2
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- a (row 1, column 1): enter a number.
- b (row 1, column 2): enter a number.
- c (row 2, column 1): enter a number.
- d (row 2, column 2): enter a number.
- Read the result: Largest singular value σ₁ = Q + R; the panel also shows E = (a + d) ÷ 2, F = (a − d) ÷ 2, G = (c + b) ÷ 2, H = (c − b) ÷ 2, Q = √(E² + H²), R = √(F² + G²), Smallest singular value σ₂ = |Q − R|, Condition number σ₁ ÷ σ₂, Frobenius norm √(σ₁² + σ₂²), Rotation angle θ = (atan2(H, E) − atan2(G, F)) ÷ 2 (radians), Rotation angle φ = (atan2(H, E) + atan2(G, F)) ÷ 2 (radians), Sign of Q − R (−1 flips the second row of Vᵀ), U row 1, column 1 = cos φ, U row 1, column 2 = −sin φ, U row 2, column 1 = sin φ, U row 2, column 2 = cos φ, Vᵀ row 1, column 1 = cos θ, Vᵀ row 1, column 2 = −sin θ, Vᵀ row 2, column 1 and Vᵀ row 2, column 2.
How this calculator works
The singular values of A are the square roots of the eigenvalues of AᵀA. Every matrix factors as A = UΣVᵀ (the singular value decomposition), where U and V are orthogonal and Σ is diagonal with σ₁ ≥ σ₂ ≥ 0.
For a 2×2 matrix [[a, b], [c, d]] there is a closed form: with E = (a + d)/2, F = (a − d)/2, G = (c + b)/2 and H = (c − b)/2, let Q = √(E² + H²) and R = √(F² + G²). Then σ₁ = Q + R and σ₂ = |Q − R|.
U is the rotation by φ and Vᵀ the rotation by θ, with θ = (atan2(H, E) − atan2(G, F))/2 and φ = (atan2(H, E) + atan2(G, F))/2. When Q < R the second row of Vᵀ changes sign so that σ₂ stays positive.
σ₁σ₂ equals |det A| = |ad − bc|, and the condition number σ₁/σ₂ measures how much the matrix can amplify relative errors; it is infinite (shown as —) for a singular matrix.
The formula
| Symbol | Meaning |
|---|---|
| a (row 1, column 1) | |
| b (row 1, column 2) | |
| c (row 2, column 1) | |
| d (row 2, column 2) | |
| E = (a + d) ÷ 2 | |
| F = (a − d) ÷ 2 | |
| G = (c + b) ÷ 2 | |
| H = (c − b) ÷ 2 | |
| Q = √(E² + H²) | |
| R = √(F² + G²) | |
| Largest singular value σ₁ = Q + R |
Worked example
| a (row 1, column 1) | 3 |
|---|---|
| b (row 1, column 2) | 0 |
| c (row 2, column 1) | 4 |
| d (row 2, column 2) | 5 |
| Smallest singular value σ₂ = |Q − R| | 2.2361 |
|---|---|
| Condition number σ₁ ÷ σ₂ | 3 |
| Frobenius norm √(σ₁² + σ₂²) | 7.0711 |
| U row 1, column 1 = cos φ | 0.3162 |
| U row 1, column 2 = −sin φ | -0.9487 |
| U row 2, column 1 = sin φ | 0.9487 |
| U row 2, column 2 = cos φ | 0.3162 |
| Vᵀ row 1, column 1 = cos θ | 0.7071 |
| Vᵀ row 1, column 2 = −sin θ | 0.7071 |
| Vᵀ row 2, column 1 | -0.7071 |
| Vᵀ row 2, column 2 | 0.7071 |
Largest singular value σ₁ = Q + R 6.7082
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
What are the singular values of [[3, 0], [4, 5]]?
σ₁ = 3√5 ≈ 6.7082 and σ₂ = √5 ≈ 2.2361, so the condition number is 3.
Are singular values the same as eigenvalues?
Only for symmetric matrices with non-negative eigenvalues. In general they are the square roots of the eigenvalues of AᵀA, and they are never negative.
What does a zero singular value mean?
The matrix is singular: its determinant is 0 and it has no inverse.