# Show that $\operatorname{rank}(A) = \operatorname{rank}(B)$

Let $A$ and $B$ be $n\times n$ real matrices such that $A^2=A$ and $B^2=B$. Suppose that $I-(A+B)$ is invertible . Show that $\operatorname{Rank}(A)=\operatorname{Rank}(B)$.

I proceed in this way: Note that $A(I-(A+B))=A-A^2-AB=A-A-AB=-AB$ and similarly $B(I-(A+B))=-AB$. So $A(I-(A+B))=B(I-(A+B))$. Since $I-(A+B)$ is invertible we get $A=B \Rightarrow \operatorname{Rank}(A)=\operatorname{Rank}(B)$.

-
Matrix multiplication is not commutative in general, so $B(1-(A+B))=B-BA-B^2=-BA$, not $-AB$. From this, we can't infer that $A=B$. But you can multiply on the right to get $(1-(A+B))B=-AB$, which means there is an invertible $P$ such that $AP=PB$... – Clive Newstead Aug 2 '12 at 13:51
@CliveNewstead: Your point is true. then how can I solve this? – Argha Aug 2 '12 at 13:55
See Davide Giraudo's answer below. Essentially: similar matrices have the same rank, and $P^{-1}AP=B$ where $P=(I-(A+B))$, so... – Clive Newstead Aug 2 '12 at 13:57
Consider $A$ the orthogonal projection onto $y$ axis, and $B$ the orthogonal projection onto $x=y$. Then $A\neq B$, yet they are both projections and $I-(A+B)$ is invertible. – tomasz Aug 2 '12 at 13:59

We have $A(I-(A+B))=-AB$ and $(I-(A+B))B=B-AB-B^2=-AB$ hence $$A(I-(A+B))=(I-(A+B))B.$$ Denoting $P:=I-(A+B)$, we can seen, multiplying the last equation on the left by $P^{—1}$, that $P^{-1}AP=B$, hence $A$ and $B$ are similar.
Your mistake is that you used $AB=BA$ which is not assumed (and you deduce that $A=B$, which may not occur).
Can you explain $P^-1AP=B$? – Argha Aug 2 '12 at 14:09
@Ranabir $(I-(A+B))^{-1} A (I-(A+B))=B.$ That's the definition of similarity of matrices. – user2468 Aug 2 '12 at 14:12