# Proving that if $AB=A$ and $BA=B$, then both matrices are idempotent

Let $A, B$ be two matrices such that $AB=A$ and $BA=B$, how do I show that $A\cdot A=A$ and $B\cdot B=B$?

Steps I took:

1. Let $A= \left[\begin{array}{rr} a & b \\ c & d \\ \end{array}\right]$ and let $B= \left[\begin{array}{rr} w & x \\ y & z \\ \end{array}\right]$

2. $\left[\begin{array}{rr} a & b \\ c & d \\ \end{array}\right] \cdot \left[\begin{array}{rr} w & x \\ y & z \\ \end{array}\right] = \left[\begin{array}{rr} aw+by & ax+bz \\ cw+dy & cx+dz \\ \end{array}\right]$ (Which is also equal to A)

3. $\left[\begin{array}{rr} w & x \\ y & z \\ \end{array}\right] \cdot \left[\begin{array}{rr} a & b \\ c & d \\ \end{array}\right] = \left[\begin{array}{rr} wa+xc & wb+xd \\ ya+zc & yb+zd \\ \end{array}\right]$ (Which is also equal to B)

At this point I am stuck. I don't know how to proceed and I imagine that I started off on the wrong track to begin with. I'd like a hint to guide me in the right direction.

My proof after consultation with answerers below:

Proof:

1) Since $AB=A$, we can say that: $(AB)A=AA$ which is equal to $A^2$

2) Then, (by associativity of matrix multiplication), we can say that $A(BA) = AB$ (since $BA=B$)

3) Then, $AB=A$ (since $AB=A$ was given)

4) Therefore, $AA$ is equal to $A$

5) Since $BA=B$, we can also say that: $(BA)B=BB$ which is equal to $B^2$

6) Then, (by associativity of matrix multiplication) we can say that $B(AB)=BA$ (since $AB=A$)

7) Then, $BA=B$

8) Therefore, $BB$ is equal to $B$

9) Thus, $AA$ is equal to $A$ and $BB$ is equal to $B$

Q.E.D.

• Are you assuming they're $2 \times 2$ matrices? – Marcus M Nov 8 '15 at 16:52
• @MarcusM Yes, I am. Is that wrong? – Cherry_Developer Nov 8 '15 at 16:53
• @Cherry_Developer Well, it is not sufficient to look at the case of $2\times 2$ matrices if you want to prove something for general matrices. If you want to prove a statement of $2\times 2$ matrices, then it is not wrong. – Eff Nov 8 '15 at 16:54
• This is not a good way to solve the exercise. The only thing you need is associativity of matrix product. – Crostul Nov 8 '15 at 16:58
• One comment on the edit: associativity allows us to say $A(B)A = A(BA)$ or $(BA)B = B(AB)$. It is transitivity of equality that then allows us to say $AA = (AB)A = A(BA) = AB = A$, or $BB = B(AB) = B(AB) = BA = B$. So you're "combining steps" at step 2) and 6), – David Wheeler Nov 9 '15 at 23:50

If $AB = A$, and $BA = B$, then:

$A^2 = AA = (AB)A$ (since we can replace $A$ with $AB$ since they are equal)

$= A(BA)$ (by associativity of matrix multiplication)

$= AB$ (since $BA = B$)

$= A$ (since $AB = A$).

Now you can try to use the same reasoning to prove $B^2 = B$.

This works for any two $n \times n$ matrices, $A,B$ that satisfy $AB = A$ and $BA = B$, not just $2 \times 2$ matrices.

• I wrote up the proof. Would you be willing to look it over for me? – Cherry_Developer Nov 8 '15 at 21:10
• @Cherry_Developer you are always welcome to post your own answer to a question here, even when it's your question. This happens a lot, actually. – David Wheeler Nov 9 '15 at 11:43
• Would you be willing to look it over though? – Cherry_Developer Nov 9 '15 at 11:58
• Sure, i don't see why not. – David Wheeler Nov 9 '15 at 12:07
• I added it to my original post. Please look it over, if you can. Let me know what you think. – Cherry_Developer Nov 9 '15 at 12:40

Notice that $AA = (AB)(AB) = A(BA)B = ABB = AB = A$.

• As noted in the comments above, associativity of the matrix product is crucial. From my vantage point, I immediately see the truth, here, but a beginner might not understand why we can play fast and loose with the parentheses. – David Wheeler Nov 8 '15 at 17:53

Hint: Start with $AA = (AB)A$ (because of the first equality)

$$A \cdot B = A \\ \implies (A \cdot B) \cdot A = A \cdot A \\ \implies A \cdot (B \cdot A) = A^2 \\ \implies A \cdot B = A^2 = A$$