Tutorials › Linear Algebra › Diagnosing And Verifying A Proposed SVD

Singular Value Decomposition · Tutorial 800 of 1000

Diagnosing And Verifying A Proposed SVD

Use dimensions, orthonormality, ordered nonnegative singular values and direct multiplication to decide whether proposed factors really form an SVD.

Advanced 10 min read

What You'll Learn

  • Identify the compatible dimensions of full and thin SVD factors.
  • Test orthonormal columns using a Gram matrix.
  • Check that singular values are nonnegative and listed in nonincreasing order.
  • Verify a proposed factorization by multiplying the factors in the correct order.
  • Diagnose failures involving orthogonality, ordering and reconstruction.

A Verification Checklist

A proposed singular value decomposition can look plausible and still fail in several different ways. The dimensions might not allow the multiplication, a column might not have unit length, or the diagonal entries might be out of order. Even if all those checks pass, the product may not reconstruct the matrix in question. A reliable diagnosis separates these conditions rather than treating “the factors look right” as a single test.

Work over \(\mathbb{R}\) or \(\mathbb{C}\). For a complex matrix, use the conjugate transpose \(\mathbf{A}^{*}\); for a real matrix, this is the transpose \(\mathbf{A}^{\top}\). A square matrix \(\mathbf{U}\) is unitary if \(\mathbf{U}^{*}\mathbf{U}=\mathbf{U}\mathbf{U}^{*}=\mathbf{I}\). A real unitary matrix is called orthogonal. A list of columns is orthonormal when every column has norm \(1\) and distinct columns are orthogonal.

Definition: A full singular value decomposition of \(\mathbf{A}\in\mathbb{F}^{m\times n}\) is a factorization \(\mathbf{A}=\mathbf{U}\boldsymbol{\Sigma}\mathbf{V}^{*}\), where \(\mathbf{U}\in\mathbb{F}^{m\times m}\) and \(\mathbf{V}\in\mathbb{F}^{n\times n}\) are unitary, and \(\boldsymbol{\Sigma}\in\mathbb{R}^{m\times n}\) is diagonal in the rectangular sense. Its diagonal entries are \(\sigma_1\ge\cdots\ge\sigma_q\ge0\), where \(q=\min(m,n)\); all other entries are zero.

Here “diagonal in the rectangular sense” means that \(\Sigma_{ij}=0\) whenever \(i\ne j\). The numbers \(\sigma_1,\dots,\sigma_q\) are the singular values, listed in nonincreasing order. Recall that the singular values are the nonnegative square roots of the eigenvalues of \(\mathbf{A}^{*}\mathbf{A}\), with the list padded by zeros when needed. The earlier result that \(\mathbf{A}^{*}\mathbf{A}\) has an orthonormal eigenbasis underlies the existence of an SVD; for verification, the checks below are direct.

For a full SVD, dimensions must be exactly \(m\times m\), \(m\times n\), and \(n\times n\) for \(\mathbf{U}\), \(\boldsymbol{\Sigma}\), and \(\mathbf{V}\). A thin SVD uses fewer columns: with \(q=\min(m,n)\), its factors have sizes \(m\times q\), \(q\times q\), and \(n\times q\). The thin \(\mathbf{U}\) and \(\mathbf{V}\) must have orthonormal columns, and the diagonal of the middle factor must still be nonnegative and nonincreasing. Do not mix the dimensions of one convention with the conditions of another. In either convention, the final test is multiplication: the factors must produce the particular matrix being decomposed.

Why the Checks Identify Singular Data

Theorem (Full SVD verification criterion): Let \(\mathbf{A}\in\mathbb{F}^{m\times n}\), and suppose a proposed factorization has \(\mathbf{U}\in\mathbb{F}^{m\times m}\), \(\boldsymbol{\Sigma}\in\mathbb{R}^{m\times n}\), and \(\mathbf{V}\in\mathbb{F}^{n\times n}\). It is a full SVD of \(\mathbf{A}\) if and only if \(\mathbf{U}\) and \(\mathbf{V}\) are unitary, \(\boldsymbol{\Sigma}\) is rectangular diagonal with nonnegative nonincreasing diagonal entries, and \(\mathbf{U}\boldsymbol{\Sigma}\mathbf{V}^{*}=\mathbf{A}\).

Proof. If the proposed factors form a full SVD, they satisfy these conditions by the definition. Conversely, suppose the stated conditions hold. The matrix product is defined, the unitary factors have orthonormal columns, the middle factor has the required diagonal form and ordered nonnegative entries, and the assumed equality reconstructs \(\mathbf{A}\). These are exactly the defining conditions for a full SVD. To confirm that the listed entries are singular values, put \(q=\min(m,n)\) and let \(d_j=\sigma_j^2\) for \(1\le j\le q\), with \(d_j=0\) for \(q<j\le n\). Then \(\mathbf{A}^{*}\mathbf{A}=\mathbf{V}(\boldsymbol{\Sigma}^{*}\boldsymbol{\Sigma})\mathbf{V}^{*}=\mathbf{V}\operatorname{diag}(d_1,\dots,d_n)\mathbf{V}^{*}\). Thus the columns \(\mathbf{v}_j\) of \(\mathbf{V}\) are eigenvectors of \(\mathbf{A}^{*}\mathbf{A}\) with eigenvalues \(d_j\). Their nonnegative square roots, in order, are the stated \(\sigma_j\), with any additional entries equal to zero. \(\square\)

For a square proposed factor, the column check is usually written as \(\mathbf{U}^{*}\mathbf{U}=\mathbf{I}\). This says precisely that its columns are orthonormal. It also implies unitarity: the columns are linearly independent, so a square matrix with those columns is invertible, and \(\mathbf{U}^{*}\mathbf{U}=\mathbf{I}\) then gives \(\mathbf{U}^{-1}=\mathbf{U}^{*}\), hence \(\mathbf{U}\mathbf{U}^{*}=\mathbf{I}\). The same argument applies to \(\mathbf{V}\). For a thin factor, by contrast, orthonormal columns do not make it square or unitary; the appropriate test is just \(\mathbf{U}^{*}\mathbf{U}=\mathbf{I}_q\), or \(\mathbf{V}^{*}\mathbf{V}=\mathbf{I}_q\).

Proposition (Gram-matrix test): The columns of a matrix \(\mathbf{Q}\) are orthonormal if and only if \(\mathbf{Q}^{*}\mathbf{Q}=\mathbf{I}\) of the appropriate size.

Proof. Write the columns as \(\mathbf{q}_1,\dots,\mathbf{q}_k\). The entry in row \(i\), column \(j\) of \(\mathbf{Q}^{*}\mathbf{Q}\) is \(\mathbf{q}_i^{*}\mathbf{q}_j\). If the columns are orthonormal, this entry is \(1\) when \(i=j\) and \(0\) when \(i\ne j\), so the product is the identity. Conversely, if the product is the identity, its diagonal entries give \(\mathbf{q}_i^{*}\mathbf{q}_i=\|\mathbf{q}_i\|^2=1\), and its off-diagonal entries give \(\mathbf{q}_i^{*}\mathbf{q}_j=0\) for \(i\ne j\). Therefore the columns are orthonormal. \(\square\)

This test reduces many separate dot products to one small matrix multiplication. For real matrices it uses \(\mathbf{Q}^{\top}\mathbf{Q}\); for complex matrices it must use \(\mathbf{Q}^{*}\mathbf{Q}\), not merely the transpose. The reconstruction check is independent: passing the Gram-matrix test does not establish that the proposed factors multiply to \(\mathbf{A}\).

Worked Checks

Worked Example: A Valid Full SVD of a Rectangular Matrix

Verify the proposed full SVD with \(\mathbf{U}=\mathbf{I}_2\), \(\mathbf{V}=\begin{bmatrix}0&1&0\\1&0&0\\0&0&1\end{bmatrix}\), and \(\boldsymbol{\Sigma}=\begin{bmatrix}3&0&0\\0&1&0\end{bmatrix}\), for \(\mathbf{A}=\begin{bmatrix}0&3&0\\1&0&0\end{bmatrix}\).

The dimensions are \(2\times2\), \(2\times3\), and \(3\times3\), so the product has the required size \(2\times3\). The columns of \(\mathbf{U}\) are the standard orthonormal columns. The columns of \(\mathbf{V}\) are \((0,1,0)^{\top}\), \((1,0,0)^{\top}\), and \((0,0,1)^{\top}\); each has norm \(1\), and every pair has dot product \(0\). The diagonal entries of \(\boldsymbol{\Sigma}\) are \(3,1\), followed by the rectangular zero, so the singular-value conditions hold.

Now multiply, keeping the order \(\mathbf{U}\boldsymbol{\Sigma}\mathbf{V}^{*}\). Since \(\mathbf{U}=\mathbf{I}_2\) and \(\mathbf{V}^{*}=\mathbf{V}^{\top}=\mathbf{V}\),

$$ \mathbf{U}\boldsymbol{\Sigma}\mathbf{V}^{*} = \begin{bmatrix}1&0\\0&1\end{bmatrix} \begin{bmatrix}3&0&0\\0&1&0\end{bmatrix} \begin{bmatrix}0&1&0\\1&0&0\\0&0&1\end{bmatrix} = \begin{bmatrix}3&0&0\\0&1&0\end{bmatrix} \begin{bmatrix}0&1&0\\1&0&0\\0&0&1\end{bmatrix} = \begin{bmatrix}0&3&0\\1&0&0\end{bmatrix}. $$

The product equals the proposed \(\mathbf{A}\), so every check passes. As a further check, \(\boldsymbol{\Sigma}^{*}\boldsymbol{\Sigma}=\operatorname{diag}(9,1,0)\); conjugating by \(\mathbf{V}\) puts the eigenvalues of \(\mathbf{A}^{*}\mathbf{A}\) in the order \(9,1,0\), consistent with singular values \(3,1\).

Worked Example: Reconstruction Alone Does Not Make an SVD

Consider the factors \(\mathbf{U}=\begin{bmatrix}1&1\\0&1\end{bmatrix}\), \(\boldsymbol{\Sigma}=\begin{bmatrix}2&0\\0&1\end{bmatrix}\), and \(\mathbf{V}=\mathbf{I}_2\), and let the proposed matrix be \(\mathbf{A}=\begin{bmatrix}2&1\\0&1\end{bmatrix}\).

The dimensions are compatible, and the diagonal entries \(2,1\) are nonnegative and ordered. Multiplication does reconstruct the stated matrix:

$$ \mathbf{U}\boldsymbol{\Sigma}\mathbf{V}^{\top} = \begin{bmatrix}1&1\\0&1\end{bmatrix} \begin{bmatrix}2&0\\0&1\end{bmatrix} \begin{bmatrix}1&0\\0&1\end{bmatrix} = \begin{bmatrix}2&1\\0&1\end{bmatrix} = \mathbf{A}. $$

But the columns of \(\mathbf{U}\) are \((1,0)^{\top}\) and \((1,1)^{\top}\). The first has norm \(1\), while the second has squared norm \(1^2+1^2=2\); their dot product is \(1\). The Gram matrix confirms both failures:

$$ \mathbf{U}^{\top}\mathbf{U} = \begin{bmatrix}1&0\\1&1\end{bmatrix} \begin{bmatrix}1&1\\0&1\end{bmatrix} = \begin{bmatrix}1&1\\1&2\end{bmatrix} \ne \begin{bmatrix}1&0\\0&1\end{bmatrix}. $$

Thus the equality \(\mathbf{A}=\mathbf{U}\boldsymbol{\Sigma}\mathbf{V}^{\top}\) is a factorization, but not an SVD. In fact, the proposed singular values would require \(\mathbf{A}^{\top}\mathbf{A}=\mathbf{V}\boldsymbol{\Sigma}^{\top}\boldsymbol{\Sigma}\mathbf{V}^{\top}=\begin{bmatrix}4&0\\0&1\end{bmatrix}\). Direct multiplication instead gives \(\mathbf{A}^{\top}\mathbf{A}=\begin{bmatrix}4&2\\2&2\end{bmatrix}\), another way to detect the failure.

Worked Example: Correct Factors in the Wrong Order

Let \(\mathbf{A}=\begin{bmatrix}1&0\\0&3\end{bmatrix}\), with proposed factors \(\mathbf{U}=\mathbf{I}_2\), \(\mathbf{V}=\mathbf{I}_2\), and \(\boldsymbol{\Sigma}=\begin{bmatrix}1&0\\0&3\end{bmatrix}\). The dimensions fit, both outer factors have orthonormal columns, and multiplication gives the correct matrix:

$$ \mathbf{U}\boldsymbol{\Sigma}\mathbf{V}^{\top} = \begin{bmatrix}1&0\\0&1\end{bmatrix} \begin{bmatrix}1&0\\0&3\end{bmatrix} \begin{bmatrix}1&0\\0&1\end{bmatrix} = \begin{bmatrix}1&0\\0&3\end{bmatrix} = \mathbf{A}. $$

The diagonal is nonnegative but not nonincreasing, since \(1<3\). Therefore these factors do not meet the ordered SVD convention. To put the values in order, set \(\mathbf{P}=\begin{bmatrix}0&1\\1&0\end{bmatrix}\), \(\mathbf{U}'=\mathbf{P}\), \(\mathbf{V}'=\mathbf{P}\), and \(\boldsymbol{\Sigma}'=\begin{bmatrix}3&0\\0&1\end{bmatrix}\). The columns of \(\mathbf{P}\) are orthonormal, and

$$ \mathbf{U}'\boldsymbol{\Sigma}'(\mathbf{V}')^{\top} = \begin{bmatrix}0&1\\1&0\end{bmatrix} \begin{bmatrix}3&0\\0&1\end{bmatrix} \begin{bmatrix}0&1\\1&0\end{bmatrix} = \begin{bmatrix}0&1\\3&0\end{bmatrix} \begin{bmatrix}0&1\\1&0\end{bmatrix} = \begin{bmatrix}1&0\\0&3\end{bmatrix}. $$

The reordered factors reconstruct \(\mathbf{A}\) and have ordered diagonal entries \(3,1\). When singular values are permuted, the corresponding columns of both outer factors must be permuted as well; changing only the middle factor generally changes the product.

Reconstruction as a Sum of Rank-One Terms

A second way to check the multiplication is to expand it by columns. Write \(\mathbf{u}_j\) and \(\mathbf{v}_j\) for the \(j\)th columns of the full factors. Each term \(\mathbf{u}_j\mathbf{v}_j^{*}\) is an \(m\times n\) matrix, so it has the same dimensions as \(\mathbf{A}\).

Proposition: For a full SVD of an \(m\times n\) matrix, \(\mathbf{A}=\sum_{j=1}^{q}\sigma_j\mathbf{u}_j\mathbf{v}_j^{*}\), where \(q=\min(m,n)\).

Proof. The rectangular diagonal matrix can be written as \(\boldsymbol{\Sigma}=\sum_{j=1}^{q}\sigma_j\mathbf{e}_j\mathbf{e}_j^{\top}\), where the standard basis vectors in each term have the dimensions required by the rectangular product. Multiplying on the left by \(\mathbf{U}\) and on the right by \(\mathbf{V}^{*}\) gives \(\mathbf{U}\boldsymbol{\Sigma}\mathbf{V}^{*}=\sum_{j=1}^{q}\sigma_j(\mathbf{U}\mathbf{e}_j)(\mathbf{V}\mathbf{e}_j)^{*}=\sum_{j=1}^{q}\sigma_j\mathbf{u}_j\mathbf{v}_j^{*}\). Since \(\mathbf{U}\boldsymbol{\Sigma}\mathbf{V}^{*}=\mathbf{A}\), the formula follows. \(\square\)

This identity is useful when an entry-by-entry multiplication is awkward: it checks that each singular-vector pair contributes the right matrix term. It does not replace the other tests. If the columns are not orthonormal, or if the diagonal entries are misordered, a sum that reconstructs \(\mathbf{A}\) still does not satisfy the full SVD conditions.

Common Mistakes and a Reliable Order of Work

Using a transpose for a complex factor. For complex matrices, \(\mathbf{V}^{\top}\) is not generally \(\mathbf{V}^{*}\). For example, with \(\mathbf{v}=(1,i)^{\top}\), we have \(\mathbf{v}^{*}\mathbf{v}=1+(-i)i=2\), whereas \(\mathbf{v}^{\top}\mathbf{v}=1+i^2=0\). The transpose would give the wrong inner-product test. Use conjugate transpose in every complex orthonormality and reconstruction check.

Checking only that the middle factor is diagonal. A diagonal matrix can have a negative diagonal entry or entries in the wrong order. Either violates the SVD convention. Check each diagonal entry and compare successive entries; for a real diagonal \(s_1,\dots,s_q\), require \(s_j\ge0\) and \(s_j\ge s_{j+1}\) for every \(j<q\).

Changing the order of multiplication. Matrix multiplication is not commutative. The SVD reconstruction is \(\mathbf{U}\boldsymbol{\Sigma}\mathbf{V}^{*}\), not \(\mathbf{U}\mathbf{V}^{*}\boldsymbol{\Sigma}\) or \(\boldsymbol{\Sigma}\mathbf{U}\mathbf{V}^{*}\). Check the dimensions of each adjacent product before multiplying; then calculate in the stated order and compare every entry with \(\mathbf{A}\).

1
Check shapes.
For a full SVD of an \(m\times n\) matrix, confirm the factor sizes are \(m\times m\), \(m\times n\), and \(n\times n\).
2
Check the outer factors.
Compute \(\mathbf{U}^{*}\mathbf{U}\) and \(\mathbf{V}^{*}\mathbf{V}\). For square factors, these should be identity matrices.
3
Check the middle factor.
Confirm it is rectangular diagonal and that its diagonal entries are nonnegative and nonincreasing.
4
Reconstruct and compare.
Multiply \(\mathbf{U}\boldsymbol{\Sigma}\mathbf{V}^{*}\) and verify that every entry equals the corresponding entry of \(\mathbf{A}\).

Keeping these tests separate makes the diagnosis precise: report which condition fails, rather than simply declaring that a proposed SVD is incorrect. When every condition passes, the verification criterion establishes that the factors form an SVD and that the diagonal entries are indeed the singular values in the stated order.

Check Your Understanding

For each question, identify the condition being tested before carrying out the calculation.

  1. What sizes must the three factors have in a full SVD of a \(4\times2\) matrix?
  2. For \(\mathbf{Q}=\begin{bmatrix}1&0\\0&1\\0&0\end{bmatrix}\), compute \(\mathbf{Q}^{\top}\mathbf{Q}\). What does the result say about its columns?
  3. Why do diagonal entries \(2,0,1\) fail the SVD ordering condition, even though they are nonnegative?
  4. For a complex matrix, which operation replaces transpose in the SVD reconstruction, and why?
  5. Suppose all factor dimensions, orthonormality checks and singular-value conditions pass. What final computation is still required to verify the proposed SVD of \(\mathbf{A}\)?

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