Skip to content

SVD

Let's walk through an example of Singular Value Decomposition (SVD).

Example: SVD of a 2x2 Matrix#

Consider the matrix:

A=(3423)

We will decompose this matrix using SVD.

Step 1: Compute the SVD of A#

We want to find matrices U, Σ, and VT such that:

A=UΣVT

Where:
- U is an orthogonal matrix containing the left singular vectors of A,
- Σ is a diagonal matrix containing the singular values of A,
- V is an orthogonal matrix containing the right singular vectors of A.

Step 2: Find ATA and AAT#

To compute the SVD, we first calculate ATA and AAT, as the eigenvalues of these matrices will give us the singular values.

  1. ATA:
AT=(3243)

Now, compute ATA:

ATA=(3243)(3423)=(9+412+612+616+9)=(13181825)
  1. AAT:

Now, compute AAT:

AAT=(3423)(3243)=(9+166+126+124+9)=(25181813)

Step 3: Compute the Eigenvalues and Eigenvectors#

Now, we find the eigenvalues and eigenvectors of ATA and AAT, as they will give us the singular values and the corresponding singular vectors.

  1. Eigenvalues of ATA:
    The eigenvalues of ATA are the singular values squared. We solve the characteristic equation det(ATAλI)=0:
|13λ181825λ|=0

Solving this determinant gives the eigenvalues λ1=36 and λ2=2.

The singular values are the square roots of the eigenvalues of ATA, so:

σ1=36=6,σ2=21.414

Step 4: Find the Singular Vectors#

To find the singular vectors, we solve for the eigenvectors corresponding to the eigenvalues of ATA.

  1. Right singular vectors (columns of V):
  2. For λ1=36, the eigenvector can be calculated as (34).
  3. For λ2=2, the eigenvector is (43).

After normalization, these eigenvectors are:

v1=125(34)=(0.60.8),v2=125(43)=(0.80.6)

So, the matrix V is:

V=(0.60.80.80.6)
  1. Left singular vectors (columns of U):
  2. The left singular vectors can be computed by finding the eigenvectors of AAT. After similar calculations, we find the left singular vectors:
u1=125(34)=(0.60.8),u2=125(43)=(0.80.6)

So, the matrix U is:

U=(0.60.80.80.6)

Step 5: Construct the SVD#

Now, we can construct the Singular Value Decomposition of the matrix A:

A=UΣVT

where:

  • U=(0.60.80.80.6)
  • Σ=(6002)
  • VT=(0.60.80.80.6)

Thus, the SVD of A is:

A=(0.60.80.80.6)(6002)(0.60.80.80.6)

Conclusion#

This decomposition reveals the singular values and vectors that describe how the matrix A acts in terms of scaling and rotation. You can apply the SVD to reconstruct A, approximate A for dimensionality reduction, or use it for solving linear systems, among other applications.