Singular Value Decomposition (SVD) Calculator
Enter a matrix to compute its singular value decomposition A=UΣVᵀ: the singular values, numerical rank, and condition number, plus the U and V matrices for small inputs.
Input
One line per matrix row; separate entries with spaces or commas.
Result
Largest singular value σ₁
3
Size (rows × cols)
3 × 3
Numerical rank
3
Condition number
3
Singular values (descending)
| σ1 | 3 |
| σ2 | 2 |
| σ3 | 1 |
Left singular vectors U
Each column is a left singular vector uₖ (U[:,k]=A·vₖ/σₖ).
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 0 | 0 | 1 |
Right singular vectors V
Each column is a right singular vector vₖ (an eigenvector of AᵀA).
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 0 | 0 | 1 |
How it works
- The singular value decomposition (SVD) factors any m×n matrix A as A=UΣVᵀ, where U is an m×m orthogonal matrix, V is an n×n orthogonal matrix, and Σ is an m×n diagonal matrix holding the non-negative singular values σ₁≥σ₂≥…≥0.
- This calculator forms the symmetric matrix AᵀA, finds its eigenvalues and eigenvectors with the cyclic Jacobi rotation method, then takes the square roots of the eigenvalues as singular values and the eigenvectors as the right singular vectors V. The left singular vectors are recovered as U[:,k]=A·vₖ/σₖ.
- Numerical rank counts the singular values that exceed the threshold max(m,n)·εmach·σmax; smaller values are treated as zero due to floating-point error.
- The condition number is defined as σmax/σmin (the smallest non-zero singular value). For rank-deficient matrices σmin is effectively 0, so the condition number is infinite (∞).
- Results are an iterative approximation, not an exact algebraic solution. Rounding and cancellation may introduce small errors in the trailing digits.
- The U and V matrices are shown only for small matrices with at most 8 rows and 8 columns; larger inputs display only the singular values, rank, and condition number.
Reviews
Tell us what you think of this calculator.
Write a review
- Home
Singular Value Decomposition (SVD) Calculator