No history yet

SVD Foundations

The Geometry of Transformation

Every matrix represents a linear transformation. When a matrix acts on a vector, it transforms it into another vector. But what's really happening during this transformation? It turns out any linear map, no matter how complex it seems, can be broken down into three fundamental geometric steps: a rotation, a scaling, and another rotation.

Imagine a set of perpendicular vectors, like the standard axes in a coordinate system. A matrix transformation first rotates this set of axes. Then, it stretches or shrinks the space along these new, rotated axes. Finally, it performs one last rotation to get to the final orientation. This three-step process is the essence of Singular Value Decomposition (SVD).

This geometric insight is what makes SVD so powerful. It lets us express any matrix AA as the product of three other matrices, each corresponding to one of these fundamental actions.

A=UĪ£VTA = U \Sigma V^T

Remember, orthogonal matrices represent rotations (and reflections). Their columns are perpendicular unit vectors, which is why they preserve lengths and angles when they transform space.

Connecting to Eigenvalues

So, how do we find these rotation and scaling matrices? The answer lies in a clever connection to eigenvalue decomposition. While SVD works for any matrix, eigenvalue decomposition is more restrictive; it only works for certain square matrices. SVD cleverly gets around this by focusing on two related, and always square, matrices: ATAA^T A and AATA A^T.

These matrices are special. They are symmetric and positive semi-definite, which guarantees their eigenvalues are real and non-negative, and their eigenvectors are orthogonal. This is exactly what we need.

Eigenvalues and eigenvectors are essential concepts in linear algebra that have wide-ranging applications in data science.

Let's see how they connect to our SVD equation, A=UĪ£VTA = U \Sigma V^T. We can start by multiplying both sides by ATA^T.

ATA=(UĪ£VT)T(UĪ£VT)=(VĪ£TUT)(UĪ£VT)=VĪ£T(UTU)Ī£VT\begin{aligned} A^T A &= (U \Sigma V^T)^T (U \Sigma V^T) \\ &= (V \Sigma^T U^T) (U \Sigma V^T) \\ &= V \Sigma^T (U^T U) \Sigma V^T \end{aligned}

Because UU is an orthogonal matrix, UTUU^T U is the identity matrix, II. So the expression simplifies nicely.

ATA=VĪ£TIĪ£VT=V(Ī£TĪ£)VT\begin{aligned} A^T A &= V \Sigma^T I \Sigma V^T \\ &= V (\Sigma^T \Sigma) V^T \end{aligned}

This last equation, ATA=V(Ī£TĪ£)VTA^T A = V (\Sigma^T \Sigma) V^T, is exactly the eigenvalue decomposition of the matrix ATAA^T A. This tells us two critical things:

  1. The columns of VV are the eigenvectors of ATAA^T A.
  2. The diagonal entries of ΣTΣ\Sigma^T \Sigma are the eigenvalues of ATAA^T A. The singular values in Σ\Sigma are therefore the square roots of these eigenvalues.

A similar process for AATA A^T shows that the columns of UU are the eigenvectors of AATA A^T.

Existence and Uniqueness

This derivation also proves that an SVD exists for any rectangular matrix AA. Because ATAA^T A is always a square, symmetric matrix, it is guaranteed to have an eigenvalue decomposition. From that decomposition, we can always construct the matrices VV and Σ\Sigma. Once we have those, we can solve for UU from the original equation A=UΣVTA = U \Sigma V^T.

But is the decomposition unique? Mostly, but not entirely.

The singular values (the diagonal entries of Σ\Sigma) are always unique. By convention, they are ordered from largest to smallest.

However, the matrices UU and VV are not always unique. If a matrix has repeated singular values, the corresponding eigenvectors (the columns of UU and VV) span a subspace, and any set of orthonormal vectors that also spans that subspace will work. Think of it like a circle: you can pick any two perpendicular axes through its center, and they are equally valid. A similar ambiguity arises if any singular values are zero.

Quiz Questions 1/5

According to the geometric interpretation of Singular Value Decomposition (SVD), any linear map can be broken down into which three fundamental steps?

Quiz Questions 2/5

In the SVD of a matrix AA, given by A=UΣVTA = U \Sigma V^T, how are the singular values in the diagonal matrix Σ\Sigma related to the matrix ATAA^T A?

Understanding these foundations allows us to see SVD not just as a computational tool, but as a fundamental statement about the nature of linear transformations.