Skip to main content

SVD Calculator

Compute the Singular Value Decomposition of a matrix. Enter values for instant results with step-by-step formulas.

Skip to calculator
Mathematics

SVD Calculator

Compute the Singular Value Decomposition of a matrix. Find singular values, condition number, matrix rank, and various norms with step-by-step analysis.

Last updated: December 2025Reviewed by NovaCalculator Mathematics Team

Calculator

Adjust values & calculate
x
Singular Values
5.0000, 1.0000
2x2 matrix, rank 2
Condition Number
5.000000
Matrix Rank
2
Spectral Norm
5.000000
Frobenius Norm
5.099020
Nuclear Norm
6.000000
Singular Value Distribution
s1
5.00
s2
1.00
Rank-1 Approximation Error
1.000000
Second singular value = error of best rank-1 approximation
Your Result
Singular Values: 5.0000, 1.0000 | Condition: 5.000000 | Rank: 2
Share Your Result
Understand the Math

Formula

A = U * Sigma * V^T

The matrix A is decomposed into the product of three matrices: U (left singular vectors), Sigma (diagonal matrix of singular values), and V^T (transpose of right singular vectors). Singular values are the square roots of the eigenvalues of A^T * A.

Last reviewed: December 2025

Worked Examples

Example 1: SVD of a 2x2 Symmetric Matrix

Compute the singular values of A = [[3,2],[2,3]].
Solution:
A^T * A = [[13, 12],[12, 13]] Characteristic polynomial: lambda^2 - 26*lambda + 25 = 0 Eigenvalues: lambda_1 = 25, lambda_2 = 1 Singular values: s1 = sqrt(25) = 5, s2 = sqrt(1) = 1 Condition number: 5/1 = 5 Frobenius norm: sqrt(9+4+4+9) = sqrt(26) = 5.099
Result: Singular values: 5, 1 | Condition number: 5 | Rank: 2

Example 2: Rank-Deficient Matrix

Compute the singular values of A = [[1,2],[2,4]].
Solution:
A^T * A = [[5, 10],[10, 20]] Characteristic polynomial: lambda^2 - 25*lambda + 0 = 0 Eigenvalues: lambda_1 = 25, lambda_2 = 0 Singular values: s1 = 5, s2 = 0 The matrix has rank 1 (row 2 = 2 * row 1)
Result: Singular values: 5, 0 | Condition number: Infinite | Rank: 1 (rank-deficient)
Expert Insights

Background & Theory

The SVD Calculator applies the following established principles and formulas. Mathematics rests on a hierarchy of number systems, each extending the previous. The natural numbers (1, 2, 3, ...) support counting and ordering. The integers add negative values and zero, enabling subtraction without restriction. The rational numbers, expressible as p/q where p and q are integers and q is nonzero, close the system under division. The real numbers fill the gaps left by irrationals such as the square root of 2 or pi, forming a complete ordered field. The complex numbers, written as a + bi where i is the square root of negative one, complete the algebraic closure of the reals and allow every polynomial to have a root. Prime factorization states that every integer greater than one is uniquely expressible as a product of primes, a result known as the Fundamental Theorem of Arithmetic. Computing the greatest common divisor (GCD) of two integers relies most efficiently on the Euclidean algorithm: repeatedly replace the larger number with the remainder when it is divided by the smaller, until the remainder is zero. The last nonzero remainder is the GCD. The least common multiple (LCM) follows from the identity LCM(a, b) = |a * b| / GCD(a, b). Modular arithmetic defines equivalence classes of integers that share the same remainder under division by a modulus n. Fermat's Little Theorem and Euler's Theorem arise from this structure and underpin modern cryptography. Logarithms are the inverses of exponential functions. If b raised to the power x equals y, then the logarithm base b of y equals x. The natural logarithm uses base e, approximately 2.71828. Combinatorics counts arrangements and selections. The number of ordered arrangements (permutations) of r objects from n distinct objects is nPr = n! / (n - r)!. The number of unordered selections (combinations) is nCr = n! / (r! * (n - r)!). Pascal's triangle arranges these binomial coefficients so that each entry equals the sum of the two entries directly above it. The Fibonacci sequence, defined by F(1) = 1, F(2) = 1, and F(n) = F(n-1) + F(n-2), appears throughout nature and connects deeply to the golden ratio via Binet's formula.

History

The history behind the SVD Calculator traces back through the following developments. Mathematics as a systematic discipline traces to ancient Mesopotamia. Babylonian clay tablets dating to around 1800 BCE demonstrate knowledge of quadratic equations, Pythagorean triples, and base-60 arithmetic, suggesting a practical mathematical tradition far preceding Greek formalism. Euclid of Alexandria compiled the Elements around 300 BCE, establishing the axiomatic method that would define rigorous mathematics for over two thousand years. His work organized plane geometry, number theory, and proportion into logically chained propositions derived from a small set of postulates. The algorithm bearing his name for computing GCDs appears in Book VII and remains in use today. In the 9th century, the Persian scholar Muhammad ibn Musa Al-Khwarizmi wrote Al-Kitab al-mukhtasar fi hisab al-jabr wal-muqabala, the treatise whose title gave algebra its name. He systematized the solution of linear and quadratic equations and described procedures that operated on unknowns as objects, a conceptual leap away from purely numerical calculation. Rene Descartes introduced coordinate geometry in 1637 by uniting algebra and Euclidean geometry, allowing curves to be studied through equations. This synthesis set the stage for calculus. Isaac Newton and Gottfried Wilhelm Leibniz independently developed calculus during the 1660s and 1670s, triggering a priority dispute that lasted decades and divided British and Continental mathematicians. Carl Friedrich Gauss proved the Fundamental Theorem of Algebra in 1799, showing that every nonconstant polynomial has at least one complex root. His Disquisitiones Arithmeticae of 1801 established modern number theory. David Hilbert's formalist program at the turn of the 20th century sought to place all of mathematics on an explicit axiomatic foundation, a project that Kurt Godel's incompleteness theorems of 1931 showed to be fundamentally limited. Alan Turing's work in the 1930s on computability introduced the theoretical model of the stored-program computer and linked mathematical logic directly to the limits of algorithmic calculation. His proof that no algorithm can decide in general whether an arbitrary program will halt or run forever placed fundamental boundaries on what mathematics can mechanically determine, and it opened the discipline now known as theoretical computer science.

Share this calculator

Explore More

Frequently Asked Questions

SVD enables image compression by approximating the original image matrix with a low-rank version that uses far less storage. A grayscale image is an m-by-n matrix of pixel values. Computing its SVD gives singular values in decreasing order of importance. By keeping only the k largest singular values and their corresponding columns of U and V (called a rank-k approximation), you create a compressed version of the image that captures the most important visual features. Instead of storing m*n pixel values, you store k*(m+n+1) values. For a 1000-by-1000 image, keeping just 50 singular values reduces storage by 90% while maintaining recognizable image quality. The Eckart-Young theorem guarantees this is the optimal rank-k approximation.
SVD provides a direct way to compute the Moore-Penrose pseudoinverse of any matrix, which generalizes the matrix inverse to non-square and singular matrices. Given A = U * Sigma * V^T, the pseudoinverse is A+ = V * Sigma+ * U^T, where Sigma+ is formed by taking the reciprocal of each nonzero singular value and transposing the matrix. The pseudoinverse gives the least-squares solution to overdetermined systems (more equations than unknowns) and the minimum-norm solution to underdetermined systems (fewer equations than unknowns). This makes SVD the foundation of least-squares fitting, which is used extensively in statistics, machine learning, signal processing, and any field that requires fitting models to data.
Principal Component Analysis (PCA) is essentially SVD applied to centered data. When you have a data matrix X where each row is a data point and each column is a feature, PCA finds the directions of maximum variance. Computing the SVD of the centered data matrix X = U * Sigma * V^T reveals that the columns of V are the principal components (directions of maximum variance), the singular values in Sigma are proportional to the standard deviations along each component, and the matrix U * Sigma gives the coordinates of each data point in the principal component basis. This connection is why SVD is the preferred computational method for PCA, as it is more numerically stable than computing eigenvalues of the covariance matrix directly.
Recommendation systems like those used by Netflix and Amazon use SVD to discover latent factors in user-item interaction data. The user-rating matrix (with users as rows and items as columns) is approximately factored using truncated SVD into low-rank matrices that capture hidden patterns. The singular values represent the importance of each latent factor, while the U and V matrices encode how users and items relate to these factors. Missing ratings can then be predicted by multiplying the low-rank factors. In practice, modified versions like regularized SVD or matrix factorization with stochastic gradient descent are used because the rating matrix is very sparse. The Netflix Prize competition famously demonstrated that SVD-based approaches could improve recommendation accuracy by over 10 percent.
Computing the full SVD of an m-by-n matrix costs approximately O(min(mn^2, m^2n)) floating-point operations, making it about 3-5 times more expensive than LU decomposition. The most widely used algorithm is the Golub-Kahan bidiagonalization followed by implicit QR iteration, which is implemented in LAPACK and used by MATLAB, NumPy, and R. For very large matrices where only the top k singular values are needed, iterative methods like the Lanczos algorithm or randomized SVD provide much faster approximate results. Randomized SVD, introduced by Halko, Martinsson, and Tropp, can compute a rank-k approximation in O(mn*log(k)) time, making SVD practical for matrices with millions of rows and columns.
You may use the results for reference and educational purposes. For professional reports, academic papers, or critical decisions, we recommend verifying outputs against peer-reviewed sources or consulting a qualified expert in the relevant field.
Educational Note: This calculator is provided for educational and informational purposes. Results are based on the formulas and inputs provided. Always verify important calculations independently. NovaCalculator processes calculator inputs client-side; optional analytics follow visitor consent settings.Reviewed by: NovaCalculator Mathematics TeamVerified against standard mathematical and scientific references. Last reviewed: December 2025. © 2024–2026 NovaCalculator.

Share this calculator

Formula

A = U * Sigma * V^T

The matrix A is decomposed into the product of three matrices: U (left singular vectors), Sigma (diagonal matrix of singular values), and V^T (transpose of right singular vectors). Singular values are the square roots of the eigenvalues of A^T * A.

Worked Examples

Example 1: SVD of a 2x2 Symmetric Matrix

Problem: Compute the singular values of A = [[3,2],[2,3]].

Solution: A^T * A = [[13, 12],[12, 13]]\nCharacteristic polynomial: lambda^2 - 26*lambda + 25 = 0\nEigenvalues: lambda_1 = 25, lambda_2 = 1\nSingular values: s1 = sqrt(25) = 5, s2 = sqrt(1) = 1\nCondition number: 5/1 = 5\nFrobenius norm: sqrt(9+4+4+9) = sqrt(26) = 5.099

Result: Singular values: 5, 1 | Condition number: 5 | Rank: 2

Example 2: Rank-Deficient Matrix

Problem: Compute the singular values of A = [[1,2],[2,4]].

Solution: A^T * A = [[5, 10],[10, 20]]\nCharacteristic polynomial: lambda^2 - 25*lambda + 0 = 0\nEigenvalues: lambda_1 = 25, lambda_2 = 0\nSingular values: s1 = 5, s2 = 0\nThe matrix has rank 1 (row 2 = 2 * row 1)

Result: Singular values: 5, 0 | Condition number: Infinite | Rank: 1 (rank-deficient)

Frequently Asked Questions

How is SVD used for image compression?

SVD enables image compression by approximating the original image matrix with a low-rank version that uses far less storage. A grayscale image is an m-by-n matrix of pixel values. Computing its SVD gives singular values in decreasing order of importance. By keeping only the k largest singular values and their corresponding columns of U and V (called a rank-k approximation), you create a compressed version of the image that captures the most important visual features. Instead of storing m*n pixel values, you store k*(m+n+1) values. For a 1000-by-1000 image, keeping just 50 singular values reduces storage by 90% while maintaining recognizable image quality. The Eckart-Young theorem guarantees this is the optimal rank-k approximation.

What is the relationship between SVD and the pseudoinverse?

SVD provides a direct way to compute the Moore-Penrose pseudoinverse of any matrix, which generalizes the matrix inverse to non-square and singular matrices. Given A = U * Sigma * V^T, the pseudoinverse is A+ = V * Sigma+ * U^T, where Sigma+ is formed by taking the reciprocal of each nonzero singular value and transposing the matrix. The pseudoinverse gives the least-squares solution to overdetermined systems (more equations than unknowns) and the minimum-norm solution to underdetermined systems (fewer equations than unknowns). This makes SVD the foundation of least-squares fitting, which is used extensively in statistics, machine learning, signal processing, and any field that requires fitting models to data.

How does SVD relate to Principal Component Analysis?

Principal Component Analysis (PCA) is essentially SVD applied to centered data. When you have a data matrix X where each row is a data point and each column is a feature, PCA finds the directions of maximum variance. Computing the SVD of the centered data matrix X = U * Sigma * V^T reveals that the columns of V are the principal components (directions of maximum variance), the singular values in Sigma are proportional to the standard deviations along each component, and the matrix U * Sigma gives the coordinates of each data point in the principal component basis. This connection is why SVD is the preferred computational method for PCA, as it is more numerically stable than computing eigenvalues of the covariance matrix directly.

How is SVD used in recommendation systems?

Recommendation systems like those used by Netflix and Amazon use SVD to discover latent factors in user-item interaction data. The user-rating matrix (with users as rows and items as columns) is approximately factored using truncated SVD into low-rank matrices that capture hidden patterns. The singular values represent the importance of each latent factor, while the U and V matrices encode how users and items relate to these factors. Missing ratings can then be predicted by multiplying the low-rank factors. In practice, modified versions like regularized SVD or matrix factorization with stochastic gradient descent are used because the rating matrix is very sparse. The Netflix Prize competition famously demonstrated that SVD-based approaches could improve recommendation accuracy by over 10 percent.

What are the computational costs and algorithms for SVD?

Computing the full SVD of an m-by-n matrix costs approximately O(min(mn^2, m^2n)) floating-point operations, making it about 3-5 times more expensive than LU decomposition. The most widely used algorithm is the Golub-Kahan bidiagonalization followed by implicit QR iteration, which is implemented in LAPACK and used by MATLAB, NumPy, and R. For very large matrices where only the top k singular values are needed, iterative methods like the Lanczos algorithm or randomized SVD provide much faster approximate results. Randomized SVD, introduced by Halko, Martinsson, and Tropp, can compute a rank-k approximation in O(mn*log(k)) time, making SVD practical for matrices with millions of rows and columns.

How do I interpret the result?

Results are displayed with a label and unit to help you understand the output. Many calculators include a short explanation or classification below the result (for example, a BMI category or risk level). Refer to the worked examples section on this page for real-world context.

References

Reviewed by Manoj Kumar, Mathematics Educator · Editorial policy