Problem in calculation of SVD for a matrix

54 Views Asked by At

SVD Decomposition for the matrix: $$A=\begin{bmatrix} 3&-1&1\\3&0&2\\0&2&2\\-1&0&-2\end{bmatrix}$$

We want: $A=U\sum V^T$

We know that : $V=eigenvectors(A^T*A)$

$A^T*A =\begin{bmatrix} 19&-3&11\\-3&5&3\\11&3&13\end{bmatrix}$

then, considering the order: $\lambda_1 = 14+6\sqrt{5} > \lambda_2= 9 > \lambda_3 = 14-6\sqrt{5}$ $$V=\begin{bmatrix} \frac{5}{19}+\frac{9\sqrt{5}}{19}&-\frac{5}{7}&\frac{5}{19}-\frac{9\sqrt{5}}{19}&\\\frac{5\sqrt{5}}{19}-\frac{12}{19}&\frac{9}{7}&-\frac{5\sqrt{5}}{19}-\frac{12}{19}\\1&1&1\end{bmatrix}$$

Using the square root of the eigenvalues we have: $$\sum = \begin{bmatrix} 3+\sqrt{5}&0&0\\0&3&0\\0&0&3-\sqrt{5}\\0&0&0\end{bmatrix}$$

For the first three columns of $U$ we can use the ecuations: $u_1=\frac{1}{\sqrt{14+6\sqrt{5}}}*A*v1$

and the last column of $U$ is given by

$u_4=\frac{N(A^T)}{|N(A^T)|}$

Finally

$U=\begin{bmatrix} \frac{4(\frac{46}{19}+\frac{22\sqrt{5}}{{19})}}{3+\sqrt{5}}&-\frac{68}{21}&\frac{4(\frac{46}{19}-\frac{22\sqrt{5}}{{19})}}{3-\sqrt{5}}&\frac{8}{3}\\ \frac{4(\frac{53}{19}+\frac{27\sqrt{5}}{{19})}}{3+\sqrt{5}}&-\frac{4}{21}&\frac{4(\frac{53}{19}-\frac{27\sqrt{5}}{{19})}}{3-\sqrt{5}}&-\frac{8}{3}\\\frac{4(\frac{14}{19}+\frac{10\sqrt{5}}{{19})}}{3+\sqrt{5}}&-\frac{128}{21}&\frac{4(\frac{14}{19}-\frac{10\sqrt{5}}{{19})}}{3-\sqrt{5}}&\frac{4}{3}\\\frac{4(-\frac{43}{19}-\frac{9\sqrt{5}}{{19})}}{3+\sqrt{5}}&-\frac{12}{7}&\frac{4(-\frac{43}{19}+\frac{9\sqrt{5}}{{19})}}{3-\sqrt{5}}&0\end{bmatrix}$

My issue is that I belive that both $V$ and $U$ are not correct. I can´t tell in which part of the procces.

1

There are 1 best solutions below

4
On BEST ANSWER

Your $V$ isn't an orthogonal matrix. For instance, its last row, $(1,1,1)$, is clearly not a unit vector. You may normalise each column of $V$ to get the correct $V$.

After a correct $V$ is obtained, since $A=U\Sigma V^T$, the first three columns of $U$ are given by $$ AV\operatorname{diag}\left(\frac{1}{\sigma_1},\frac{1}{\sigma_2},\frac{1}{\sigma_3}\right). $$

The last column, can be obtained by normalising the spanning vector of $\ker(AA^T)$ and hence, as you said, it can also be obtained by normalising the spanning vector of $\ker(A^T)$.