Enter Matrix Data
Use spaces or commas between values and one row per line.
Example Data Table
This sample matrix is well suited for learning how singular values and rank-k approximations behave.
| Row | Column 1 | Column 2 | Column 3 |
|---|---|---|---|
| 1 | 3 | 1 | 1 |
| 2 | -1 | 3 | 1 |
| 3 | 0 | 2 | 4 |
Formula Used
Singular value decomposition factors a matrix as A = UΣVᵀ, where U and V have orthonormal columns and Σ is diagonal with nonnegative singular values.
The calculator derives singular values from the square roots of the eigenvalues of either AᵀA or AAᵀ. It then forms the matching singular vectors and builds a reduced decomposition.
It also reports common diagnostics:
- Rank = number of singular values greater than the tolerance.
- Spectral norm = largest singular value.
- Nuclear norm = sum of singular values.
- Condition number = largest singular value ÷ smallest nonzero singular value.
- Rank-k approximation = keep only the first k singular values and vectors.
- Energy retained = Σ(σᵢ² kept) ÷ Σ(σᵢ² total) × 100.
How to Use This Calculator
- Enter the matrix in the textarea, one row per line.
- Separate values with spaces or commas.
- Choose the display precision for the output tables.
- Set a numerical tolerance to decide effective rank.
- Choose a rank-k value for truncated approximation analysis.
- Click Compute SVD to show results above the form.
- Review the singular values, reduced factors, and reconstruction tables.
- Use the export buttons to save CSV or PDF copies.
FAQs
1. What does SVD do for a matrix?
It breaks a matrix into orthogonal directions and magnitudes. This helps with compression, noise filtering, dimensionality reduction, and numerical analysis.
2. Why are singular values always nonnegative?
They come from square roots of eigenvalues of AᵀA or AAᵀ. Those matrices are symmetric positive semidefinite, so their eigenvalues cannot be negative.
3. What is the difference between full and reduced SVD?
Reduced SVD keeps only the first min(m, n) orthonormal columns. It is more compact and still reconstructs the original matrix exactly when all singular values are retained.
4. How is matrix rank determined here?
The calculator counts singular values larger than the chosen tolerance. This avoids treating tiny numerical noise as meaningful rank.
5. What does the condition number mean?
It measures sensitivity. Large condition numbers mean small input changes can produce larger output changes, which may indicate instability or ill-conditioning.
6. Why use rank-k approximation?
Rank-k approximation keeps the strongest singular directions only. This is useful for compression, denoising, and extracting dominant structure from data.
7. Does this tool support rectangular matrices?
Yes. SVD works for square and rectangular matrices. This calculator accepts matrices from 1×1 up to 10×10.
8. Why might reconstruction error be near zero instead of exactly zero?
Floating-point arithmetic introduces tiny rounding differences. For valid full decompositions, the reconstruction error should usually be extremely small rather than exact zero.