You are about to erase your work on this activity. Are you sure you want to do this?
Updated Version Available
There is an updated version of this activity. If you update to the most recent version of this activity, then your current progress on this activity will be erased. Regardless, your record of completion will remain. How would you like to proceed?
Mathematical Expression Editor
SVD Decomposition
We begin this section with an important definition.
Let \(A\) be an \(m\times n\) matrix. The singular values of \(A\) are the square roots of the positive
eigenvalues of \(A^TA.\)
Singular Value Decomposition (SVD) can be thought of as a generalization of
orthogonal diagonalization of a symmetric matrix to an arbitrary \(m\times n\) matrix. This
decomposition is the focus of this section.
The following is a useful result that will help when computing the SVD of
matrices.
Let \(A\) be an \(m \times n\) matrix. Then \(A^TA\) and \(AA^T\) have the same nonzero eigenvalues.
Suppose \(A\) is an \(m\times n\) matrix, and suppose that \(\lambda \) is a nonzero eigenvalue of \(A^TA\). Then there
exists a nonzero vector \(\vec {x} \in \RR ^n\) such that
Since \(\lambda \neq 0\) and \(\vec {x}\neq 0_n\), \(\lambda \vec {x}\neq 0_n\), and thus by equation (nonzero), \((A^TA)\vec {x}\neq 0_m\); thus \(A^T(A\vec {x})\neq 0_m\), implying that \(A\vec {x}\neq 0_m\).
Therefore \(A\vec {x}\) is an eigenvector of \(AA^T\) corresponding to eigenvalue \(\lambda \). An analogous argument
can be used to show that every nonzero eigenvalue of \(AA^T\) is an eigenvalue of \(A^TA\), thus
completing the proof.
Given an \(m\times n\) matrix \(A\), we will see how to express \(A\) as a product
\[ A=U\Sigma V^T\]
where
\(U\) is an \(m\times m\) orthogonal matrix whose columns are eigenvectors of \(AA^T\).
\(V\) is an \(n\times n\) orthogonal matrix whose columns are eigenvectors of \(A^TA\).
\(\Sigma \) is an \(m\times n\) matrix whose only nonzero values lie on its main diagonal, and are
the singular values of \(A\).
How can we find such a decomposition? We are aiming to decompose \(A\) in the
following form:
and so \(A^TAV=V\left [ \begin{array}{cc} \sigma ^{2} & 0 \\ 0 & 0 \end{array} \right ] .\) Similarly, \(AA^TU=U\left [ \begin{array}{cc} \sigma ^{2} & 0 \\ 0 & 0 \end{array} \right ] .\) Therefore, you would find an orthonormal basis of
eigenvectors for \(AA^T\) make them the columns of a matrix such that the corresponding
eigenvalues are decreasing. This gives \(U.\) You could then do the same for \(A^TA\) to get
\(V\).
We formalize this discussion in the following theorem.
Singular Value Decomposition Let \(A\) be an \(m\times n\) matrix. Then there exist orthogonal
matrices \(U\) and \(V\) of the appropriate size such that \(A= U \Sigma V^T\) where \(\Sigma \) is of the form
for the \(\sigma _{i}\) the singular values of \(A.\)
There exists an orthonormal basis, \(\left \{ \vec {v}_{1}, \dots , \vec {v}_n\right \}\) such that \( A^TA\vec {v}_{i}=\sigma _{i}^{2}\vec {v}_{i}\) where \(\sigma _{i}^{2}>0\) for \(i=1,\dots ,k,\left ( \sigma _{i}>0\right ) \) and equals zero if \(i>k.\) Thus for
\(i>k,\) \(A\vec {v}_{i}=\vec {0}\) because
This means that \(\vec {u}_{i} \dotp \vec {u}_{j}=1\) when \(i=j\) and \(\vec {u}_{i} \dotp \vec {u}_{j}=0\) when \(i\neq j\). Thus \(\left \{ \vec {u}_{1}, \dots , \vec {u}_{k}\right \}\) is an orthonormal set of vectors in \(\RR ^{m}.\) Also,
Now, using Gram-Schmidt, extend \(\left \{ \vec {u}_{1}, \dots , \vec {u}_{k}\right \}\) to an orthonormal basis for all of \(\RR ^{m},\left \{ \vec {u}_{1},\dots ,\vec {u}_{m}\right \}\) and let
while \(V= \left [ \begin{array}{ccc} \vec {v}_{1} & \cdots & \vec {v}_{n}\end{array}\right ] .\)
Thus \(U\) is the matrix which has the \(\vec {u}_{i}\) as columns and \(V\) is defined as the matrix which
has the \(\vec {v}_{i}\) as columns. Then
Since \(AA^T\) is \(2\times 2\) while \(A^T A\) is \(3\times 3\), and \(AA^T\) and \(A^TA\) have the same nonzero eigenvalues (by Lemma lem:samenonzeroeigenvalues), we
compute the characteristic polynomial \(c_{AA^T}(x)\) (because it is easier to compute than \(c_{A^TA}(x)\)).
Therefore, the eigenvalues of \(AA^T\) are \(\lambda _1=16\) and \(\lambda _2=6\).
The eigenvalues of \(A^TA\) are \(\lambda _1=16\), \(\lambda _2=6\), and \(\lambda _3=0\), and the singular values of \(A\) are \(\sigma _1=\sqrt {16}=4\) and \(\sigma _2=\sqrt {6}\). By convention,
we list the eigenvalues (and corresponding singular values) in non increasing order
(i.e., from largest to smallest).
To find the matrix \(V\):
To construct the matrix \(V\) we need to find eigenvectors for \(A^TA\). Since the eigenvalues of \(AA^T\)
are distinct, the corresponding eigenvectors are orthogonal, and we need only
normalize them.
and we use \(A\), \(V^T\), and \(\Sigma \) to find \(U\). Since \(V\) is orthogonal and \(A=U\Sigma V^T\), it
follows that \(AV=U\Sigma \). Let \(V=\left [\begin{array}{ccc} \vec {v}_1 & \vec {v}_2 & \vec {v}_3 \end{array}\right ]\), and let \(U=\left [\begin{array}{cc} \vec {u}_1 & \vec {u}_2 \end{array}\right ]\), where \(\vec {u}_1\) and \(\vec {u}_2\) are the two columns of \(U\). Then we have
Find an SVD for \(A=\left [\begin{array}{r} -1 \\ 2\\ 2 \end{array}\right ]\).
Since \(A\) is \(3\times 1\), \(A^T A\) is a \(1\times 1\) matrix whose eigenvalues are easier to find than the eigenvalues of
the \(3\times 3\) matrix \(AA^T\).
Thus \(A^TA\) has eigenvalue \(\lambda _1=9\), and the eigenvalues of \(AA^T\) are \(\lambda _1=9\), \(\lambda _2=0\), and \(\lambda _3=0\). Furthermore, \(A\) has only
one singular value, \(\sigma _1=3\).
To find the matrix \(V\): To do so we find an eigenvector for \(A^TA\) and normalize it. In this
case, finding a unit eigenvector is trivial: \(\vec {v}_1=\left [\begin{array}{r} 1 \end{array}\right ]\), and
Also, \(\Sigma =\left [\begin{array}{r} 3 \\ 0\\ 0 \end{array}\right ]\), and we use \(A\), \(V^T\), and \(\Sigma \) to find
\(U\).
Now \(AV=U\Sigma \), with \(V=\left [\begin{array}{r}\vec {v}_1 \end{array}\right ]\), and \(U=\left [\begin{array}{rrr} \vec {u}_1 & \vec {u}_2 & \vec {u}_3 \end{array}\right ]\), where \(\vec {u}_1\), \(\vec {u}_2\), and \(\vec {u}_3\) are the columns of \(U\). Thus
The vectors \(\vec {u}_2\) and \(\vec {u}_3\) are eigenvectors of \(AA^T\) corresponding to the eigenvalue \(\lambda _2=\lambda _3=0\).
Instead of solving the system \((0I-AA^T)\vec {x}= 0\) and then using the Gram-Schmidt process on
the resulting set of two basic eigenvectors, the following approach may be
used.
Find vectors \(\vec {u}_2\) and \(\vec {u}_3\) by first extending \(\{ \vec {u}_1\}\) to a basis of \(\RR ^3\), then using the Gram-Schmidt
algorithm to orthogonalize the basis, and finally normalizing the vectors.
Starting with \(\{ 3\vec {u}_1 \}\) instead of \(\{ \vec {u}_1 \}\) makes the arithmetic a bit easier. It is easy to verify
that
What are some eigenvalues and eigenvectors? Some computing shows
that the eigenvalues are \(0\) and \(16\). Furthermore, we can find a basis for each
eigenspace.
This illustrates that if you have a good way to find the eigenvectors and eigenvalues
for a Hermitian matrix which has nonnegative eigenvalues, then you also have a good
way to find the SVD of an arbitrary matrix.
Practice Problems
If \(A\) is a square matrix, show that \(|\text {det}(A)|\) is the product of the singular values of \(A\).