Tutorials › Linear Algebra › SVDs Of Rank-Deficient Matrices

Singular Value Decomposition · Tutorial 791 of 1000

SVDs Of Rank-Deficient Matrices

Learn how rank deficiency appears in the singular values and how to build and verify a full SVD when some singular values are zero.

Advanced 9 min read

What You'll Learn

  • Apply the singular-value convention for rectangular matrices, including wide matrices.
  • Find zero singular values from the Gram matrix and connect them to null-space directions.
  • Construct singular vectors from positive eigenvalues and complete the needed orthonormal bases.
  • Build full SVDs for tall, wide, and square rank-deficient matrices.
  • Verify a proposed decomposition by multiplying its factors.
  • Avoid confusing extra zero eigenvalues with diagonal singular-value positions.

What Rank Deficiency Changes in an SVD

When a matrix has full possible rank, every diagonal position in its singular-value matrix is positive. If the matrix is rank-deficient, at least one of those positions is zero. That zero is not merely a missing scale factor: it signals a direction that the matrix sends to the zero vector. A full SVD must also account for the other directions needed to make its left and right singular vectors orthonormal bases.

Let \(\mathbf{A}\in\mathbb{R}^{m\times n}\), and put \(p=\min(m,n)\). The matrix \(\mathbf{A}^{\top}\mathbf{A}\) is an \(n\times n\) symmetric matrix with nonnegative eigenvalues. The convention for rectangular matrices is important: the singular values are the square roots of the largest \(p\) eigenvalues, counting multiplicity, listed in nonincreasing order. The full SVD has the shape \(\mathbf{A}=\mathbf{U}\boldsymbol{\Sigma}\mathbf{V}^{\top}\), where \(\mathbf{U}\) is \(m\times m\) orthogonal, \(\mathbf{V}\) is \(n\times n\) orthogonal, and \(\boldsymbol{\Sigma}\) is \(m\times n\), with the \(p\) singular values on its diagonal positions and zeros elsewhere.

Definition: A matrix \(\mathbf{A}\in\mathbb{R}^{m\times n}\) is rank-deficient if \(\operatorname{rank}\mathbf{A}<p\), where \(p=\min(m,n)\). Its singular values are the \(p\) nonnegative square roots of the largest \(p\) eigenvalues of \(\mathbf{A}^{\top}\mathbf{A}\), counting multiplicity. In a full SVD, \(\boldsymbol{\Sigma}\) has these \(p\) values on its diagonal and is zero in every other position.

For a wide matrix, \(m<n\), the Gram matrix has \(n\) eigenvalues but the singular-value list has only \(p=m\) entries. The additional \(n-m\) zero eigenvalues forced by the dimensions are not extra diagonal positions in \(\boldsymbol{\Sigma}\). A rank-deficient wide matrix can have further zero eigenvalues among the \(p\) eigenvalues used to define its singular values. Keeping these two kinds of zeros distinct prevents a common shape error.

Why a Zero Eigenvalue Gives a Null-Space Direction

The null space of \(\mathbf{A}\) is the set of vectors \(\mathbf{x}\in\mathbb{R}^n\) for which \(\mathbf{A}\mathbf{x}=\mathbf{0}\). The following fact identifies these vectors directly from the Gram matrix. It is especially useful when constructing the zero-singular-value columns of \(\mathbf{V}\).

Theorem: For every real matrix \(\mathbf{A}\), \(\operatorname{Nul}(\mathbf{A}^{\top}\mathbf{A})=\operatorname{Nul}\mathbf{A}\). In particular, \(\mathbf{A}^{\top}\mathbf{A}\mathbf{v}=\mathbf{0}\) if and only if \(\mathbf{A}\mathbf{v}=\mathbf{0}\).

Proof. If \(\mathbf{A}\mathbf{x}=\mathbf{0}\), then \(\mathbf{A}^{\top}\mathbf{A}\mathbf{x}=\mathbf{A}^{\top}\mathbf{0}=\mathbf{0}\). Conversely, suppose \(\mathbf{A}^{\top}\mathbf{A}\mathbf{x}=\mathbf{0}\). Taking the dot product with \(\mathbf{x}\) gives \(\mathbf{x}^{\top}\mathbf{A}^{\top}\mathbf{A}\mathbf{x}=0\). The left side equals \((\mathbf{A}\mathbf{x})^{\top}(\mathbf{A}\mathbf{x})=\|\mathbf{A}\mathbf{x}\|^2\). A squared Euclidean norm is zero only for the zero vector, so \(\mathbf{A}\mathbf{x}=\mathbf{0}\). Thus the two null spaces are equal. \(\square\)

This also explains why a zero-eigenvalue right singular vector is a null-space direction. For a positive eigenvalue \(\lambda_i=\sigma_i^2\) with unit eigenvector \(\mathbf{v}_i\), the corresponding left singular vector is \(\mathbf{u}_i=\mathbf{A}\mathbf{v}_i/\sigma_i\). For a zero eigenvalue, this division is not defined; instead, the theorem says \(\mathbf{A}\mathbf{v}_i=\mathbf{0}\), and \(\mathbf{v}_i\) is kept as a right singular vector while the left basis is completed separately.

Worked Example: A Tall Rank-Deficient Matrix

Find a full SVD of \(\mathbf{A}=\begin{bmatrix}1&1\\0&0\\0&0\end{bmatrix}\). This is a \(3\times2\) matrix, so \(p=2\). Its columns are equal, hence its rank is less than \(2\).

First compute the Gram matrix and its eigenvalues:

$$ \mathbf{A}^{\top}\mathbf{A} = \begin{bmatrix}1&0&0\\1&0&0\end{bmatrix} \begin{bmatrix}1&1\\0&0\\0&0\end{bmatrix} = \begin{bmatrix}1&1\\1&1\end{bmatrix}. $$

The vectors \(\mathbf{v}_1=(1,1)^{\top}/\sqrt{2}\) and \(\mathbf{v}_2=(1,-1)^{\top}/\sqrt{2}\) are orthonormal. Direct multiplication gives \(\mathbf{A}^{\top}\mathbf{A}\mathbf{v}_1=2\mathbf{v}_1\) and \(\mathbf{A}^{\top}\mathbf{A}\mathbf{v}_2=\mathbf{0}\). Thus the singular values are \(\sigma_1=\sqrt{2}\) and \(\sigma_2=0\). For the positive singular value,

$$ \mathbf{A}\mathbf{v}_1 = \begin{bmatrix}\sqrt{2}\\0\\0\end{bmatrix}, \qquad \mathbf{u}_1=\frac{\mathbf{A}\mathbf{v}_1}{\sqrt{2}} = \begin{bmatrix}1\\0\\0\end{bmatrix}. $$

Also \(\mathbf{A}\mathbf{v}_2=\mathbf{0}\), so \(\mathbf{v}_2\) is a null-space direction. Complete the left vector \(\mathbf{u}_1\) to an orthonormal basis of \(\mathbb{R}^3\) by choosing \(\mathbf{u}_2=(0,1,0)^{\top}\) and \(\mathbf{u}_3=(0,0,1)^{\top}\). Then

$$ \mathbf{U}= \begin{bmatrix}1&0&0\\0&1&0\\0&0&1\end{bmatrix}, \quad \boldsymbol{\Sigma}= \begin{bmatrix}\sqrt{2}&0\\0&0\\0&0\end{bmatrix}, \quad \mathbf{V}= \frac{1}{\sqrt{2}} \begin{bmatrix}1&1\\1&-1\end{bmatrix}. $$

Check: \(\mathbf{U}\boldsymbol{\Sigma}\mathbf{V}^{\top} =\begin{bmatrix}1&1\\0&0\\0&0\end{bmatrix}=\mathbf{A}\). In particular, the second diagonal entry of \(\boldsymbol{\Sigma}\) is zero, and the corresponding right vector is sent to zero by \(\mathbf{A}\).

Completing the Bases in a Full SVD

The positive singular values determine matched left and right singular vectors. The zero positions require care: right null-space directions are eigenvectors of \(\mathbf{A}^{\top}\mathbf{A}\), but they do not determine left singular vectors by dividing \(\mathbf{A}\mathbf{v}_i\) by zero. Instead, complete the left vectors already constructed to an orthonormal basis. The finite-dimensional Gram–Schmidt process supplies such completions.

Theorem (Full SVD construction with zero singular values): Let \(\mathbf{A}\in\mathbb{R}^{m\times n}\), and choose an orthonormal eigenbasis \(\mathbf{v}_1,\dots,\mathbf{v}_n\) of \(\mathbf{A}^{\top}\mathbf{A}\), ordered so that its positive eigenvalues \(\lambda_i=\sigma_i^2\) come first. For each positive eigenvalue, define \(\mathbf{u}_i=\mathbf{A}\mathbf{v}_i/\sigma_i\). Complete these \(\mathbf{u}_i\) to an orthonormal basis of \(\mathbb{R}^m\). Pair the vectors in the zero-eigenvalue part of the right basis with the needed zero positions, and place the singular values on the diagonal of an \(m\times n\) matrix \(\boldsymbol{\Sigma}\). The resulting full matrices satisfy \(\mathbf{A}=\mathbf{U}\boldsymbol{\Sigma}\mathbf{V}^{\top}\).

Proof. Let \(r\) be the number of positive eigenvalues of \(\mathbf{A}^{\top}\mathbf{A}\), counting multiplicity. The real Spectral Theorem gives the stated orthonormal eigenbasis. For \(1\le i,j\le r\),

$$ \mathbf{u}_i^{\top}\mathbf{u}_j = \frac{\mathbf{v}_i^{\top}\mathbf{A}^{\top}\mathbf{A}\mathbf{v}_j}{\sigma_i\sigma_j} = \frac{\lambda_j\mathbf{v}_i^{\top}\mathbf{v}_j}{\sigma_i\sigma_j} = \begin{cases} 1,&i=j,\\ 0,&i\ne j. \end{cases} $$

Thus the constructed left vectors are orthonormal. For each \(i>r\), the eigenvalue is zero, so the null-space theorem gives \(\mathbf{A}\mathbf{v}_i=\mathbf{0}\). The left vectors \(\mathbf{u}_1,\dots,\mathbf{u}_r\) can be completed to an orthonormal basis of \(\mathbb{R}^m\). If \(m\ge n\), there are \(n-r\) zero diagonal positions and \(m-r\) vectors in the left completion; pair \(n-r\) of those left vectors with the \(n-r\) zero-eigenvalue right vectors. The remaining \(m-n\) left vectors occupy rows with no diagonal position. If \(m<n\), there are \(m-r\) zero diagonal positions; pair that many vectors from the right zero-eigenvalue list with the \(m-r\) left-completion vectors. The remaining \(n-m\) right vectors occupy columns with no diagonal position.

It remains to verify the factorization. Every \(\mathbf{x}\in\mathbb{R}^n\) has an expansion \(\mathbf{x}=\sum_{i=1}^n c_i\mathbf{v}_i\). Therefore \(\mathbf{A}\mathbf{x}=\sum_{i=1}^r c_i\mathbf{A}\mathbf{v}_i =\sum_{i=1}^r c_i\sigma_i\mathbf{u}_i\), because the terms for \(i>r\) vanish. The product \(\mathbf{U}\boldsymbol{\Sigma}\mathbf{V}^{\top}\mathbf{x}\) has exactly this value: \(\mathbf{V}^{\top}\mathbf{x}\) has entries \(c_i\), and \(\boldsymbol{\Sigma}\) retains the first \(r\) entries scaled by \(\sigma_i\), with all zero positions contributing zero. The two matrices act identically on every \(\mathbf{x}\), so they are equal. If \(r=0\), all eigenvalues are zero, every \(\mathbf{A}\mathbf{v}_i=\mathbf{0}\), and the same argument gives \(\mathbf{A}=\mathbf{O}\). \(\square\)

A Wide Matrix and the Extra Zero Eigenvalue

Worked Example: A Wide Matrix with Two Null Directions

Find the singular values and a full SVD of \(\mathbf{B}=\begin{bmatrix}1&0&1\\0&0&0\end{bmatrix}\). Here \(m=2\), \(n=3\), and \(p=2\). Its Gram matrix is

$$ \mathbf{B}^{\top}\mathbf{B} = \begin{bmatrix}1&0\\0&0\\1&0\end{bmatrix} \begin{bmatrix}1&0&1\\0&0&0\end{bmatrix} = \begin{bmatrix}1&0&1\\0&0&0\\1&0&1\end{bmatrix}. $$

An orthonormal eigenbasis is \(\mathbf{v}_1=(1,0,1)^{\top}/\sqrt{2}\), \(\mathbf{v}_2=(0,1,0)^{\top}\), and \(\mathbf{v}_3=(1,0,-1)^{\top}/\sqrt{2}\), with eigenvalues \(2,0,0\), respectively. Since \(p=2\), the singular values are \(\sqrt{2},0\): they come from the largest two eigenvalues. The third zero eigenvalue is the extra zero forced by \(n-p=1\); it is not a third singular value in this convention. Both \(\mathbf{v}_2\) and \(\mathbf{v}_3\) are null-space directions, as direct multiplication by \(\mathbf{B}\) confirms.

Take \(\mathbf{u}_1=(1,0)^{\top}\) from \(\mathbf{B}\mathbf{v}_1/\sqrt{2}\), and complete it with \(\mathbf{u}_2=(0,1)^{\top}\). Then

$$ \mathbf{U}= \begin{bmatrix}1&0\\0&1\end{bmatrix}, \quad \boldsymbol{\Sigma}= \begin{bmatrix}\sqrt{2}&0&0\\0&0&0\end{bmatrix}, \quad \mathbf{V}= \begin{bmatrix} 1/\sqrt{2}&0&1/\sqrt{2}\\ 0&1&0\\ 1/\sqrt{2}&0&-1/\sqrt{2} \end{bmatrix}. $$

Check: The first row of \(\boldsymbol{\Sigma}\mathbf{V}^{\top}\) is \(\sqrt{2}\mathbf{v}_1^{\top}=(1,0,1)\), and its second row is zero. Hence \(\mathbf{U}\boldsymbol{\Sigma}\mathbf{V}^{\top}=\begin{bmatrix}1&0&1\\0&0&0\end{bmatrix}=\mathbf{B}\).

A Square Example with Two Positive Singular Values

Worked Example: A Rank-Deficient Square Matrix

Find a full SVD of \(\mathbf{C}=\begin{bmatrix}1&0&1\\0&2&0\\0&0&0\end{bmatrix}\). Its columns are \((1,0,0)^{\top}\), \((0,2,0)^{\top}\), and \((1,0,0)^{\top}\); the first and third columns coincide, so the matrix is rank-deficient.

Taking dot products of the columns gives

$$ \mathbf{C}^{\top}\mathbf{C} = \begin{bmatrix}1&0&1\\0&4&0\\1&0&1\end{bmatrix}. $$

Its orthonormal eigenvectors are \(\mathbf{v}_1=(0,1,0)^{\top}\), \(\mathbf{v}_2=(1,0,1)^{\top}/\sqrt{2}\), and \(\mathbf{v}_3=(1,0,-1)^{\top}/\sqrt{2}\), with eigenvalues \(4,2,0\). Thus the singular values are \(2,\sqrt{2},0\). The positive-eigenvalue vectors give \(\mathbf{u}_1=(0,1,0)^{\top}\) and \(\mathbf{u}_2=(1,0,0)^{\top}\). Complete them with \(\mathbf{u}_3=(0,0,1)^{\top}\). The decomposition is

$$ \mathbf{U}= \begin{bmatrix}0&1&0\\1&0&0\\0&0&1\end{bmatrix}, \quad \boldsymbol{\Sigma}= \begin{bmatrix}2&0&0\\0&\sqrt{2}&0\\0&0&0\end{bmatrix}, \quad \mathbf{V}= \begin{bmatrix} 0&1/\sqrt{2}&1/\sqrt{2}\\ 1&0&0\\ 0&1/\sqrt{2}&-1/\sqrt{2} \end{bmatrix}. $$

Check: The first nonzero diagonal term contributes \(2\mathbf{u}_1\mathbf{v}_1^{\top}\), placing \(2\) in row 2, column 2. The second contributes \(\sqrt{2}\mathbf{u}_2\mathbf{v}_2^{\top}\), which is \(\begin{bmatrix}1&0&1\\0&0&0\\0&0&0\end{bmatrix}\). Their sum is \(\mathbf{C}\), and the zero diagonal term contributes the zero matrix.

Common Mistake: Counting Every Gram Eigenvalue as a Singular Value

For the wide matrix \(\mathbf{B}\) above, a tempting but incorrect statement is: “\(\mathbf{B}^{\top}\mathbf{B}\) has three eigenvalues, so the singular values are \(\sqrt{2},0,0\), and \(\boldsymbol{\Sigma}\) must have three diagonal entries.” This mixes the \(n=3\) eigenvalues of the Gram matrix with the \(p=2\) singular values in the rectangular SVD convention. The full \(\boldsymbol{\Sigma}\) is \(2\times3\), so it has only two diagonal positions. The correction is to list the singular values as \(\sqrt{2},0\), place them in those two positions, and recognize the third Gram eigenvalue as an extra zero associated with the wide shape.

A second pitfall is to try to form a left singular vector for a zero singular value by using \(\mathbf{A}\mathbf{v}/\sigma\). When \(\sigma=0\), this expression is undefined. The correct steps are to keep \(\mathbf{v}\) as a right null-space direction and complete the already constructed left vectors to an orthonormal basis.

Check Your Understanding

For each problem, keep the matrix dimensions visible and verify any proposed factorization by multiplication.

  1. For \(\mathbf{A}=\begin{bmatrix}1&2\\0&0\\0&0\end{bmatrix}\), compute \(\mathbf{A}^{\top}\mathbf{A}\), its eigenvalues, and the singular values.
  2. For a \(2\times4\) matrix, how many singular values are listed under the convention in this tutorial? How many diagonal positions can \(\boldsymbol{\Sigma}\) have?
  3. Explain why \(\mathbf{A}^{\top}\mathbf{A}\mathbf{v}=\mathbf{0}\) implies \(\mathbf{A}\mathbf{v}=\mathbf{0}\), for a real matrix \(\mathbf{A}\).
  4. For \(\mathbf{B}=\begin{bmatrix}1&0&1\\0&0&0\end{bmatrix}\), verify directly that \((0,1,0)^{\top}\) and \((1,0,-1)^{\top}/\sqrt{2}\) are null-space directions.
  5. Why can a left singular vector not be obtained by dividing \(\mathbf{A}\mathbf{v}\) by a zero singular value? What should be done instead?

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon