Ma · Mathematics

Why Can SVD Handle Rank-Deficient Matrices?

Published By the 9to5Science editorial team

At a glance

  1. 1. Separate the matrix

    SVD factors a matrix into orthogonal transformations and a diagonal matrix of singular values.

  2. 2. Allow zero values

    Rank deficiency appears as one or more zero singular values; no inverse is required.

  3. 3. Use the nonzero part

    The positive singular values describe the effective range and rank of the matrix.

  4. 4. Solve with a pseudoinverse

    Replace reciprocals of nonzero singular values by their reciprocals and leave zero entries at zero.

Advertisement

The singular value decomposition (SVD) can be applied to every real or complex matrix, including matrices whose columns or rows are linearly dependent. Rank deficiency is not an obstacle to the decomposition itself. It appears explicitly as zero singular values.

Here, rank deficient means that rank⁡(A)<min⁡(m,n)\operatorname{rank}(A)<\min(m,n), so the rank is below the maximum possible rank for an m×nm\times n matrix. A rectangular matrix can have dependent rows or columns simply because it has more rows than columns or more columns than rows, while still having rank min⁡(m,n)\min(m,n); this is called full rank in the rectangular sense.

The key distinction is between factoring a matrix and inverting a matrix. An inverse exists only for a square, full-rank matrix. SVD does not normally require an inverse, so it remains valid when the matrix loses rank.

The SVD does not require full rank

For a real matrix AA of size m×nm\times n, the SVD is

A=UΣVT,A=U\Sigma V^{\mathsf T},

where:

  • UU is an m×mm\times m orthogonal matrix,
  • VV is an n×nn\times n orthogonal matrix,
  • Σ\Sigma is an m×nm\times n diagonal-shaped matrix with nonnegative entries.

For a complex matrix, the corresponding formula is A=UΣV∗A=U\Sigma V^*, where UU and VV are unitary and ∗^* denotes the conjugate transpose.

The standard list contains p=min⁡(m,n)p=\min(m,n) singular values, which are the diagonal entries of Σ\Sigma:

σ1≥σ2≥⋯≥σp≥0.\sigma_1\geq \sigma_2\geq\cdots\geq\sigma_p\geq 0.

The rank of AA equals the number of nonzero singular values. Therefore, if AA is rank deficient under the convention above, some of the σi\sigma_i are exactly zero. A rectangular matrix that has full rank min⁡(m,n)\min(m,n) can have all pp listed singular values positive, even though its unequal dimensions give it an unavoidable left or right null space.

This is a perfectly permitted SVD:

Σ=[σ1000σ20000].\Sigma= \begin{bmatrix} \sigma_1 & 0 & 0\\ 0 & \sigma_2 & 0\\ 0 & 0 & 0 \end{bmatrix}.

The zero on the diagonal says that one corresponding input direction is mapped to the zero vector. It does not make the factorization invalid.

Why inversion is the problematic operation

If AA is square and invertible, its SVD gives

A−1=VΣ−1UT,A^{-1}=V\Sigma^{-1}U^{\mathsf T},

where each singular value is replaced by its reciprocal. This formula fails for a rank-deficient matrix because 1/01/0 is undefined.

But that failure concerns the inverse, not the SVD. The matrices UU, Σ\Sigma, and VV still exist. You simply cannot use them to construct an ordinary inverse.

For a rank-deficient matrix, the appropriate replacement is the Moore–Penrose pseudoinverse:

A+=VΣ+UT.A^+=V\Sigma^+U^{\mathsf T}.

To form Σ+\Sigma^+, transpose the shape of Σ\Sigma, replace every nonzero singular value σi\sigma_i by 1/σi1/\sigma_i, and leave the zero singular values as zero. Thus, no division by zero occurs.

Worked example

Consider

A=[1224].A=\begin{bmatrix}1&2\\2&4\end{bmatrix}.

The second row is twice the first, and the second column is twice the first, so AA has rank one rather than rank two.

Write

u=15[12].u=\frac{1}{\sqrt{5}}\begin{bmatrix}1\\2\end{bmatrix}.

Then

A=5uuT.A=5uu^{\mathsf T}.

One valid SVD is therefore

A=UΣVT,A=U\Sigma V^{\mathsf T},

with

U=V=[1/5−2/52/51/5],Σ=[5000].U=V= \begin{bmatrix} 1/\sqrt{5} & -2/\sqrt{5}\\ 2/\sqrt{5} & 1/\sqrt{5} \end{bmatrix}, \qquad \Sigma= \begin{bmatrix} 5&0\\ 0&0 \end{bmatrix}.

The first singular value is 55 and the second is 00. The zero singular value records the rank deficiency exactly. Multiplying these three matrices still reproduces AA.

There is no ordinary inverse because the determinant is zero. However, the pseudoinverse is well-defined:

Σ+=[1/5000],\Sigma^+= \begin{bmatrix} 1/5&0\\ 0&0 \end{bmatrix},

and consequently

A+=125[1224].A^+=\frac{1}{25} \begin{bmatrix} 1&2\\ 2&4 \end{bmatrix}.

Suppose you want to solve Ax=bAx=b for

b=[36]. b=\begin{bmatrix}3\\6\end{bmatrix}.

The equations reduce to

x+2y=3.x+2y=3.

There are infinitely many solutions. The SVD-based pseudoinverse gives the unique solution of smallest Euclidean norm:

x=A+b=125[1224][36]=[3/56/5]. x=A^+b =\frac{1}{25} \begin{bmatrix}1&2\\2&4\end{bmatrix} \begin{bmatrix}3\\6\end{bmatrix} =\begin{bmatrix}3/5\\6/5\end{bmatrix}.

Indeed, 3/5+2(6/5)=33/5+2(6/5)=3. Among all solutions, this one is perpendicular to the null space of AA and has minimum length.

Geometric interpretation

For a real matrix, the matrices VTV^{\mathsf T} and UU perform rotations or reflections. The diagonal matrix Σ\Sigma then scales mutually perpendicular directions by the singular values. In the complex case, the corresponding transformations are unitary and preserve Euclidean norms.

A zero singular value means that a particular direction is completely flattened. Different input vectors can therefore produce the same output, which is exactly why the matrix is not invertible. SVD does not try to recover information that the matrix has destroyed. It identifies the destroyed directions and keeps their scale factor equal to zero.

For a rank-rr matrix, the decomposition can be written using only the nonzero singular values:

A=∑i=1rσiuiviT.A=\sum_{i=1}^{r}\sigma_i u_i v_i^{\mathsf T}.

This is the compact SVD. It omits the zero singular directions and is often more useful than retaining the zero part of the full matrices.

Exact rank versus numerical rank

In exact mathematics, a singular value is either zero or nonzero. In floating-point computation, a value such as 10−1410^{-14} may be a true zero contaminated by rounding, or it may represent a genuinely small but nonzero direction.

Software therefore often uses a tolerance. Singular values below that tolerance are treated as zero when estimating rank or forming a pseudoinverse. This is essential because taking the reciprocal of a very small singular value can magnify numerical errors dramatically.

For example, if σ=10−10\sigma=10^{-10}, then 1/σ=10101/\sigma=10^{10}. A tiny measurement error in the corresponding component can become very large after inversion. A truncated SVD avoids this by discarding singular directions below a chosen threshold.

Common mistakes

Confusing SVD with an inverse

SVD is a factorization, not an assertion that A−1A^{-1} exists. Every matrix has an SVD, but only invertible square matrices have ordinary inverses.

Removing zero singular values without changing dimensions

The full SVD retains all left and right singular vectors, with the rectangular shape accounting for any extra null-space directions caused by unequal dimensions. A compact SVD may omit zero components, but its matrix dimensions must be changed consistently.

Treating tiny singular values as exact zeros automatically

Whether a small singular value should be discarded depends on numerical precision, the scale of the matrix, and the application. This is a numerical-rank decision, not purely an algebraic one.

Expecting a unique solution to every system

For a rank-deficient matrix, Ax=bAx=b may have no solution or infinitely many solutions. The pseudoinverse returns a least-squares solution, and among least-squares solutions it selects the one with minimum norm.

References

  1. Matrix Computations, Gene H. Golub and Charles F. Van Loan
  2. Numerical Linear Algebra, Lloyd N. Trefethen and David Bau III

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.