[Math] Find a singular value decomposition of the matrix

linear algebrasingular values

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}.$$

Best Answer

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