Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 6

Components of SVD: A = UΣVᵀ

Recommended resources

Welcome back. In our last lesson, we explored the geometric meaning of eigenvalues and eigenvectors, discovering that for any square matrix, they represent the special directions that are only scaled—not rotated—by the transformation. This is a powerful concept, but it's limited to square matrices.

Today, we will generalize this idea to any matrix, regardless of its shape, by exploring one of the most fundamental theorems in linear algebra: the Singular Value Decomposition, or SVD. Your interviewers will almost certainly ask about this, and your goal is to explain its components with clarity and confidence. This lesson will equip you to break down the famous equation piece by piece, describing what each matrix is and what it does.

From Eigen-Decomposition to a Universal Tool

While eigendecomposition is about finding a basis of eigenvectors for a square matrix, SVD finds special orthonormal bases for a matrix's domain (input space) and codomain (output space). The core idea, which is beautifully intuitive, is that any linear transformation can be decomposed into three fundamental operations:

  1. A rotation (or reflection).
  2. A scaling along perpendicular axes.
  3. Another rotation (or reflection).

SVD provides the precise mathematical formulation for this process.


The Geometric Essence of SVD

Before we dive into the matrix components, let's build a strong mental model of what SVD accomplishes. A fantastic article, "Singular Value Decomposition as Simply as Possible," provides the perfect non-jargon intuition.

Singular Value Decomposition as Simply as Possible

This first part of the article introduces the geometric essence of SVD without heavy math.

Please read the first section, "SVD without jargon." Focus on the core idea presented in Figure 4: any linear transformation (even a shear) can be viewed as a simple stretch/compression if you're allowed to rotate the input space first and the output space afterward. The visualization of transforming a circle into an ellipse is especially important—the axes of the final ellipse are key to understanding SVD.

As you've just read, the magic of SVD is that it finds a special set of perpendicular vectors in the input space that map to a new set of perpendicular vectors in the output space. The transformation along these special directions is purely a scaling action. SVD tells us exactly which rotations to perform and what the scaling factors are.


The Three Components:

Now, let's formally define the three matrices that make this happen. A great video by Steve Brunton on "Singular Value Decomposition (SVD): Mathematical Overview" breaks this down very clearly. We will watch a few key segments.

Singular Value Decomposition (SVD): Mathematical Overview

This video provides a clear and practical overview of the SVD components and their properties.

First, watch the segment where the SVD equation is introduced and the components are laid out. Pay attention to the names given to each matrix. Watch from this introduction. Next, watch the segment that details the crucial properties of each matrix. This is the core of what you need to explain. Watch from this explanation of the properties.

Let's consolidate what you just saw and add some detail for your interview explanation. The SVD of an matrix is given by:

Where:

  • V (and ): The Right Singular Vectors

    • is an orthogonal matrix. Its columns, , are called the right singular vectors.
    • Being orthogonal means the columns are mutually perpendicular and have a length of 1. They form an orthonormal basis for the input space (the domain of ).
    • In the decomposition, we use its transpose, . Reading the equation from right to left, is the first rotation. It rotates the input vector space such that the new basis vectors align perfectly with the directions that will only stretch or compress.
    • For a deeper connection (which you can mention if the interviewer probes), the columns of are the eigenvectors of the matrix .
  • (Sigma): The Singular Values

    • is an rectangular diagonal matrix. This means all its entries are zero except for the diagonal elements, .
    • These diagonal entries are the singular values of . They are always non-negative and are, by convention, listed in descending order: .
    • This is the scaling step. The singular values are the stretching or compressing factors along the new axes defined by . The largest singular value, , corresponds to the direction of maximum stretch.
    • The number of non-zero singular values is equal to the rank of the matrix .
  • U: The Left Singular Vectors

    • is an orthogonal matrix. Its columns, , are called the left singular vectors.
    • Just like , its columns form an orthonormal basis, but this time for the output space (the codomain of ).
    • This is the second and final rotation. It takes the scaled vectors from the operation and rotates them into their final position in the output space.
    • Similarly, the columns of are the eigenvectors of the matrix .

This decomposition is visualized nicely in the diagram below. An matrix is broken into an orthogonal matrix , an diagonal matrix , and the transpose of an orthogonal matrix .

The singular value decomposition: A fundamental ...

A diagram from the SAS blog showing the decomposition of matrix A into the three component matrices U, Σ, and Vᵀ, representing a rotation, a scaling, and another rotation.

The image below illustrates the same decomposition for a simple 2x2 case and also shows how the original matrix A can be reconstructed as a sum of "outer products" of the singular vectors, weighted by the singular values. This is what we will explore in the next lesson on dimensionality reduction.

A visual breakdown of a 2x2 matrix A into its SVD components U, Σ, and Vᵀ. The second line shows that A can be seen as a weighted sum of simpler matrices formed by its singular vectors.

Crafting Your Interview Answer

Now, let's put this all together into a clear, concise explanation you can deliver in your interview.

Question: "Can you explain Singular Value Decomposition (SVD)?"

Your Answer Framework:

  1. High-Level Definition: "Singular Value Decomposition, or SVD, is a fundamental matrix decomposition that expresses any matrix as a product of three other matrices: . Conceptually, it states that any linear transformation can be broken down into a rotation, a scaling, and another rotation."

  2. Explain Each Component:

    • " is the first rotation. The columns of are the 'right singular vectors' and form an orthonormal basis for the input space. rotates the input so its principal directions align with the coordinate axes."
    • " (Sigma) is a diagonal matrix that performs the scaling. Its diagonal entries are the 'singular values,' which are positive and ordered from largest to smallest. They represent the amount of stretch or compression along each of the new axes. The magnitude of the singular values tells you how important each dimension is for the transformation."
    • " is the final rotation. Its columns are the 'left singular vectors' and form an orthonormal basis for the output space. It takes the scaled vectors and rotates them to their final orientation."
  3. Summary: "So, in essence, SVD finds the optimal rotational bases for the input and output spaces, making the transformation between them a simple scaling operation. The components are U, a rotation matrix for the output space; Sigma, a scaling matrix; and V-transpose, a rotation matrix for theinput space."


Conclusion

In this lesson, you've dissected the Singular Value Decomposition and can now describe its three core components—, , and . You understand that they represent a sequence of rotation, scaling, and rotation, and you can define the properties of each matrix.

Key Takeaways:

  • SVD decomposes any matrix into .
  • It breaks any linear transformation into a rotation (), followed by scaling (), followed by another rotation ().
  • and are orthogonal matrices whose columns are the left and right singular vectors, respectively. They define the optimal bases for the output and input spaces.
  • is a diagonal matrix containing the singular values (), which are ordered by magnitude and represent the scaling factors.

This understanding is crucial because the ordered nature of the singular values is the key to one of SVD's most powerful applications. In our next lesson, we will build on this to explain exactly how SVD is used for dimensionality reduction, a cornerstone technique in modern AI and data science.