Skip to main content

Welcome to a Grasp lesson

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

Lesson 36

SVD: Decoding Matrix Transformations

Recommended resources

Hello! Welcome to our third lesson on Singular Value Decomposition.

In our last session, we mastered the practical skill of constructing the full and reduced SVD of a matrix by finding the eigenvalues and eigenvectors of and . We now have the formula and a method to find , , and .

Today, we'll shift our focus from "how" to "what." Our goal is to answer the question: What does the SVD mean? You will learn to interpret the geometric action of a matrix via SVD as a sequence of three fundamental operations: a rotation, a scaling, and another rotation.

This geometric perspective is one of the most powerful insights in linear algebra. It tells us that any linear transformation, no matter how complex it seems, is just a combination of these three simple actions. This concept is fundamental to applications ranging from 3D graphics in computer science to the description of state evolution in quantum mechanics.

1. From Complex Transformations to Simple Steps

Any linear transformation can stretch, shrink, shear, or rotate vectors. This can seem complicated. For instance, a shear transformation deforms a square into a parallelogram, which isn't a simple rotation or scaling.

The central idea of SVD's geometric interpretation is that even a complex transformation like a shear becomes a simple stretch/compression if we're allowed to rotate our object first. The SVD gives us the exact rotations needed to make this simplification work for any matrix.

Let's build this intuition with an excellent, jargon-free article.

Singular Value Decomposition as Simply as Possible

This article by Gregory Gundersen provides a fantastic intuitive explanation for what SVD achieves geometrically, using a simple square as an example.

Please read the sections titled 'SVD without jargon' and the part of 'From intuition to definition' that discusses Figure 5. Pay close attention to Figure 4, which captures the main idea: a complex transformation like a shear can be seen as a simple stretch/compression if you rotate the object first. Then, see how this idea is represented by transforming a circle into an ellipse in Figure 5.

The key takeaway is powerful: Any linear transformation maps a set of orthonormal input vectors (the columns of ) to a set of orthonormal output vectors (the columns of ), scaling them by the singular values (the entries of ). Geometrically, this means it transforms a sphere (or circle) into an ellipsoid (or ellipse).


2. Visualizing the Three-Step Process

Let's analyze the transformation of a vector by a matrix . The SVD expresses this as . Since matrix multiplication is applied from right to left, the process is:

  1. First, apply : This is the first rotation.
  2. Then, apply : This is the scaling.
  3. Finally, apply : This is the second rotation.

The following video by Professor Gilbert Strang provides one of the clearest visual explanations of this process.

6. Singular Value Decomposition (SVD)

Professor Strang will now walk you through how a matrix transforms a unit circle into an ellipse by applying the three SVD steps one by one.

Watch the segment from 28:51 to 32:41. Follow how the initial unit circle is first rotated by Vᵀ, then stretched by Σ into an axis-aligned ellipse, and finally rotated by U into its final position.

This sequence is the heart of the geometric interpretation. Let's capture it with a diagram and formalize the steps.

Geometric Interpretation of Singular Value Decomposition (SVD)
This diagram illustrates the complete geometric action of SVD. 1. An initial rotation by \(V^T\) aligns the input space's principal directions (\(\mathbf{v}_1, \mathbf{v}_2\)) with the coordinate axes. 2. A scaling by \(\Sigma\) transforms the circle into an axis-aligned ellipse, stretching it by \(\sigma_1\) and \(\sigma_2\). 3. A final rotation by \(U\) moves the ellipse to its final orientation, with its axes pointing in the directions of the output space's principal directions (\(\mathbf{u}_1, \mathbf{u}_2\)).

The Breakdown:

  1. Rotation 1 (): is an orthogonal matrix whose columns, , form an orthonormal basis for the input space. These are the "principal input directions." Applying to a vector reorients the space so that these principal directions align with the standard coordinate axes (). The shape (a circle) doesn't change, only its orientation.

  2. Scaling (): is a diagonal matrix. It scales the space along each coordinate axis. The component along the first axis is multiplied by , the second by , and so on. This is where the circle is stretched or squashed into an ellipse, with its axes lying perfectly along the coordinate axes. The lengths of these semi-axes are the singular values .

  3. Rotation 2 (): is another orthogonal matrix. Its columns, , form an orthonormal basis for the output space, representing the "principal output directions." Applying takes the axis-aligned ellipse and rotates it to its final orientation in the output space. The axes of the final ellipse now point along the directions of the vectors.

To solidify this, let's look at one more visual walkthrough, which you might appreciate as it uses plots generated from Python code.

Visual Introduction to Singular Value Decomposition (SVD)

This article provides another excellent visual walkthrough of the SVD process, reinforcing what we saw in the previous video.

Read the section 'Two-Dimensional Example'. Observe how Figures 3, 4, and 5 sequentially show the effects of Vᵀ, Σ, and U on the unit circle. Notice how the final result in Figure 5 matches the direct transformation by A.


3. The Roles of U, Σ, and V

Now we can assign a clear geometric role to each component of the SVD:

  • : The columns of are the principal input directions of . They are an orthonormal basis for the input space with a special property: their images under () are orthogonal. They represent the axes of the initial circle that will become the axes of the final ellipse.

  • : The diagonal entries of () are the scaling factors or principal stretches. is the length of the vector . The largest singular value, , represents the maximum amount of stretching the transformation applies to any vector.

  • : The columns of are the principal output directions of . They are an orthonormal basis for the output space that gives the directions of the axes of the final ellipse. Specifically, is the unit vector in the direction of .

The following short video beautifully visualizes the search for these special input vectors that remain orthogonal after the transformation.

No One Taught SVD (Singular Value Decomposition) Like This

This short video visually demonstrates the search for orthogonal input vectors that remain orthogonal after being transformed by a matrix A. This is precisely what the V and U matrices in SVD provide.

Watch the first part of the video (0:00 - 2:24). Focus on the animation showing that as the input vectors v1 and v2 rotate, the angle between the transformed vectors Y1 and Y2 changes, but there are specific orientations where they are orthogonal.

Test your understanding!

Imagine a 2x2 matrix that transforms a unit circle in into an ellipse. The SVD of is . What is the geometric shape of the output if one of the singular values, say , is 0? What does this tell you about the matrix ?

Show answer

If , the scaling step will squash the shape flat along the second axis. The output will no longer be an ellipse but a line segment. The length of this line segment will be .

This tells us that the matrix is singular (not invertible). It "collapses" the 2D input space into a 1D subspace (a line). The rank of the matrix is 1, which is the number of non-zero singular values.


Conclusion

In this lesson, we've unveiled the profound geometric meaning behind the Singular Value Decomposition. Instead of just a formula, we can now see as a "story" of transformation.

Key Takeaways:

  • Any linear transformation represented by a matrix can be geometrically decomposed into a sequence of rotation (), scaling (), and another rotation ().
  • This process transforms an input sphere/circle into an output ellipsoid/ellipse.
  • The columns of are the principal directions of the input space that remain orthogonal after transformation.
  • The diagonal entries of are the scaling factors along these principal directions.
  • The columns of define the final orientation (the principal axes) of the transformed shape in the output space.

Preview of the Next Lesson:

Now that we understand SVD's construction and its geometric meaning, we are ready to put it to work. In the next lesson, we will see how this powerful decomposition allows us to easily read off fundamental properties of a matrix, such as its rank, kernel (null space), and image (column space), directly from its SVD components.