Compute the singular value decomposition of the matrix

numerical methods

Looking for some help with the question below, I have given it a try and looking to see if my workings make sense or where I have went wrong. Spent some time trying to figure this out and typing this up in the right format, all help is greatly appreciated!

compute the singular value decomposition of the matrix
$$A= \begin{bmatrix}1&2\\0&1\\-1&0\\\end{bmatrix}$$

Want: $c=U \Sigma V^t$
Using equations:
$$1) C^TC = V \Sigma ^T \Sigma V^T$$
$$2) CV = U \Sigma$$
Starting with Eq$(1)$:
$$C^TC = \begin{bmatrix}1&0&-1\\2&1&0\\\end{bmatrix}\begin{bmatrix}1&2\\0&1\\-1&0\\\end{bmatrix} =\begin{bmatrix}2&2\\2&5\\\end{bmatrix} $$
Finding eigen values and eigen vectors:
$$det(C^T-\lambda I) =\begin{bmatrix}2-\lambda&2\\2&5-\lambda\\\end{bmatrix} = (2-\lambda)(5-\lambda)-4 = \lambda ^2 -7\lambda + 6$$Hence $\lambda_1 = 1 \rightarrow \begin{bmatrix}-2\\1\\\end{bmatrix}, \lambda_2 = 6 \rightarrow \begin{bmatrix}\frac{1}{2}\\1\\\end{bmatrix}$
Then $V = \begin{bmatrix}-2&\frac{1}{2}\\1&1\\\end{bmatrix}$
and $\Sigma= \begin{bmatrix}1&0\\0&\sqrt6\\\end{bmatrix}$

Then using Eq$(2)$ $CV = U$
$$\begin{bmatrix}1&2\\0&1\\-1&0\\\end{bmatrix} \begin{bmatrix}-2&\frac{1}{2}\\1&1\\\end{bmatrix} = \begin{bmatrix}0&2.5\\1&1\\2&-0.5\\\end{bmatrix}$$

Making that unit length and multiplying by $\Sigma$ gives $U$

$$U = \begin{bmatrix}\frac{0}{\sqrt2}&\frac{2.5}{2}\\\frac{1}{\sqrt2}&\frac{1}{\sqrt2}\\\frac{2}{\sqrt2}&-\frac{0.5}{\sqrt2}\\\end{bmatrix}\begin{bmatrix}1&0\\0&\sqrt6\\\end{bmatrix} $$

Best Answer

First off $\Sigma$ is of the wrong dimension. Since $C$ is a $3 \times 2$ matrix, so should $\Sigma$:

$$\Sigma=\left[\begin{matrix}1 & 0 \\ 0 & \sqrt 6 \\ 0 & 0\end{matrix}\right]$$

Next, you need to normalize $V$:

$$V=\left[\begin{matrix}-\frac{2}{\sqrt 5} & \frac{1}{\sqrt 5} \\ \frac{1}{\sqrt 5} & \frac{2}{\sqrt 5}\end{matrix}\right]$$

Now, we have:

$$U\Sigma=CV=\left[\begin{matrix}0 & \sqrt 5 \\ \frac{1}{\sqrt 5} & \frac{2}{\sqrt 5} \\ \frac{2}{\sqrt 5} & -\frac{1}{\sqrt 5}\end{matrix}\right]$$

Now, since the above is $U\Sigma$ and the first column of $\Sigma$ is $e_1$, the first column of this matrix must be the first column of $U$. Also, since the second column of $\Sigma$ is $\sqrt 6e_2$, the second column of $U$ must be the second column of $CV$ divided by $\sqrt 6$, so we get:

$$U=\left[\begin{matrix}0 & \sqrt{\frac 5 6} & ?? \\ \frac{1}{\sqrt 5} & \sqrt{\frac 2 {15}} & ?? \\ \frac{2}{\sqrt 5} & -\frac{1}{\sqrt 30} & ??\end{matrix}\right]$$

Finally, since $C$ has rank $2$ but $m=3$ rows, you need to pad the last column of $U$ with an orthogonal vector from the cokernel so that $U$ is an orthogonal matrix. Since the last column is orthogonal to the first two columns, it must be in the null space of the following matrix:

$$\left[\begin{matrix} 0 & \frac 1 {\sqrt 5} & \frac{2}{\sqrt 5} \\ \sqrt{\frac 5 6} & \sqrt{\frac 2 {15}} & -\frac{1}{\sqrt 30}\end{matrix}\right]$$

Basically, I just turned the two columns of $U$ into row vectors of the above matrix so that the null space of the above matrix is orthogonal to the columns of $U$. Now, find the RREF of the above matrix:

$$\left[\begin{matrix}1 & 0 & -1 \\ 0 & 1 & 2\end{matrix}\right]$$

From here, it should be clear that $(1,-2,1)^t$ spans the null space of this matrix. However, for $U$ to be orthogonal, we need this to be a unit vector, so normalize it by dividing by $\sqrt 6$:

$$\frac{1}{\sqrt{6}}\left[\begin{matrix}1 \\ -2 \\ 1\end{matrix}\right]=\left[\begin{matrix}\frac{1}{\sqrt 6} \\ -\sqrt{\frac 2 3} \\ \frac{1}{\sqrt 6}\end{matrix}\right]$$

Finally, we insert this column into $U$ to get:

$$U=\left[\begin{matrix}0 & \sqrt{\frac 5 6} & \frac{1}{\sqrt 6} \\ \frac{1}{\sqrt 5} & \sqrt{\frac 2 {15}} & -\sqrt{\frac 2 3} \\ \frac{2}{\sqrt 5} & -\frac{1}{\sqrt 30} & \frac{1}{\sqrt 6}\end{matrix}\right]$$