Artificial intelligent assistant

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)$.

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).

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy c701f303586e85e59d9155832772d94c