Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Singular Value Decomposition






The Universal Matrix Factorization

The singular value decomposition, written SVD, factors any matrix of any shape as UΣVᵀ — two orthogonal matrices sandwiching a diagonal matrix of non-negative singular values. It exists for every matrix, reveals the rank, provides orthonormal bases for all four fundamental subspaces, computes the pseudoinverse, yields the best low-rank approximation, and decomposes every linear transformation into a rotation or reflection, a scaling, and another rotation or reflection. No other single factorization provides this much information.

For step-by-step results on your own numbers, use the SVD calculator on CalculateMatrix.



What the Singular Value Decomposition Is

A matrix mixes coordinates. Every entry of the output is assembled from every entry of the input, so almost nothing worth knowing about AA can be read from AA itself. What is A10A^{10}? Multiply ten times and find out. What happens to a vector pushed through AA a thousand times — does it grow, shrink, settle into some direction? There is no answer short of running it.
Factorization removes the obstacle. Split AA into factors that each do one simple thing, and questions that required arithmetic can be settled by inspection.

Diagonalization and Its Requirement

Diagonalization does exactly that. Writing A=PDP−1A = PDP^{-1} amounts to changing coordinates so that the mixing is absent: the columns of PP are directions the matrix only stretches, DD holds the stretching factors, and in that basis no coordinate influences any other.
Take B=(2101)B = \begin{pmatrix} 2 & 1 \\ 0 & 1 \end{pmatrix}.
Its eigenvalues are 22 and 11, with eigenvectors (1,0)(1, 0) and (1,−1)(1, -1), so

B=PDP−1,P=(110−1),D=(2001)B = PDP^{-1}, \qquad P = \begin{pmatrix} 1 & 1 \\ 0 & -1 \end{pmatrix}, \qquad D = \begin{pmatrix} 2 & 0 \\ 0 & 1 \end{pmatrix}


The tenth power then costs nothing: B10=PD10P−1B^{10} = PD^{10}P^{-1}, and D10=(1024001)D^{10} = \begin{pmatrix} 1024 & 0 \\ 0 & 1 \end{pmatrix} because 210=10242^{10} = 1024. Restoring the original coordinates gives B10=(1024102301)B^{10} = \begin{pmatrix} 1024 & 1023 \\ 0 & 1 \end{pmatrix} without a single matrix multiplication. The inverse is PD−1P−1PD^{-1}P^{-1}, with no elimination anywhere. Long-run behaviour is governed by whichever λ\lambda is largest, here 22. Nothing is approximated and nothing is recomputed — the work was done once, when the factorization was found.
That performance comes with a condition, and the condition is visible in the formula. The same matrix PP stands on both sides of A=PDP−1A = PDP^{-1}: its columns are used to read the input and again to write the output. The factorization requires that both ends be described in identical terms — one basis, serving twice.
Two matrices, two ways the requirement fails.
one space — input and outputp₁p₂λ₁p₁the image of p₁ is written using p₁ itselfTwo ways this breaksA is 3 × 2 — input and outputlive in different spaces, so onebasis cannot describe both.✗A is square but defective — everyeigenvector is a multiple of (1, 0),so no basis of them exists.✗
A 3×23 \times 2 matrix takes vectors from R2\mathbb{R}^2 and returns vectors in R3\mathbb{R}^3, so no single basis can describe both ends, and the question of an eigenvector cannot even be posed: Av=λvA\mathbf{v} = \lambda\mathbf{v} compares vectors living in different spaces. A defective matrix fails otherwise. It is square, but every eigenvector is a multiple of one direction, so no basis of eigenvectors exists and PP cannot be assembled. Rectangular shape excludes diagonalization in principle, defective structure excludes it in practice, and between them they account for most matrices anyone meets.
The second failure takes three lines to verify.
Change one entry of BB and take A=(1101)A = \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}. Its characteristic polynomial is

det⁡(A−λI)=(1−λ)2\det(A - \lambda I) = (1 - \lambda)^2


so λ=1\lambda = 1 is a repeated root. Solving (A−I)v=0(A - I)\mathbf{v} = \mathbf{0} means solving (0100)v=0\begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix}\mathbf{v} = \mathbf{0}, which forces v2=0v_2 = 0 and leaves v1v_1 free. Every eigenvector is a multiple of (1,0)(1, 0): one direction, in two dimensions. There is no second column for PP, so AA has no diagonalization — not because the arithmetic is hard, but because the object being asked for does not exist.

Two Bases Instead of One

Nothing forced the two bases to coincide. That was an additional demand, and it can be withdrawn. Admit one orthonormal basis for the input space and a separate one for the output space, and require only that the matrix carry the first to the second with a scaling in between. Equal dimensions are then unnecessary, fixed directions are unnecessary, and both obstructions vanish together.
input space ℝⁿv₁v₂unit circle, orthonormal basisAAvᵢ = σᵢuᵢoutput space ℝᵐσ₁u₁σ₂u₂ellipse, axes σ₁ and σ₂ along a different orthonormal basis
The unit circle becomes an ellipse. Each vi\mathbf{v}_i is carried to a multiple of ui\mathbf{u}_i, and σi\sigma_i is that multiple.
The picture states the entire factorization in one equation. There is an orthonormal basis v1,…,vn\mathbf{v}_1, \dots, \mathbf{v}_n of the input space and an orthonormal basis u1,…,um\mathbf{u}_1, \dots, \mathbf{u}_m of the output space satisfying Avi=σiuiA\mathbf{v}_i = \sigma_i \mathbf{u}_i for every ii. Each input basis vector is sent to a multiple of a single output basis vector, and to nothing else.
The matrix that had no diagonalization has this one.
For the same A=(1101)A = \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}, form

ATA=(1112),det⁡(ATA−λI)=λ2−3λ+1A^TA = \begin{pmatrix} 1 & 1 \\ 1 & 2 \end{pmatrix}, \qquad \det(A^TA - \lambda I) = \lambda^2 - 3\lambda + 1


whose roots are λ=3±52\lambda = \frac{3 \pm \sqrt{5}}{2}. The scaling factors are their square roots,

σ1=1+52≈1.618,σ2=5−12≈0.618\sigma_1 = \frac{1 + \sqrt{5}}{2} \approx 1.618, \qquad \sigma_2 = \frac{\sqrt{5} - 1}{2} \approx 0.618


Two of them, both real, both positive, for a matrix with only one eigenvector. As a check, σ1σ2=1\sigma_1\sigma_2 = 1, which is ∣det⁡A∣|\det A| — the area scaling has to agree however it is computed. The eigenvectors of ATAA^TA supply v1\mathbf{v}_1 and v2\mathbf{v}_2, and ui=Avi/σi\mathbf{u}_i = A\mathbf{v}_i/\sigma_i supplies the other basis.
The definition
Collecting those nn statements into one matrix equation gives the singular value decomposition: an orthonormal input basis in VV, an orthonormal output basis in UU, and the scaling factors between them along the diagonal of Σ\Sigma.
SVD
A=UΣVTA = U\Sigma V^T
It is a factorization, not an approximation: the three matrices multiply back to AA exactly, with no error term and no conditions attached.
UU is m×mm \times m orthogonal and its columns are the left singular vectors. VV is n×nn \times n orthogonal and its columns are the right singular vectors. Σ\Sigma is m×nm \times n, zero everywhere off the diagonal, carrying σ1≥σ2≥⋯≥0\sigma_1 \geq \sigma_2 \geq \cdots \geq 0 along it. Those are the singular values, and they are the lengths of the semi-axes of the ellipse above.

What Follows and What Does Not

Several properties follow from the construction rather than from any further assumption. Both bases are orthonormal rather than merely independent, so U−1=UTU^{-1} = U^T and V−1=VTV^{-1} = V^T and neither factor is ever inverted. The scaling factors are real and non-negative, since they measure lengths, and can therefore be ordered from largest to smallest — an ordering no set of eigenvalues admits, eigenvalues being possibly complex. And the factorization exists for every matrix without exception: any shape, any rank, symmetric or not, invertible or not.
The same relaxation imposes a limitation, and the algebra shows exactly where.
Applying the matrix twice gives

A2=UΣVT⋅UΣVTA^2 = U\Sigma V^T \cdot U\Sigma V^T


and everything depends on the interior VTUV^TU. Under diagonalization the corresponding product is P−1P=IP^{-1}P = I, which cancels and leaves PD2P−1PD^2P^{-1}. Here VV and UU are different orthogonal matrices, so VTUV^TU is not the identity but a rotation — for the shear above, by about 26.6∘26.6^{\circ} — and nothing collapses. The question this section opened with, the tenth power and the long run, is therefore the one question the singular value decomposition cannot answer and diagonalization can. The two factorizations address different questions: one invariant directions, the other stretching. What the three factors do to a vector geometrically is the subject of the next section.

The Geometric Interpretation

Every linear transformation x↦Ax\mathbf{x} \mapsto A\mathbf{x} decomposes into three geometric steps:

VTV^T rotates (or reflects) the input space, aligning the input with the "natural axes" of the transformation — the directions along which AA stretches most and least.

Σ\Sigma scales each axis independently by the corresponding singular value. Axes with σi=0\sigma_i = 0 are annihilated — those directions are collapsed to zero.

UU rotates (or reflects) the scaled result into the output space.

The singular values measure the stretching in each orthogonal direction. σ1\sigma_1 is the maximum stretching: σ1=max⁡∥x∥=1∥Ax∥\sigma_1 = \max_{\|\mathbf{x}\|=1}\|A\mathbf{x}\|. The smallest nonzero singular value σr\sigma_r is the minimum stretching on the row space. For a full-rank matrix, the ratio σ1/σr\sigma_1/\sigma_r is the condition number — it measures how distorted the transformation is.

Even the most complex-looking matrix is geometrically just two rotations or reflections sandwiching a coordinate-axis scaling.

SVD Notation

Notation

SVD Notation

Letters that are contracts, a summation sign moonlighting as a matrix, and the lowercase sigma with a set-valued cousin one chapter away.
ATA^{T} and matrix products — matrix notation; λ\lambda and σ(A)\sigma(A) — eigenvalue notation; ∥⋅∥\|\cdot\| — norm notation.
A=UΣVTA = U\Sigma V^{T}
A equals U, Sigma, V-transpose
In decomposition notation the letters are the theorem: writing UΣVTU\Sigma V^{T} asserts UU and VV orthogonal and Σ\Sigma diagonal — three contracts in three glyphs. The whole family works this way: LULU promises triangles, QRQR promises orthogonal-times-triangular, PDP−1PDP^{-1} promises a diagonal DD.
CasesThe contracts extend to the derived marks: the pseudoinverse of The Pseudoinverse below inverts the letters that can be inverted — A+=VΣ+UTA^{+} = V\Sigma^{+}U^{T} — with the superscript ++ joining nn, −1-1, TT and ⊥\perp in the crowded label corner.
Also writtenUΣV∗U\Sigma V^{*} over the complex numbers, the star being the conjugate transpose — the modern adjoint of the adjugate's naming hazard.
Do not confuseThe family's own letters. LULU's UU is upper triangular; SVD's UU is orthogonal — the same letter signs two different contracts two pages apart, and only the decomposition's name says which is in force.
Σ\Sigma
Sigma — here, a diagonal matrix
Capital sigma as an object, not an operator: the rectangular diagonal matrix carrying the singular values, doing the scaling step of The Geometric Interpretation above. Maximum-contrast glyph reuse — everywhere else on this site, Σ\Sigma sums things.
CasesShape bookkeeping: for an m×nm \times n matrix AA, Σ\Sigma is m×nm \times n — diagonal entries σ1,…,σr\sigma_1, \ldots, \sigma_r, then zeros padding to the rectangle. The compact form of Compact and Thin Forms below trims the padding.
Also writtendiag⁡(σ1,…,σr)\operatorname{diag}(\sigma_1, \ldots, \sigma_r) — the constructor spelling, with the shape stated alongside; DD or SS in software documentation, where sigma is hard to type.
Do not confuseThe summation sign. No bounds above or below, no summand after — a bare Σ\Sigma between two matrix letters is a factor, not an instruction to add.
σ1≥σ2≥⋯≥0\sigma_1 \geq \sigma_2 \geq \cdots \geq 0
The singular values, in decreasing order
Lowercase sigma with an index — and the ordering is part of the notation: writing σ1\sigma_1 means the largest, by the standing convention of Singular Values below. No other subscripted family on this site carries a built-in sort.
CasesThe extremes have second names: σ1=∥A∥2\sigma_1 = \|A\|_2, the operator norm, and, for full-rank AA, σ1/σr=κ(A)\sigma_1/\sigma_r = \kappa(A), the condition number — kappa being numerical analysis's own reserved letter.
Also writtensis_i in some numerical texts and most software output, freeing sigma for statistics.
Do not confuseThe set-valued cousin: σ(A)\sigma(A) with no subscript is the spectrum — the set of eigenvalues. Subscripted sigma is a singular value, bare sigma-of is a set; eigenvalues and singular values agree only for special matrices, so the two sigmas rarely even hold the same numbers.
DownloadPNG2×PDF
Notation · Cheat sheet
Decomposition Notation at a Glance
The marks from the notation cards across the decomposition pages: how each is read and what it means. Every group links to the full card on its page.
LU decomposition
A=LUA = LU
A equals L U
Lower triangular times upper triangular.
PA=LUPA = LU
permute, then factor
PP on the left reorders the rows of AA.
lij,  i>jl_{ij}, \; i > j
entries of L below the diagonal
The multipliers used in elimination; ones on the diagonal.
QR decomposition
A=QRA = QR
A equals Q R
Orthonormal columns times upper triangular; Q1R1Q_1R_1 is the thin form.
QTQ=IQ^{T}Q = I
but not always Q Q transpose
For a thin QQ, QQT≠IQQ^{T} \neq I.
Ak+1=RkQkA_{k+1} = R_kQ_k
the QR iteration
Factor, then multiply back in reverse order.
Cholesky decomposition
A=LLTA = LL^{T}
L times L transpose
One factor, used twice; LL≠ALL \neq A.
xTAx>0\mathbf{x}^{T}A\mathbf{x} > 0
positive definite
Required for all x≠0\mathbf{x} \neq \mathbf{0}.
A=LDLTA = LDL^{T}
L D L transpose
The diagonal carried separately; no square roots.
Spectral decomposition
A=QDQTA = QDQ^{T}
Q D Q transpose
For symmetric AA: QTQ^{T} stands where Q−1Q^{-1} would be.
∑λiqiqiT\sum \lambda_i\mathbf{q}_i\mathbf{q}_i^{T}
a sum of rank-one terms
The same matrix, written by eigenvalues.
Singular value decompositionThis page
A=UΣVTA = U\Sigma V^{T}
U Sigma V transpose
Orthogonal UU and VV, diagonal Σ\Sigma.
Σ\Sigma
capital sigma
A diagonal matrix here, not a sum.
σ1≥σ2≥⋯≥0\sigma_1 \geq \sigma_2 \geq \cdots \geq 0
the singular values
σ1\sigma_1 always means the largest.
Same marks, different job
Σ\SigmaA diagonal matrix in the SVD; elsewhere the summation sign.
QQAlways orthonormal columns; QTQ^{T} then acts as the inverse.
LLLower triangular in both LU and Cholesky, but with ones on the diagonal only in LU.
Decomposition Notation at a Glance·/linear-algebra/decompositions/lower-upperLearn Math Class

Singular Values

The singular values of AA are the square roots of the eigenvalues of ATAA^TA (or equivalently AATAA^T):

Singular Values
σi=λi(ATA)=λi(AAT)\sigma_i = \sqrt{\lambda_i(A^TA)} = \sqrt{\lambda_i(AA^T)}

Since ATAA^TA is symmetric positive semi-definite, its eigenvalues are all ≥0\geq 0, so the singular values are real and non-negative. They are ordered σ1≥σ2≥⋯≥0\sigma_1 \geq \sigma_2 \geq \cdots \geq 0.

The number of nonzero singular values equals the rank of AA:

SVD Rank
rank(A)=#{i:σi>0}\text{rank}(A) = \#\{i : \sigma_i > 0\}

This is the most numerically stable method for determining rank: compute the SVD and count singular values above a tolerance.

Pitfall: Forgetting the square root
Taking the eigenvalues of ATAA^TA as the singular values gives 33 and 11 for A=(100111)A = \begin{pmatrix} 1 & 0 \\ 0 & 1 \\ 1 & 1 \end{pmatrix}, so σ12+σ22=10\sigma_1^2 + \sigma_2^2 = 10, while the squared entries of AA add up to 44. The singular values are 3\sqrt{3} and 11.

The largest singular value σ1\sigma_1 is the operator norm ∥A∥2=max⁡∥x∥=1∥Ax∥\|A\|_2 = \max_{\|\mathbf{x}\|=1}\|A\mathbf{x}\|. The Frobenius norm is ∥A∥F=σ12+σ22+⋯+σr2\|A\|_F = \sqrt{\sigma_1^2 + \sigma_2^2 + \cdots + \sigma_r^2}. For full-rank AA, the condition number is κ(A)=σ1/σr\kappa(A) = \sigma_1/\sigma_r — a large condition number means the matrix is nearly singular and small perturbations in the input cause large changes in the output.
AᵀA2×225202025→λ of AᵀA455→σ = √λ√45√5
Singular values as roots of eigenvalues

The eigenvalues of the symmetric product have been found and their square roots taken. They are never negative, because that product cannot have negative eigenvalues, and they are listed largest first by convention. This is why every matrix has singular values even when it has no eigenvalues of its own. Compute them for a rectangular matrix on the SVD visualizer.

Their ordering is what makes truncation meaningful: cutting the list short always discards the least important part first.

Computing the SVD

The standard hand method computes the SVD through the eigenvalue decomposition of ATAA^TA.

Form ATAA^TA (symmetric, n×nn \times n). Find its eigenvalues λ1≥⋯≥λn≥0\lambda_1 \geq \cdots \geq \lambda_n \geq 0 and orthonormal eigenvectors v1,…,vn\mathbf{v}_1, \dots, \mathbf{v}_n using the spectral decomposition. These are the right singular vectors: V=[v1  ⋯  vn]V = [\mathbf{v}_1 \; \cdots \; \mathbf{v}_n].

The singular values are σi=λi\sigma_i = \sqrt{\lambda_i}. The left singular vectors are computed from the right ones: ui=1σiAvi\mathbf{u}_i = \frac{1}{\sigma_i}A\mathbf{v}_i for each nonzero σi\sigma_i. If r<mr < m, extend {u1,…,ur}\{\mathbf{u}_1, \dots, \mathbf{u}_r\} to an orthonormal basis for Rm\mathbb{R}^m.

Worked Example
For A=(100111)A = \begin{pmatrix} 1 & 0 \\ 0 & 1 \\ 1 & 1 \end{pmatrix}: ATA=(2112)A^TA = \begin{pmatrix} 2 & 1 \\ 1 & 2 \end{pmatrix}, eigenvalues 33 and 11, eigenvectors 12(1,1)T\frac{1}{\sqrt{2}}(1, 1)^T and 12(1,−1)T\frac{1}{\sqrt{2}}(1, -1)^T. Singular values: 3\sqrt{3} and 11. Left singular vectors: u1=13Av1=16(1,1,2)T\mathbf{u}_1 = \frac{1}{\sqrt{3}}A\mathbf{v}_1 = \frac{1}{\sqrt{6}}(1, 1, 2)^T, u2=Av2=12(1,−1,0)T\mathbf{u}_2 = A\mathbf{v}_2 = \frac{1}{\sqrt{2}}(1, -1, 0)^T. Extend with u3=13(−1,−1,1)T\mathbf{u}_3 = \frac{1}{\sqrt{3}}(-1, -1, 1)^T.

Pitfall: Choosing the left vectors separately
Taking each ui\mathbf{u}_i as an eigenvector of AATAA^T on its own can flip a sign: u1=−16(1,1,2)T\mathbf{u}_1 = -\frac{1}{\sqrt{6}}(1, 1, 2)^T is also a unit eigenvector, but with it UΣVT=(0−1−10−1−1)≠AU\Sigma V^T = \begin{pmatrix} 0 & -1 \\ -1 & 0 \\ -1 & -1 \end{pmatrix} \neq A. With u1=1σ1Av1\mathbf{u}_1 = \frac{1}{\sigma_1}A\mathbf{v}_1 the product is AA.

In the example, the columns of VV came from the eigenvectors of ATAA^TA, and the first two columns of UU were then produced from them one at a time by ui=1σiAvi\mathbf{u}_i = \frac{1}{\sigma_i}A\mathbf{v}_i. Each such pair satisfies Avi=σiuiA\mathbf{v}_i = \sigma_i\mathbf{u}_i, which is the column-by-column form of AV=UΣAV = U\Sigma. Only u3\mathbf{u}_3, which meets the zero row of Σ\Sigma, is fixed by orthogonality to u1\mathbf{u}_1 and u2\mathbf{u}_2 alone.
A2×23045=U2×20.31620.94870.9487−0.3162·Σ2×26.7082002.2361·Vᵀ2×20.70710.70710.7071−0.7071
The three factors assembled

Two orthogonal matrices with a rectangular diagonal between them, and the whole product reconstructs the original. Unlike diagonalisation this asks nothing of the matrix — not squareness, not symmetry, not a full set of eigenvectors. Every matrix without exception has this factorisation. Build it for a matrix of your own on the SVD visualizer.

That universality is why the SVD, rather than the eigendecomposition, is the factorisation numerical work reaches for by default.

Compact and Thin Forms

The full SVD has UU of size m×mm \times m, Σ\Sigma of size m×nm \times n, and VV of size n×nn \times n. Two economical alternatives retain only the essential information.

The thin SVD keeps only the first nn columns of UU (call them U1U_1) and the top n×nn \times n block of Σ\Sigma (call it Σ1\Sigma_1): A=U1Σ1VTA = U_1 \Sigma_1 V^T. This drops the columns of UU corresponding to the left null space.

The compact SVD keeps only the first rr columns of UU and VV (where r=rank(A)r = \text{rank}(A)) and the r×rr \times r diagonal block of nonzero singular values: A=UrΣrVrTA = U_r \Sigma_r V_r^T. This is the most economical representation — it captures only the rank-rr content of AA, discarding everything associated with zero singular values.

All three forms represent the same matrix AA. The compact form uses the least storage; the full form provides bases for all four fundamental subspaces. The three variants line up cleanly on factor dimensions and on what each one chooses to keep.
DownloadPNG2×PDF
Decompositions · SVD

Three forms, one factorization

All three reconstruct AA exactly. They differ in how much of UU and Σ\Sigma is kept — and what is dropped is precisely the part that multiplies against zero singular values.

3forms
Everything kept1
Full SVD§ 1UU and VV both square and orthogonal
shapesU:m×mU: m \times m, Σ:m×n\Sigma: m \times n, V:n×nV: n \times n
what is keptall of UU, VV, and a rectangular Σ\Sigma
what is droppednothing
used fortheory, the four subspaces
The only form where UU and VV are genuinely orthogonal matrices, so UUT=IUU^{\mathsf{T}} = I as well as UTU=IU^{\mathsf{T}}U = I. That is what makes it the form to state results with — the last m−rm - r columns of UU span the left null space and would otherwise be gone.
Trimmed to what multiplies2
Thin SVD§ 5m>nm > n — keep nn columns of UU
shapesUn:m×nU_n: m \times n, Σn:n×n\Sigma_n: n \times n, V:n×nV: n \times n
what is keptthe first nn columns of UU
what is droppedthe last m−nm - n columns of UU
used forleast squares on tall matrices
The dropped columns multiply rows of Σ\Sigma that are entirely zero, so removing them changes nothing about the product. Note UnU_n is no longer square: UnTUn=InU_n^{\mathsf{T}}U_n = I_n still holds, but UnUnTU_nU_n^{\mathsf{T}} does not.
Compact SVD§ 5keep only the rr nonzero singular values
shapesUr:m×rU_r: m \times r, Σr:r×r\Sigma_r: r \times r, Vr:n×rV_r: n \times r
what is keptthe rank-rr content only
what is droppedevery zero singular value and its vectors
used forstorage, rank-deficient matrices
The most economical exact form: Σr\Sigma_r is square with a strictly positive diagonal, so it is invertible — which is what makes the pseudoinverse computable as VrΣr−1UrTV_r\Sigma_r^{-1}U_r^{\mathsf{T}}.
Nothing is approximated anywhere in this table. The full form carries orthonormal bases for all four fundamental subspaces, which is why it is the one to state theorems with; the compact form carries only what contributes to AA, which is why it is the one to store. Approximation begins only when the compact form is truncated below rank rr.
Three forms, one factorization·/linear-algebra/decompositions/svdLearn Math Class
The distinction to keep hold of is that none of these is an approximation. Each drops columns that multiply against zero singular values, so the product is unchanged and AA is reconstructed exactly in all three. What is lost is not accuracy but the orthogonality of UU as a square matrix — UrTUr=IrU_r^{\mathsf{T}}U_r = I_r still holds, but UrUrTU_rU_r^{\mathsf{T}} no longer does, and any argument relying on the left null space needs the full form.

SVD and the Four Fundamental Subspaces

The SVD simultaneously provides orthonormal bases for all four fundamental subspaces of AA:

SVD Four Fundamental Subspaces
Col(A)=Span{u1,…,ur}Null(AT)=Span{ur+1,…,um}Row(A)=Span{v1,…,vr}Null(A)=Span{vr+1,…,vn}\begin{aligned} \text{Col}(A) &= \text{Span}\{\mathbf{u}_1, \ldots, \mathbf{u}_r\} \\ \text{Null}(A^T) &= \text{Span}\{\mathbf{u}_{r+1}, \ldots, \mathbf{u}_m\} \\ \text{Row}(A) &= \text{Span}\{\mathbf{v}_1, \ldots, \mathbf{v}_r\} \\ \text{Null}(A) &= \text{Span}\{\mathbf{v}_{r+1}, \ldots, \mathbf{v}_n\} \end{aligned}

The first rr columns of VV (v1,…,vr\mathbf{v}_1, \dots, \mathbf{v}_r) form an orthonormal basis for the row space of AA.

The last n−rn - r columns of VV (vr+1,…,vn\mathbf{v}_{r+1}, \dots, \mathbf{v}_n) form an orthonormal basis for the null space of AA.

The first rr columns of UU (u1,…,ur\mathbf{u}_1, \dots, \mathbf{u}_r) form an orthonormal basis for the column space of AA.

The last m−rm - r columns of UU (ur+1,…,um\mathbf{u}_{r+1}, \dots, \mathbf{u}_m) form an orthonormal basis for the left null space of AA.

The SVD provides all four bases simultaneously, all orthonormal, and pairs them so that Avi=σiuiA\mathbf{v}_i = \sigma_i\mathbf{u}_i. The SVD is the complete structural portrait of any matrix.
Fundamental subspace Basis from Column indices Dimension
Row space of A V 1, ..., r r
Null space of A V r+1, ..., n n − r
Column space of A U 1, ..., r r
Left null space of A U r+1, ..., m m − r

The Pseudoinverse

The Moore-Penrose pseudoinverse A+A^+ is computed directly from the SVD:

Moore-Penrose Pseudoinverse
A+=VΣ+UTA^+ = V\Sigma^+ U^T

The matrix Σ+\Sigma^+ is formed by reciprocating each nonzero singular value and transposing the shape: if Σ\Sigma is m×nm \times n with diagonal entries σ1,…,σr,0,…,0\sigma_1, \dots, \sigma_r, 0, \dots, 0, then Σ+\Sigma^+ is n×mn \times m with diagonal entries 1/σ1,…,1/σr,0,…,01/\sigma_1, \dots, 1/\sigma_r, 0, \dots, 0.

The pseudoinverse satisfies four defining properties: AA+A=AAA^+A = A, A+AA+=A+A^+AA^+ = A^+, (AA+)T=AA+(AA^+)^T = AA^+, (A+A)T=A+A(A^+A)^T = A^+A.

THEOREM
For a full-rank overdetermined system (m>nm > n, rank =n= n), A+bA^+\mathbf{b} gives the least-squares solution. For a rank-deficient system, A+bA^+\mathbf{b} gives the minimum-norm least-squares solution — the solution of smallest length among all minimizers of ∥Ax−b∥\|A\mathbf{x} - \mathbf{b}\|.

Pitfall: Keeping U and V in place
Writing UΣ+VTU\Sigma^+V^T instead of VΣ+UTV\Sigma^+U^T: for A=(0200)A = \begin{pmatrix} 0 & 2 \\ 0 & 0 \end{pmatrix}, with u1=e1\mathbf{u}_1 = \mathbf{e}_1, v1=e2\mathbf{v}_1 = \mathbf{e}_2 and σ1=2\sigma_1 = 2, it gives (01/200)\begin{pmatrix} 0 & 1/2 \\ 0 & 0 \end{pmatrix}, and then AA+A=OAA^+A = O. The pseudoinverse is (001/20)\begin{pmatrix} 0 & 0 \\ 1/2 & 0 \end{pmatrix}.

Assembling A+A^+ takes three steps: reciprocate the nonzero singular values, transpose the shape of Σ\Sigma to get Σ+\Sigma^+, and multiply by the two orthogonal factors. When AA is square and invertible, the result is the ordinary inverse A−1=VΣ−1UTA^{-1} = V\Sigma^{-1}U^T. In every case the result can be tested against the four defining properties above.
The pseudoinverse inverts the matrix on every direction it keeps and sends the directions it cannot reach to zero.

Low-Rank Approximation

The best rank-kk approximation to AA in either the operator norm or the Frobenius norm is obtained by truncating the SVD at kk terms:

Eckart-Young Low-Rank Approximation
Ak=∑i=1kσiuiviT,∥A−Ak∥2=σk+1,∥A−Ak∥F=∑i=k+1rσi2A_k = \sum_{i=1}^{k} \sigma_i \mathbf{u}_i \mathbf{v}_i^T, \qquad \|A - A_k\|_2 = \sigma_{k+1}, \quad \|A - A_k\|_F = \sqrt{\sum_{i=k+1}^{r}\sigma_i^2}

This is the Eckart-Young-Mirsky theorem.

THEOREMEckart–Young–Mirsky theorem
Among all matrices of rank at most kk, AkA_k is the closest to AA.

Fact: Published in a psychology journal
Eckart and Young proved in 1936 that truncating the SVD gives the closest lower-rank matrix, in the first volume of Psychometrika. Psychologists needed it for factor analysis: explaining a large table of test scores by a few underlying abilities.

The approximation error equals σk+1\sigma_{k+1} (the first discarded singular value) in the operator norm, and σk+12+⋯+σr2\sqrt{\sigma_{k+1}^2 + \cdots + \sigma_r^2} in the Frobenius norm.

When the singular values decay rapidly — σ1≫σ2≫⋯\sigma_1 \gg \sigma_2 \gg \cdots — a small number of terms captures most of the matrix. This is the basis of image compression (store kk singular value triples instead of mnmn entries), noise reduction (discard small singular values as noise), latent semantic analysis (retain the top-kk "concepts" in a document-term matrix), and dimensionality reduction more broadly.
How fast the singular values fall decides how few numbers can stand in for the whole matrix.

SVD and Norms

The singular values provide the complete "size profile" of a matrix.

The operator (spectral) norm is the largest singular value:

Operator Norm
∥A∥2=σ1=max⁡∥x∥=1∥Ax∥\|A\|_2 = \sigma_1 = \max_{\|\mathbf{x}\|=1} \|A\mathbf{x}\|

It measures the maximum factor by which AA can stretch a unit vector.

The Frobenius norm is the root-sum-of-squares of all singular values:

Frobenius Norm via Singular Values
∥A∥F=∑i=1rσi2\|A\|_F = \sqrt{\sum_{i=1}^{r} \sigma_i^2}

It measures the total "energy" in the matrix.

The condition number quantifies sensitivity to perturbation:

Condition Number
κ(A)=σ1σn\kappa(A) = \frac{\sigma_1}{\sigma_n}

A matrix with κ=10k\kappa = 10^k loses roughly kk digits of accuracy in solving Ax=bA\mathbf{x} = \mathbf{b} with floating-point arithmetic. A perfectly conditioned matrix (κ=1\kappa = 1) is a nonzero multiple of an orthogonal matrix. A singular square matrix (σn=0\sigma_n = 0) has κ=∞\kappa = \infty.

The singular values are the natural measuring tool for matrices, just as eigenvalues are the natural measuring tool for symmetric matrices and linear operators. For non-symmetric matrices, singular values (not eigenvalues) govern norms and conditioning.
Quantity Formula via singular values Interpretation
Operator (spectral) norm ‖A‖2 σ1 maximum stretching factor on the unit ball
Frobenius norm ‖A‖F √(σ12 + σ22 + ··· + σr2) total "energy" — root-sum-of-squares of singular values
Condition number κ(A) σ1 / σr sensitivity to perturbation: κ = 10k loses ~k digits

SVD and the Spectral Decomposition

COROLLARY
For a symmetric positive semi-definite matrix AA with eigenvalues λ1≥⋯≥λn≥0\lambda_1 \geq \cdots \geq \lambda_n \geq 0, the spectral decomposition A=QDQTA = QDQ^T is also the SVD: U=V=QU = V = Q and Σ=D\Sigma = D.

The singular values are the eigenvalues.

For a general symmetric matrix with some negative eigenvalues, the singular values are ∣λi∣|\lambda_i|. The signs are absorbed into UU or VV: if λi<0\lambda_i < 0, one of the corresponding singular vectors is negated so that σi=∣λi∣>0\sigma_i = |\lambda_i| > 0.

Pitfall: Using the eigenvalues of A
Reading the singular values of A=(1201)A = \begin{pmatrix} 1 & 2 \\ 0 & 1 \end{pmatrix} off its eigenvalues 1,11, 1 gives ∥A∥2=1\|A\|_2 = 1 and κ(A)=1\kappa(A) = 1. From ATA=(1225)A^TA = \begin{pmatrix} 1 & 2 \\ 2 & 5 \end{pmatrix}, σ1,2=2±1\sigma_{1,2} = \sqrt{2} \pm 1, so ∥A∥2=1+2\|A\|_2 = 1 + \sqrt{2} and κ(A)=3+22\kappa(A) = 3 + 2\sqrt{2}.

For non-symmetric or rectangular matrices, the eigendecomposition does not apply (it requires square matrices and may not exist even then), but the SVD always does. The SVD is the correct generalization of the spectral decomposition to the broadest possible class of matrices.
DownloadPNG2×PDF
Before you read
How far the SVD reaches
The spectral decomposition needs a symmetric matrix; the SVD works for every matrix. Moving outward, the two decompositions part ways.

S₊⊂S⊂M_n⊂M_{m×n}

M_{m×n}
All matrices
adds rectangular shapes · only the SVD applies
M_n
Square
eigendecomposition may not exist
S
adds negative eigenvalues · σi=∣λi∣\sigma_i = |\lambda_i|, signs absorbed into UU or VV
S₊
Symmetric positive semi-definite
spectral decomposition and SVD coincide: U=V=QU = V = Q, Σ=D\Sigma = D
Takeaway
The broadest possible class
Where eigendecomposition may fail or not apply, the SVD always does: it covers non-symmetric and rectangular matrices too.
How far the SVD reaches·/linear-algebra/decompositions/svdLearn Math Class

The Outer Product Form

The SVD can be written as a sum of rank-one matrices:

SVD Outer Product Form
A=∑i=1rσi uiviTA = \sum_{i=1}^{r} \sigma_i \, \mathbf{u}_i \mathbf{v}_i^T

Fact: A million dollars for a low-rank guess
The Netflix Prize data held about 100 million ratings from 480,189 users of 17,770 films, so under 1.2% of the table was filled. Fitting the known ratings with a short sum of rank-one terms, called SVD by the contestants, was central to the entry that won the one-million-dollar prize in 2009.

Each term σiuiviT\sigma_i \mathbf{u}_i\mathbf{v}_i^T is an m×nm \times n rank-one matrix. The singular value σi\sigma_i weights its contribution. The terms are ordered by importance: the first term captures the most of AA (in the norm sense), the second captures the most of the remainder, and so on.

Truncating this sum at kk terms gives the best rank-kk approximation AkA_k. The fraction of the squared Frobenius norm captured by the first kk terms is (σ12+⋯+σk2)/(σ12+⋯+σr2)(\sigma_1^2 + \cdots + \sigma_k^2)/(\sigma_1^2 + \cdots + \sigma_r^2).

This outer product perspective is the basis of nearly every matrix approximation method: keep the large singular values (signal) and discard the small ones (noise or redundancy).
A2×23045=√45·u₁v₁ᵀ2×23/23/29/29/2+√5·u₂v₂ᵀ2×23/2−3/2−1/21/2
A as a sum of rank-one pieces

The same matrix written term by term: A = √45 u₁v₁T + √5 u₂v₂T. Each term is a rank-one matrix — a column times a row — weighted by a singular value, largest first. Keeping only the first term gives the best rank-one approximation of A, which is why the order of the singular values matters. Build the terms on the SVD visualizer.

Truncating this sum after k terms is exactly the low-rank approximation described above.

Spectral Norm and Condition Number

The singular values answer two numerical questions that the eigenvalues cannot: how much can AA stretch a vector at most, and how sensitive is Ax=bA\mathbf{x} = \mathbf{b} to errors in the data.

The spectral norm is the worst-case stretch factor:

Spectral Norm and Condition Number
∥A∥2=max⁡x≠0∥Ax∥∥x∥=σ1\|A\|_2 = \max_{\mathbf{x} \neq \mathbf{0}} \frac{\|A\mathbf{x}\|}{\|\mathbf{x}\|} = \sigma_1

Write x\mathbf{x} in the orthonormal basis v1,…,vn\mathbf{v}_1, \dots, \mathbf{v}_n of right singular vectors; AA scales the ii-th coefficient by σi\sigma_i and hands it to ui\mathbf{u}_i, so the ratio is largest when x=v1\mathbf{x} = \mathbf{v}_1 and equals σ1\sigma_1. Geometrically, σ1\sigma_1 is the longest semi-axis of the ellipse that the unit circle is mapped to. This differs from the Frobenius norm σ12+⋯+σr2\sqrt{\sigma_1^2 + \cdots + \sigma_r^2}, which adds up every stretch rather than reporting the largest.

The condition number is the ratio of the largest stretch to the smallest:

Spectral Norm and Condition Number
κ(A)=σ1σn=∥A∥2 ∥A−1∥2\kappa(A) = \frac{\sigma_1}{\sigma_n} = \|A\|_2\,\|A^{-1}\|_2

for an invertible square matrix, since the largest singular value of A−1A^{-1} is 1/σn1 / \sigma_n. It bounds how a relative error in b\mathbf{b} propagates to the solution of Ax=bA\mathbf{x} = \mathbf{b}:

Spectral Norm and Condition Number
∥δx∥∥x∥≤κ(A) ∥δb∥∥b∥\frac{\|\delta\mathbf{x}\|}{\|\mathbf{x}\|} \leq \kappa(A)\,\frac{\|\delta\mathbf{b}\|}{\|\mathbf{b}\|}

A condition number near 11 means errors pass through unamplified, and orthogonal matrices achieve exactly 11. A condition number of 10k10^k means roughly kk decimal digits of accuracy can be lost in solving the system. An infinite condition number means σn=0\sigma_n = 0: the matrix is singular.

The determinant says nothing about conditioning. The diagonal matrix with entries 10610^{6} and 10−610^{-6} has det⁡=1\det = 1 and κ=1012\kappa = 10^{12}. Ill-conditioning is about the ratio of the stretches, not their product, and only the singular values expose it.

The SVD tool reports both numbers for any 2×22 \times 2 matrix alongside the ellipse whose axes they measure.

What the SVD Reveals

No other single factorization provides as much structural information about a matrix.

The rank: the number of nonzero singular values.

The four fundamental subspaces: orthonormal bases from the columns of UU and VV.

The pseudoinverse: A+=VΣ+UTA^+ = V\Sigma^+ U^T.

The best rank-kk approximation: truncate at kk terms.

Norms and the condition number: directly from the singular values.

The geometry of the linear map: rotation or reflection, scaling, rotation or reflection.

For symmetric positive semi-definite matrices, the SVD reduces to the spectral decomposition. For invertible square matrices, the singular values reveal the conditioning that the determinant alone cannot see (a matrix with det⁡=1\det = 1 can still be poorly conditioned). For rectangular matrices, the SVD is one of the few factorizations that apply without modification.

The SVD is the culmination of the decomposition hierarchy — the most general, most informative, and most broadly applicable factorization in linear algebra.

The six structural quantities the SVD exposes — rank, the four fundamental subspaces, the pseudoinverse, the best rank-kk approximation, norms and condition number, and the geometric decomposition — collect into a single reference card below.
Grouping these by which factor supplies the answer is what makes them one computation rather than seven. Three come from the singular values alone, two from the columns of the orthogonal factors, and two require reading all three factors together. Nothing below needs the matrix again once the factorization is in hand.
DownloadPNG2×PDF
Decompositions · SVD

What the SVD reveals

Every entry comes from the same three factors. What changes is which one is being read — the singular values for size, the columns of UU and VV for structure, and all three together for geometry.

7readings
From the singular values3
1
strictly positive only
r=r = count of σi>0\sigma_i > 0
The most numerically reliable rank there is. Row reduction decides rank by comparing entries against zero, which floating point makes arbitrary; the singular values instead show a gap, and where that gap falls is a judgement the numbers themselves support.
2
read straight off the list
∥A∥2=σ1,∥A∥F2=∑σi2\|A\|_2 = \sigma_1, \quad \|A\|_F^2 = \textstyle\sum \sigma_i^2
The largest singular value is the most any unit vector is stretched. The Frobenius norm is the whole list in quadrature — so both common matrix norms are functions of the same numbers.
3
AA of full rank
κ(A)=σ1/σr\kappa(A) = \sigma_1 / \sigma_r
The ratio of most to least stretched. A large κ\kappa means the matrix is nearly singular in some direction, and small changes to b\mathbf{b} produce large changes to the solution — which no determinant reports, since a matrix can have det⁡=1\det = 1 and be badly conditioned.
From the columns of U and V2
4
orthonormal bases, all four at once
partition UU and VV at index rr
First rr columns of VV span the row space and the rest the null space; first rr of UU span the column space and the rest the left null space. It gives all four orthonormally from one computation, with Avi=σiuiA\mathbf{v}_i = \sigma_i\mathbf{u}_i pairing them.
5
reciprocate the nonzero σ\sigma, leave zeros alone
A+=VΣ+UTA^{+} = V\Sigma^{+}U^{\mathsf{T}}
Defined for every matrix, square or not, invertible or not. When AA is invertible it coincides with A−1A^{-1}; otherwise it returns the least-squares solution of minimum norm, which is the sense in which it is the closest thing to an inverse.
From all three factors2
6
optimal for every unitarily invariant norm
Ak=∑i=1kσiuiviTA_k = \sum_{i=1}^{k} \sigma_i \mathbf{u}_i \mathbf{v}_i^{\mathsf{T}}
Truncating the outer-product sum gives the best rank-kk approximation there is — the Eckart–Young theorem, and it is why the SVD underlies image compression and principal component analysis. The error in the operator norm is exactly σk+1\sigma_{k+1}, so the singular values say in advance how much is lost.
7
every matrix, no hypotheses
A=UΣVTA = U\Sigma V^{\mathsf{T}} — rotate, stretch, rotate
Read right to left: VTV^{\mathsf{T}} rotates, Σ\Sigma scales along axes, UU rotates again. Every linear map is those three steps, which is the claim that makes the factorization worth having as geometry rather than only as algebra.
No other factorization that exists for every matrix answers this many questions. That combination is why the SVD is the one to reach for when the matrix is rectangular, rank-deficient, or simply unknown — the conditions many of the other decompositions require are exactly the ones it does without.
What the SVD reveals·/linear-algebra/decompositions/svdLearn Math Class
Two of these deserve emphasis because nothing else supplies them. The condition number measures how badly a system amplifies error, and it is invisible to the determinant — a matrix can have determinant one and still be nearly singular in some direction. Low-rank approximation is optimal rather than merely reasonable: truncating the sum at kk terms gives the closest rank-kk matrix in every unitarily invariant norm, with error exactly σk+1\sigma_{k+1} in the operator norm.
The reason all of this comes from one factorization is that the SVD asks nothing of the matrix. It need not be square, invertible, symmetric or full rank — the factorization exists regardless, which is what separates it from every other decomposition in this section and why it is the one to reach for when the matrix is unknown.

Common Pitfalls

Four mistakes come up again and again when an SVD is worked out by hand. Each is marked with a box where it happens in the sections above; here each is worked through in full, with the wrong and the right working side by side.

Forgetting the square root

The eigenvalues of ATAA^TA are found correctly and then used directly as the singular values. The square root that turns them into stretch factors is left out.

Wrong working: for A=(100111)A = \begin{pmatrix} 1 & 0 \\ 0 & 1 \\ 1 & 1 \end{pmatrix} from the worked example,
ATA=(2112),λ1=3,  λ2=1⟹σ1=3,  σ2=1A^TA = \begin{pmatrix} 2 & 1 \\ 1 & 2 \end{pmatrix}, \quad \lambda_1 = 3, \; \lambda_2 = 1 \quad \Longrightarrow \quad \sigma_1 = 3, \; \sigma_2 = 1


Right working: each singular value is the square root of an eigenvalue.
σ1=3,σ2=1=1\sigma_1 = \sqrt{3}, \quad \sigma_2 = \sqrt{1} = 1


Why it happens: the whole computation runs through the eigenvalue problem for ATAA^TA, and its eigenvalues look like the final answer. When an eigenvalue is 00 or 11 the square root changes nothing, which hides the step.

How to check: the squares of the singular values must add up to the sum of the squared entries of AA, which is ∥A∥F2\|A\|_F^2. Here the entries give 1+1+1+1=41 + 1 + 1 + 1 = 4, and (3)2+12=4(\sqrt{3})^2 + 1^2 = 4, while 32+12=103^2 + 1^2 = 10. A second test: ∥Av1∥\|A\mathbf{v}_1\| must equal σ1\sigma_1, and Av1=12(1,1,2)TA\mathbf{v}_1 = \frac{1}{\sqrt{2}}(1, 1, 2)^T has length 3\sqrt{3}.

Choosing the left vectors separately

The right singular vectors come from ATAA^TA, and the left ones are taken as unit eigenvectors of AATAA^T, found independently. Each eigenvector is fixed only up to sign, so the two choices need not match, and UΣVTU\Sigma V^T no longer equals AA.

Wrong working: with v1=12(1,1)T\mathbf{v}_1 = \frac{1}{\sqrt{2}}(1, 1)^T and v2=12(1,−1)T\mathbf{v}_2 = \frac{1}{\sqrt{2}}(1, -1)^T from the worked example, the unit eigenvector of AATAA^T for λ=3\lambda = 3 is taken as u1=−16(1,1,2)T\mathbf{u}_1 = -\frac{1}{\sqrt{6}}(1, 1, 2)^T, with u2=12(1,−1,0)T\mathbf{u}_2 = \frac{1}{\sqrt{2}}(1, -1, 0)^T. Since u3\mathbf{u}_3 meets a zero row of Σ\Sigma,
UΣVT=σ1u1v1T+σ2u2v2T=−12(111122)+12(1−1−1100)=(0−1−10−1−1)U\Sigma V^T = \sigma_1\mathbf{u}_1\mathbf{v}_1^T + \sigma_2\mathbf{u}_2\mathbf{v}_2^T = -\frac{1}{2}\begin{pmatrix} 1 & 1 \\ 1 & 1 \\ 2 & 2 \end{pmatrix} + \frac{1}{2}\begin{pmatrix} 1 & -1 \\ -1 & 1 \\ 0 & 0 \end{pmatrix} = \begin{pmatrix} 0 & -1 \\ -1 & 0 \\ -1 & -1 \end{pmatrix}


Right working: compute u1\mathbf{u}_1 from v1\mathbf{v}_1.
u1=13Av1=13⋅12(1,1,2)T=16(1,1,2)T\mathbf{u}_1 = \frac{1}{\sqrt{3}}A\mathbf{v}_1 = \frac{1}{\sqrt{3}} \cdot \frac{1}{\sqrt{2}}(1, 1, 2)^T = \frac{1}{\sqrt{6}}(1, 1, 2)^T

UΣVT=12(111122)+12(1−1−1100)=(100111)=AU\Sigma V^T = \frac{1}{2}\begin{pmatrix} 1 & 1 \\ 1 & 1 \\ 2 & 2 \end{pmatrix} + \frac{1}{2}\begin{pmatrix} 1 & -1 \\ -1 & 1 \\ 0 & 0 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \\ 1 & 1 \end{pmatrix} = A


Why it happens: the columns of UU and VV are eigenvectors of AATAA^T and ATAA^TA, so it looks natural to compute both the same way. That description fixes each column only up to sign, and it says nothing about the pairing Avi=σiuiA\mathbf{v}_i = \sigma_i\mathbf{u}_i that holds the factorization together.

How to check: for each nonzero σi\sigma_i, compare AviA\mathbf{v}_i with σiui\sigma_i\mathbf{u}_i. Here Av1=12(1,1,2)TA\mathbf{v}_1 = \frac{1}{\sqrt{2}}(1, 1, 2)^T, while the wrong choice gives σ1u1=−12(1,1,2)T\sigma_1\mathbf{u}_1 = -\frac{1}{\sqrt{2}}(1, 1, 2)^T.

Keeping U and V in place

To build the pseudoinverse, Σ\Sigma is replaced by Σ+\Sigma^+ but the outer factors are left where they were, giving UΣ+VTU\Sigma^+V^T. The order has to reverse, as it does for the inverse of any product.

Wrong working: A=(0200)A = \begin{pmatrix} 0 & 2 \\ 0 & 0 \end{pmatrix} sends e2\mathbf{e}_2 to 2e12\mathbf{e}_1 and e1\mathbf{e}_1 to 0\mathbf{0}, so σ1=2\sigma_1 = 2, v1=e2\mathbf{v}_1 = \mathbf{e}_2, u1=e1\mathbf{u}_1 = \mathbf{e}_1, and σ2=0\sigma_2 = 0, v2=e1\mathbf{v}_2 = \mathbf{e}_1, u2=e2\mathbf{u}_2 = \mathbf{e}_2. Then U=IU = I, V=(0110)V = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, Σ+=(1/2000)\Sigma^+ = \begin{pmatrix} 1/2 & 0 \\ 0 & 0 \end{pmatrix}, and
UΣ+VT=(1/2000)(0110)=(01/200)U\Sigma^+V^T = \begin{pmatrix} 1/2 & 0 \\ 0 & 0 \end{pmatrix}\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} = \begin{pmatrix} 0 & 1/2 \\ 0 & 0 \end{pmatrix}


Right working: VV goes on the left and UTU^T on the right.
A+=VΣ+UT=(0110)(1/2000)=(001/20)A^+ = V\Sigma^+U^T = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}\begin{pmatrix} 1/2 & 0 \\ 0 & 0 \end{pmatrix} = \begin{pmatrix} 0 & 0 \\ 1/2 & 0 \end{pmatrix}


Why it happens: Σ+\Sigma^+ takes the place of Σ\Sigma in the middle, and it is tempting to change nothing else. For a symmetric positive semi-definite matrix U=VU = V, so the slip gives the right answer there and goes unnoticed.

How to check: test the first defining property, AA+A=AAA^+A = A. With the correct A+A^+, AA+=(1000)AA^+ = \begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix} and AA+A=AAA^+A = A. With the wrong one, A(01/200)=OA \begin{pmatrix} 0 & 1/2 \\ 0 & 0 \end{pmatrix} = O, so AA+A=OAA^+A = O. For a rectangular AA the sizes alone catch it: A+A^+ must be n×mn \times m, and UΣ+VTU\Sigma^+V^T is not even defined when m≠nm \neq n.

Using the eigenvalues of A

For a square matrix, the singular values are read off the eigenvalues of AA itself, and the norm and the condition number are computed from them. This works for symmetric matrices, after taking absolute values, but not in general.

Wrong working: A=(1201)A = \begin{pmatrix} 1 & 2 \\ 0 & 1 \end{pmatrix} is triangular, with eigenvalues 11 and 11. Taking these as the singular values gives
∥A∥2=1,κ(A)=11=1\|A\|_2 = 1, \qquad \kappa(A) = \frac{1}{1} = 1


Right working: the singular values come from ATAA^TA.
ATA=(1225),λ2−6λ+1=0,λ=3±22A^TA = \begin{pmatrix} 1 & 2 \\ 2 & 5 \end{pmatrix}, \quad \lambda^2 - 6\lambda + 1 = 0, \quad \lambda = 3 \pm 2\sqrt{2}

σ1=3+22=1+2,σ2=3−22=2−1\sigma_1 = \sqrt{3 + 2\sqrt{2}} = 1 + \sqrt{2}, \qquad \sigma_2 = \sqrt{3 - 2\sqrt{2}} = \sqrt{2} - 1

∥A∥2=1+2≈2.414,κ(A)=2+12−1=3+22≈5.83\|A\|_2 = 1 + \sqrt{2} \approx 2.414, \qquad \kappa(A) = \frac{\sqrt{2} + 1}{\sqrt{2} - 1} = 3 + 2\sqrt{2} \approx 5.83


Why it happens: for symmetric matrices the singular values are the absolute values of the eigenvalues, as the section on the spectral decomposition shows, and the shortcut is carried over to matrices that are not symmetric.

How to check: one vector is enough. Ae2=(2,1)TA\mathbf{e}_2 = (2, 1)^T has length 5≈2.24\sqrt{5} \approx 2.24, more than 11, so ∥A∥2\|A\|_2 cannot be 11. The squares of the singular values must also add up to the squared entries, 1+4+0+1=61 + 4 + 0 + 1 = 6; the eigenvalues give 1+1=21 + 1 = 2, while (1+2)2+(2−1)2=6(1 + \sqrt{2})^2 + (\sqrt{2} - 1)^2 = 6.

Singular Value Decomposition FAQ

Is the UU in the SVD the same kind of matrix as the UU in LULU?

+
No, and the collision is worth watching. In LULU the letter means upper triangular; in the SVD it means orthogonal. The same character signs two different contracts a couple of pages apart, and only the name of the decomposition says which is in force. Nothing about the symbol itself distinguishes them.Read more →

Is the Σ\Sigma in UΣVTU\Sigma V^{T} a summation sign?

+
No, it is a matrix. A summation sign carries bounds above and below and is followed by a summand, none of which appear here. A bare capital sigma sitting between two matrix letters is a factor in a product, and in the SVD it is the rectangular diagonal matrix holding the singular values with zero padding.Read more →

What is the difference between σi\sigma_i and σ(A)\sigma(A)?

+
The subscript changes the species entirely. A subscripted σi\sigma_i is one singular value, a single non-negative number, while a bare σ(A)\sigma(A) is the spectrum, meaning the set of eigenvalues. Since singular values and eigenvalues agree only for special matrices, the two notations rarely even hold the same numbers.Read more →

Can you take UU from AATAA^T and VV from ATAA^TA separately?

+
Not safely, because each eigenvector is fixed at best up to sign, and the two choices need not match. The factorization depends on the pairing Avi=σiuiA\mathbf{v}_i = \sigma_i\mathbf{u}_i, and an independently chosen ui\mathbf{u}_i can be its negative, giving a product that is not AA. The reliable route takes VV from ATAA^TA and sets ui=Avi/σi\mathbf{u}_i = A\mathbf{v}_i / \sigma_i for each nonzero singular value; only the remaining columns of UU are free.Read more →

Can a matrix with determinant 1 be ill-conditioned?

+
Yes. Conditioning depends on the ratio of the largest singular value to the smallest, while the determinant, up to sign, is their product, and a product can stay at 11 while the ratio explodes. The diagonal matrix with entries 10610^{6} and 10−610^{-6} has determinant 11 yet condition number 101210^{12}, enough to wipe out most of the digits a computer carries. Only the singular values show this; the determinant hides it.Read more →

Can the SVD be used to compute powers of a matrix?

+
Not in general. Squaring gives A2=UΣVTUΣVTA^2 = U\Sigma V^TU\Sigma V^T, and the middle product VTUV^TU is not the identity, because the input and output bases differ, so nothing cancels. Diagonalization answers questions about powers and long-run behaviour; the SVD answers questions about stretching, rank and approximation. The clean exception is a symmetric positive semi-definite matrix, where U=VU = V and Ak=UΣkUTA^k = U\Sigma^kU^T.Read more →