TITLE: Prove that $AB=BA=0$ for two idempotent matrices.
QUESTION [10 upvotes]: Suppose that $A, B$ are idempotent matrices ($A^2=A$), such that $A + B$ is idempotent, prove that $AB = BA = 0$

REPLY [15 votes]: This is true in every ring where you can divide by $2$.
So it is true in particular for matrices.
We have $(A+B)^2=A^2+AB+BA+B^2=A+AB+BA+B$.
Since $A+B$ is idempotent, it follows that 
$$AB+BA=0.$$
We call this equation (E).
Right-multiply (E) by $B$. 
We find $AB+BAB=0$, hence $AB=-BAB$.
Left-multiply (E) by $B$.
This yields $BAB+BA=0$, hence $BA=-BAB$.
Equating the last two equations, we find $AB=BA$.
Now $AB+BA=0$ clearly yields $2AB=2BA=0$.
Dividing by $2$, we get
$$
AB=BA=0.
$$