# Let $A$ and $B$ be matrixes. If $BA=B$ and $Rank\space A = Rank\space B$, prove $A^2=A$

Let $$A$$ and $$B$$ be matrixes. If $$BA=B$$ and $$Rank\space A = Rank\space B$$, prove $$A^2=A$$

Ok, so I can see that:

$$ABA=AB$$

$$AABA=AAB$$

$$AABAA=AABA$$

$$A^2BA^2=A^2BA$$

but I don't know how to keep following. Any hint? Also how would I apply the Rank thing?

EDIT: I messed up ABA implies B is regular which I don't know.

• Is $B$ a square matrix as well? Otherwise $ABA$ might not not be defined. – cthl Dec 13 '18 at 17:15
• Ok we don't know that good point I didn't see – iggykimi Dec 13 '18 at 17:19

Let $$x$$ in $$ker(A), A(x)=0$$ implies that $$BA(x)=B(x)=0$$ implies $$x$$ in $$Ker (B)$$ since $$rank A=rank B$$ we deduce that $$dimker(A)=dimker B$$ and $$ker A=ker B$$ since the previous argument shows that $$ker A$$ is contained in $$kerB$$. $$BA(x)=B(x)$$ implies that $$B(A(x)-x)=0, A(x)-x$$ is in $$Ker(B)=ker(A)$$ implies $$A(A(x)-x)=0$$. Which implies that $$A^2(x)=A(x)$$.
• I think after you showed that $\text{ker } A=\text{ker B}$ you need to say that now you take an arbitrary $x$ since you want to have $(A^2-A)x=0$ for every $x$ to conclude that $A^2=A$. – user9077 Dec 13 '18 at 17:28