# question of linear algebra

Find the orthogonal $Q$ so that $Q^{-1}AQ=B$ if
$A=\begin{pmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \end{pmatrix}$ and $B=\begin{pmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 3 \end{pmatrix}$
then find a second pair of orthonormal eigenvectors $x_1,x_2$ for $\lambda=0$.
Show that $P=x_1x_1^{T}+x_2x_2^{T}$ is the same for both pairs.

My solution
The eigenvalues of A is 0,0,3. The eigenvectors corresponding that is $x_1=(-1, 1, 0) , x_2=(1,-1, 0) , x_3=(1, 1, 1)$
Using gram-schmidt, I found
$Q=\begin{pmatrix} \frac{-1}{\sqrt{2}} &\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{3}} \\ \frac{1}{\sqrt{2}} & \frac{-1}{\sqrt{2}} & \frac{1}{\sqrt{3}} \\ 0 & 0 & \frac{1}{\sqrt{3}} \end{pmatrix}$

Actually, I'm not sure what 'second pair' means but I picked another pair of $x_1=(-1/2, 1/2, 0) , x_2=(1/2, -1/2, 0)$
Then by the formula given, P is equal to both pairs.

I'm not sure that I did well. Is that correct?

-
Yes, you are very much correct. – dineshdileep Nov 25 '12 at 17:19
You have $x_2=-x_1$ so these are not linearly independent eigenvectors. You want $x_2=(1,0,-1)$ (for example). When you write, $Q^1AQ$, do you mean $Q^tAQ$? – Gerry Myerson Nov 26 '12 at 0:41
Sorry, that means inverse so I corrected it. Oh, I just noticed that two vectors are dependent. I have to change $x_2$ as you wrote. Now I have a question. The $x_1,x_2$ are the eigenvectors for $\lambda=0$ and I think it is possible that two eigenvectors are not independent. But to make orthogonal matrix Q, should I choose independent eigenvectors? – niagara Nov 26 '12 at 2:30
Yes. If you choose dependent vectors, $Q$ will have dependent columns, and won't be invertible. – Gerry Myerson Nov 26 '12 at 4:43
I got it! Thanks! – niagara Nov 26 '12 at 9:53

First, one must choose linearly independent eigenvectors for the eigenvalue 0. Having chosen $x_1=(-1,1,0)$, one may, for example, choose $x_2=(1,0,-1)$. But since we want something orthogonal to $x_1$, a better choice is $x_2=(1,1,-2)$. This leads to the orthogonal matrix $$Q=\pmatrix{-1/\sqrt2&1/\sqrt6&1/\sqrt3\cr1/\sqrt2&1/\sqrt6&1/\sqrt3\cr0&-2/\sqrt6&1/\sqrt3\cr}$$ A different pair of (normalized) eigenvectors for the eigenvalue 0 is given by $x_1=(1/\sqrt{14})(1,-3,2)$, $x_2=(1/\sqrt{38})(5,-3,-2)$. We leave it to the reader to compute $x_1x_1^t+x_2x_2^t$ for both (normalized) pairs.