Find a singular value decomposition of the matrix

3.9k Views Asked by At

Fina a singular value decomposition for $$A=\begin{bmatrix} -2 & 2 \\ -1 & 1 \\ 2 & -2\end{bmatrix}.$$ Find a (full svd)singular value decomposition for the matrix $A$.

My working thus far not sure how to determine u2 and u3 . A little confused on the whole process. ANy workings step by step that can assit would be appreciated. $$A^TA=\begin{pmatrix} 9 & -9 \\ -9 & 9 \end{pmatrix}$$
For the eigenvalue $\lambda=18$ I found a normalized eigenvector of $\frac{1}{\sqrt 2}\begin{pmatrix} -1 \\ 1 \end{pmatrix}$. For $\lambda=0$ I found an eigenvector of $\frac{1}{\sqrt 2}\begin{pmatrix} 1 \\ 1 \end{pmatrix}$ and so $$V=\frac{1}{\sqrt{2}}\begin{pmatrix} -1 & 1 \\ 1 & 1 \end{pmatrix}.$$ $\Sigma$ is the $3\times 2$ matrix whose diagonal is composed of the singular values $$\Sigma=\begin{pmatrix} \sqrt{18} & 0 \\ 0 & 0 \\ 0&0 \end{pmatrix}.$$ $$U1=\begin{pmatrix}\frac{2}{3} \frac{1}{3} \frac{-2}{3}\end{pmatrix}.$$

2

There are 2 best solutions below

3
On

Your $A$ is rank $1$, as you can see by inspection. Thus the shape of $U,\Sigma,V^T$ in the reduced SVD are $3 \times 1,1 \times 1$ and $1 \times 2$ respectively. So you were actually done before computing the eigenvector with eigenvalue $0$.

If you want a full SVD, then you need shapes of $3 \times 3,3 \times 2$ and $2 \times 2$. To assemble this, you need to compute a unit eigenvector of $A$ with eigenvalue zero (which will be any unit vector orthogonal to $v_1$). This will be your $v_2$, which completes the set of right singular vectors. Then you need to get vectors $u_2,u_3$ that $\{ u_1,u_2,u_3 \}$ is an orthonormal system; this completes the set of left singular vectors.

2
On

If $A$ is a matrix and $A \in \mathbb{R}^{ m \times n}$ then it has an SVD. i.e

$$A_{m \times n} = U_{m \times m} \Sigma_{m \times n} V_{n \times n}^{T} \tag{1}$$

now if the rank of $A$ is $r$ then the reduced or truncated SVD is given by an SVD like the following

$$ A_{m \times n} = U_{m \times r} \Sigma_{r \times r} V_{r \times n}^{T} \tag{2} $$

that means your reduced SVD is

$$ A_{m \times n} = \begin{bmatrix} \frac{2}{3} \\ \frac{1}{3} \\ \frac{-2}{3} \end{bmatrix} \begin{bmatrix} \sqrt{18} \end{bmatrix} \begin{bmatrix} \frac{-1}{\sqrt{2}} & \frac{1}{\sqrt{2}}\end{bmatrix} \tag{3}$$

checking this in Python

import numpy as np

A1 = np.matrix([[-2, 2], [-1, 1], [2,-2]])



a1 = np.matrix([[2/3] , [1/3] ,[-2/3] ])
a2 = np.matrix([np.sqrt(18)])
a3 = np.matrix([-1/np.sqrt(2),1/np.sqrt(2)])

A2 = a1*a2*a3

error = np.linalg.norm(A1-A2)
error
Out[13]: 9.42055475210265e-16