# Eigenvectors of matrix depending on two idempotents

Let $P$ and $Q$ be two Hermitian complex idempotent matrices ($i.e.$ $P^* = P$ and $P^2 = P$ and likewise for $Q$) such that $PQ - QP \neq 0$. Define the matrices $$A = P + Q \hspace{0.5cm} \text{ and } \hspace{0.5cm} B = P - Q.$$ Because of the idempotency of $P$ and $Q$, we can write $$B^2 = 2A - A^2$$ Now let $u$ be an eigenvector of $A$ with eigenvalue $\lambda \neq \{ 0, 1, 2\}$ so that $Au = \lambda u$. This implies then that $u$ is also an eigenvector of $B^2$ because $B^2 u = (2\lambda - \lambda^2) u$. Here is my problem: I learned in linear algebra that squaring a matrix does not changes the eigenvectors; however, $u$ is not an eigenvector of $B$. I verified this numerically; in octave, I computed the quotients $u^*B^2u/(u^*u)$ and $u^*Bu/(u^*u)$ and by doing this for all eigenvectors of $A$ I get the correct spectrum only for $B^2$ but not for $B$ (only the eigenvectors associated with eigenvalues equal to one or zero are correct).

Can someone explain me why is $u$ an eigenvector of $B^2$ but not of $B$? What is wrong in my analysis? Thanks very much.

-
"Squaring a matrix does not changes the eigenvectors" means that if $u$ is an eigenvector of $B$, then it is also an eigenvector of $B^2$. The converse is not true, however, as shown in your findings. Here is another counterexample. Let $B=\begin{pmatrix}1&1\\0&-1\end{pmatrix}$. Then $B^2=I$. Clearly every eigenvector of $B$ is also an eigenvector of $B^2$ (in fact, every nonzero vector is an eigenvector of $B^2=I$), but the converse is patently false.
+1. I think now I understand exactly where my problem was: since all my matrices are Hermitian, I was looking at $B^2$ as $B^2 = U^*\Lambda U$ and $B = U^* \Lambda^{1/2} U$. However, I failed to recognize that (in contrast with $\Lambda$) $U$ and $\Lambda^{1/2}$ would not be uniquely defined. I guess the lesson from here is that is never safe to assume $B^2 u = \lambda u \implies Bu = \lambda^{1/2} u$. –  Goku Feb 6 '13 at 16:57