Singular Value Decomposition Calculator

Decompose matrices, inspect singular values, reduce dimensions, build low rank approximations, solve least squares systems, and verify every result with clear diagnostics and charts.

SVD Results

Decomposition Summary

Singular Values

ComponentSingular valueVarianceCumulativeRetained

Diagnostics

Matrix Results


        

Singular Value Chart

Cumulative Variance

Rank-k Error Curve

Original Matrix Heatmap

Reconstructed Heatmap

Error Heatmap

Linear System Solution

Machine Learning Interpretation

Matrix and Calculation Settings

A = UΣVᵀ
Use commas, spaces, tabs, semicolons, or new lines.

SVD Mode and Numerical Controls


Pseudoinverse and Linear System

Its length must equal the matrix row count.

Formula Used

Singular value decomposition factors any matrix into three structured matrices. The formula is A equals U times Σ times V transpose. Singular values appear on Σ in descending order.

A = UΣVᵀ

The pseudoinverse uses reciprocal values above the selected numerical tolerance. Rank-k approximation retains only the strongest k singular components. The discarded components determine the compression error.

How to Use

Enter a matrix manually, paste values, or upload a CSV file. Select the decomposition mode and adjust precision settings. Add vector b when solving a linear system.

Choose truncated mode to explore low-rank approximations and compression. Set a variance target for automatic component recommendations. Press Calculate SVD to view matrices, diagnostics, and charts.

Example Data

ExampleMatrix sizePurpose
Basic2 × 2Inspect complete decomposition behavior.
Rectangular4 × 3Study economy and compact SVD.
Rank-deficient3 × 3Test numerical rank and pseudoinverse.
Recommendation5 × 4Explore latent factors and compression.
Least squares4 × 2Solve an overdetermined linear system.

Frequently Asked Questions

What does SVD calculate?

SVD separates a matrix into orthogonal directions and scale factors. These factors reveal rank, energy, and numerical stability. They also support compression and dimensionality reduction.

What is reduced SVD?

Reduced SVD removes unnecessary zero-sized portions from full matrices. It preserves every singular component required for reconstruction. This form saves storage for rectangular matrices.

What is compact SVD?

Compact SVD keeps only singular values above numerical tolerance. It excludes directions associated with zero singular values. This form reflects the matrix numerical rank.

How does truncated SVD help machine learning?

Truncated SVD retains the strongest latent directions in data. It reduces feature count and removes weaker structure. Common uses include text analysis and recommendations.

How is explained variance estimated?

Each squared singular value represents component energy. Dividing by total squared energy gives a percentage. Cumulative values guide component selection decisions.

What does the condition number mean?

The condition number compares largest and smallest useful singular values. Large values indicate sensitivity to input changes. Infinite values usually indicate rank deficiency.

What is the Moore-Penrose pseudoinverse?

The pseudoinverse generalizes matrix inversion for rectangular matrices. It produces least-squares and minimum-norm solutions. Small singular values are removed using tolerance.

Why can signs differ between calculators?

Singular vectors are not unique in sign. Flipping matching columns leaves the decomposition unchanged. Reconstruction still verifies the result correctly.

Can this calculator process large matrices?

The page supports moderate matrices directly inside your browser. Very large matrices may require significant memory. Dedicated numerical software suits production-scale datasets better.

Related Calculators

Principal Component Analysis CalculatorCovariance Matrix CalculatorPCA Component Selection CalculatorFeature Reduction Percentage Calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.