SVD error when deciding where to put the negative in the eigenvector

57 Views Asked by At

I am computing the SVD of the matrix $$ A = \begin{bmatrix} 2 & 2 \\\ -1 & 1 \end{bmatrix} $$

I know that $A = U\Sigma V^T$. I am getting a confusing result when considering one of the eigenvectors and where to put the negation sign.

For the eigenvectors of $$ A^TA = \begin{bmatrix} 5 & 3 \\\ 3 & 5 \end{bmatrix} $$ which has eigenvalues $\lambda_1 = 2$ and $\lambda_2 = 8$.

I find that, for the $\lambda_1$, the eigenvector $\vec{v}_1 = \begin{pmatrix} \frac{1}{\sqrt{2}} \\\ -\frac{1}{\sqrt{2}}\end{pmatrix}$. However, when I finish the remaining working (which I have left out, as they appear correct), then when I use this eigenvector, I get $$ U\Sigma V^T = \begin{bmatrix} 1 & 0 \\\ 0 & 1 \end{bmatrix} \begin{bmatrix} 2\sqrt{2} & 0 \\\ 0 & \sqrt{2} \end{bmatrix} \begin{bmatrix} \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\\ \frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}} \end{bmatrix}^T = \begin{bmatrix} 2 & 2 \\\ 1 & -1 \end{bmatrix} \neq A $$

I see that if I instead used the negation of $\vec{v}_1$, I get $$ U\Sigma V^T = \begin{bmatrix} 1 & 0 \\\ 0 & 1 \end{bmatrix} \begin{bmatrix} 2\sqrt{2} & 0 \\\ 0 & \sqrt{2} \end{bmatrix} \begin{bmatrix} \frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}} \\\ \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \end{bmatrix}^T = \begin{bmatrix} 2 & 2 \\\ -1 & 1 \end{bmatrix} = A $$

My professor insists it is fine to use an eigenvector $(x, -y)$ or $(-x, y)$, but the final calculation is not equal to $A$, and I cannot understand why. Why is this going wrong? How can I avoid this?

1

There are 1 best solutions below

1
On BEST ANSWER

when I finish the remaining working (which I have left out, as they appear correct),...

What appears correct may not be really correct. The left singular vector corresponding to the right singular pair $\left(\sqrt{2},\,(\frac{1}{\sqrt{2}},-\frac{1}{\sqrt{2}})^T\right)$ is $$ \frac{1}{\sqrt{2}}A\pmatrix{\frac{1}{\sqrt{2}}\\ -\frac{1}{\sqrt{2}}}=\pmatrix{0\\ -1}. $$ Therefore, if you take the second row of $V^T$ as $(\frac{1}{\sqrt{2}},-\frac{1}{\sqrt{2}})$, you should take the second column of $U$ as $(0,-1)^T$.