Low-rank approximation of a 4×5 matrix via its SVD
Returning to this example, involving a matrix with row size
and column size
:
![Rendered by QuickLaTeX.com \[ A=\left(\begin{array}{lllll} 1 & 0 & 0 & 0 & 2 \\ 0 & 0 & 3 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \\ 0 & 4 & 0 & 0 & 0 \end{array}\right) . \]](https://pressbooks.pub/app/uploads/quicklatex/quicklatex.com-cb49b252865c3a358742e320f6ac76fc_l3.png)
As seen here, the SVD is given by
, with
![Rendered by QuickLaTeX.com \[ U=\left(\begin{array}{cccc} 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & -1 \\ 1 & 0 & 0 & 0 \end{array}\right), \quad \tilde{S}=\left(\begin{array}{ccccc} 4 & 0 & 0 & 0 & 0 \\ 0 & 3 & 0 & 0 & 0 \\ 0 & 0 & \sqrt{5} & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \end{array}\right), \quad V^T=\left(\begin{array}{ccccc} 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 \\ \sqrt{0.2} & 0 & 0 & 0 & \sqrt{0.8} \\ 0 & 0 & 0 & 1 & 0 \\ -\sqrt{0.8} & 0 & 0 & 0 & \sqrt{0.2} \end{array}\right) . \]](https://pressbooks.pub/app/uploads/quicklatex/quicklatex.com-176ce8c95333fd4110bed621a6845088_l3.png)
The matrix is rank
. A rank-two approximation is given by zeroing out the smallest singular value, which produces
![Rendered by QuickLaTeX.com \[ \begin{aligned} \hat{A}_2 & =\left(\begin{array}{cccc} 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & -1 \\ 1 & 0 & 0 & 0 \end{array}\right)\left(\begin{array}{ccccc} 4 & 0 & 0 & 0 & 0 \\ 0 & 3 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \end{array}\right)\left(\begin{array}{ccccc} 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 \\ \sqrt{0.2} & 0 & 0 & 0 & \sqrt{0.8} \\ 0 & 0 & 0 & 1 & 0 \\ -\sqrt{0.8} & 0 & 0 & 0 & \sqrt{0.2} \end{array}\right) \\ & =\left(\begin{array}{ll} 0 & 0 \\ 0 & 1 \\ 0 & 0 \\ 1 & 0 \end{array}\right)\left(\begin{array}{ll} 4 & 0 \\ 0 & 3 \end{array}\right)\left(\begin{array}{lllll} 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 \end{array}\right) \\ & =\left(\begin{array}{lllll} 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 3 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \\ 0 & 4 & 0 & 0 & 0 \end{array}\right) . \end{aligned} \]](https://pressbooks.pub/app/uploads/quicklatex/quicklatex.com-a0718cb7b949b9f731651b1a20bc8bd8_l3.png)
We check that the Frobenius norm of the error
is the sum of singular values we have zeroed out, which here reduces to
:
![Rendered by QuickLaTeX.com \[ E:=A-\hat{A}_2=\left(\begin{array}{lllll} 1 & 0 & 0 & 0 & 2 \\ 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \end{array}\right), \quad \|E\|_F^2=1^2+2^2=5 . \]](https://pressbooks.pub/app/uploads/quicklatex/quicklatex.com-4d8d2d68959865f15153d29f19220bab_l3.png)