Skip to main content

Someone wanted to learn this too, so Grasp built them a personal learning path.

You can keep exploring this one or create your own

SVD from Eigendecomposition of AᵀA

Introduction

In our previous lesson, we developed a powerful geometric intuition for the Singular Value Decomposition (SVD). We saw that any linear transformation represented by a matrix can be universally decomposed into a sequence of three fundamental operations: a rotation (), a scaling (), and a final rotation (). This gives us the elegant equation .

While this geometric picture is fundamental, it doesn't yet tell us how to find the matrices , , and for a given matrix . Today, we will bridge that gap. We will derive the complete algebraic procedure for computing the SVD, starting from first principles. The key to this derivation is a clever trick: we will construct a special symmetric matrix from , allowing us to leverage the power of eigendecomposition, which we've already studied.

The Key: Constructing a Symmetric Matrix

As we know, eigendecomposition is most powerful when applied to symmetric matrices, which are guaranteed to have real eigenvalues and a full set of orthogonal eigenvectors (the Spectral Theorem). Our matrix , however, may be non-symmetric or even rectangular.

This brings us to a crucial question. Given a general matrix , how can you combine it with its transpose, , to construct a new matrix that is guaranteed to be both square and symmetric?

Answer There are two ways: you can compute $A^TA$ (which will be an $n \times n$ matrix) or $AA^T$ (which will be an $m \times m$ matrix). Both are square and symmetric. You can verify this for $A^TA$ by taking its transpose: $(A^TA)^T = A^T(A^T)^T = A^TA$.

This simple construction is the key that unlocks the SVD. Let's focus on the matrix . This matrix is not just symmetric; it also has another special property: it is positive semi-definite. This means all of its eigenvalues are non-negative (). This is a critical property, as we will soon need to take the square root of these eigenvalues.

To see why this is true, let's watch a short, rigorous proof.

Linear Algebra: Singular Value Decomposition (Full lecture)

This video from Dr. Valerie Hower provides a clear, step-by-step lecture on SVD. We will focus on the section where she proves this essential property of the matrix A^TA.

Please watch the segment from this proof. The core idea is to show that for any eigenvector \vec{v} of A^TA, the quantity \lambda ||\vec{v}||^2 is equal to ||A\vec{v}||^2. Since squared norms are always non-negative, \lambda must be as well.

Deriving the Connection to Eigendecomposition

Now that we have a symmetric, positive semi-definite matrix , we can explore its relationship to the SVD formula, . Let's substitute this formula into the expression for :

Using the property that , we get:

Since the left singular vectors in form an orthonormal basis, the matrix is orthogonal, which means . The expression simplifies beautifully:

Now, take a close look at this final equation. It has the form Matrix = P * D * P⁻¹ (or P * D * Pᵀ since V is orthogonal).

Question: What does this equation represent? What does it tell us about the matrices and in relation to the matrix ?

Answer This is precisely the **eigendecomposition of the symmetric matrix $A^TA$**.

This implies two profound connections:

  1. The columns of the matrix are the orthonormal eigenvectors of .
  2. The matrix is a diagonal matrix containing the eigenvalues of .

From this, we can deduce the recipe for finding the components of the SVD. The matrix is an matrix that is zero everywhere except for its main diagonal. The product is an diagonal matrix whose diagonal entries are .

Therefore, the eigenvalues of are the squares of the singular values of .

This means the singular values of are the square roots of the eigenvalues of : . This is why the positive semi-definite property we proved earlier is so important!

The Algorithm for Computing SVD

We have now established all the necessary connections to outline a concrete algorithm for finding the SVD of any matrix . The following resource provides a crisp summary of the steps.

Singular Value Decomposition (SVD) Explained

This article from TensorTonic presents a clear and concise derivation of the SVD components.

Please read the section titled Derivation. It formalizes the steps we've just discussed into a three-step process for defining V, \Sigma, and U.

Let's consolidate that information.

Step 1: Find and .

  1. Construct the symmetric matrix .
  2. Compute the eigendecomposition of to find its eigenvalues and corresponding orthonormal eigenvectors .
  3. The right singular vectors are the eigenvectors of . Construct the matrix by placing these eigenvectors as its columns: .
  4. The singular values are the square roots of the eigenvalues: . By convention, we sort these in descending order, .
  5. Construct the matrix by placing these singular values on its main diagonal.

Step 2: Find .

  1. Recall the fundamental relationship from our last lesson: .
  2. For all non-zero singular values (), we can find the corresponding left singular vectors by rearranging this equation:
  3. These vectors form the first columns of , where is the rank of the matrix .
  4. If is not full rank or is rectangular (), we will have found fewer than columns for . The remaining columns must be vectors that are orthonormal to the ones we've already found. These vectors form an orthonormal basis for the null space of , also known as the left null space of . We can find them using a method like the Gram-Schmidt process.

The following flowchart provides a great visual summary of how the SVD calculation relates to the eigendecomposition of .

A flowchart comparing the SVD computation path (right, in blue) with the path for Principal Component Analysis (left, in purple). For SVD, we see the direct decomposition of X into UΣVᵀ. The connection is made explicit: V is derived from the eigendecomposition of XᵀX.

A Worked Example

Let's solidify this procedure by walking through a complete example. Decomposing a non-square matrix is particularly illustrative, as it forces us to handle the dimensions of carefully and to consider the case where we must complete the basis for .

Linear Algebra: Singular Value Decomposition (Full lecture)

Let's return to Dr. Hower's lecture for a comprehensive worked example.

Please watch the segment from this non-square example. Follow the steps carefully: She starts with a 3x2 matrix A and calculates AᵀA. She finds the eigenvalues and eigenvectors of AᵀA to get \Sigma and V. Note how the 3x2 shape of \Sigma is constructed. She uses the relation \vec{u}_i = \frac{1}{\sigma_i} A\vec{v}_i to find the first two columns of U. Since U must be 3x3, she shows how to find the third orthonormal vector, \vec{u}_3, by finding a vector in the orthogonal complement of the span of \vec{u}_1 and \vec{u}_2. This is an excellent demonstration of completing the basis.

The example highlights that the derivation is not just a theoretical curiosity; it is the blueprint for a practical algorithm to compute the Singular Value Decomposition of any matrix.

Conclusion

In this lesson, we transitioned from the geometric what of SVD to the algebraic how. We established a rigorous procedure to compute the , , and matrices for any given matrix .

Key Takeaways:

  • Symmetric Matrix Construction: The key to deriving SVD is to form the symmetric, positive semi-definite matrix .
  • Connection to Eigendecomposition: The eigendecomposition of directly reveals two of the SVD components. The equation shows that:
    • The columns of are the eigenvectors of .
    • The singular values in are the square roots of the eigenvalues of .
  • Completing the Decomposition: The left singular vectors in are found using the fundamental relationship . If necessary, the basis for is completed by finding an orthonormal basis for the left null space of .

We now have both a deep geometric intuition and a concrete computational algorithm for SVD. With this foundation, we are ready to explore its applications. In the next lesson, we will examine one of the most important uses of SVD: low-rank approximation. This powerful technique allows us to find the best possible simplified version of a matrix, forming the mathematical core of methods like Principal Component Analysis (PCA), data compression, and modern techniques for learning compressed representations in neural networks.

Can't find a good explanation? Sign up and we'll make it for you

Sign up