0

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

jh123
  • 1,400

1 Answers1

2

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]$$

Noble Mushtak
  • 18,402
  • 28
  • 44
  • how did you get that V? where did I go wrong? – jh123 Oct 21 '18 at 16:02
  • @jh123 You forgot to normalize the vectors in $V$. $V$ is an orthogonal matrix, so the columns need to be unit vectors. I divided by $\sqrt 5$ in order to turn these columns into unit vectors. – Noble Mushtak Oct 21 '18 at 16:03
  • my V is different then yours tho, how did you get those entries? – jh123 Oct 21 '18 at 16:04
  • if you could show how to pad the last column I could accept the answer, I think I got a little messed up in my solution! I have never seen that method before – jh123 Oct 21 '18 at 16:09
  • @jh123 I have added how to find the last column of $U$ in the answer above. Does this make sense now? – Noble Mushtak Oct 21 '18 at 16:18
  • yes that makes sense, I now have $\Sigma , V^T, U$ which completes my question. I will accept it now! one last question, in a comment above LutL said that in matrix V the rows and columns are orthogonal to each other, so in position a21 he has 1 while you have 2? – jh123 Oct 21 '18 at 16:21
  • @jh123 Sorry about that; $V_{21}$ should be $\frac{1}{\sqrt 5}$. That was just a typo. I have fixed my answer above. – Noble Mushtak Oct 21 '18 at 16:23
  • okay so everything else looks correct then? thanks for your time, I will now learn your method – jh123 Oct 21 '18 at 16:24
  • did I calculate my eigen values correctly? I guess I calculated my eigen vectors wrong – jh123 Oct 21 '18 at 16:25
  • @jh123 OK, I just double-checked my answer and I think everything else is good. Also, actually, you calculated the eigenvalues correctly: It should be $1$ and $\sqrt 6$. The mistake you made is that you made $\Sigma$ of the wrong dimension: It should be a $3\times 2$ matrix, not just a $2\times 2$. – Noble Mushtak Oct 21 '18 at 16:26
  • okay I see what I did wrong then! so I guess to check if it correct I would have to multiply those 3 matrices to see if it equals A? – jh123 Oct 21 '18 at 16:30
  • Yes, to check your answer, you need to make sure $U$ times $\Sigma$ times $V^T$ is the same as $C$. – Noble Mushtak Oct 21 '18 at 16:31
  • great well it looks like you have the correct answer, thanks for everything! – jh123 Oct 21 '18 at 16:33