If $A,B,A+I,A+B$ are idempotent matrices how to show that $AB=BA$? 
If $A,B,A+I,A+B$ are idempotent matrices how to show that $AB=BA$ ?

MY ATTEMPT:
$A\cdot A=A$
$B\cdot B=B$
$(A+I)\cdot (A+I)=A+I$ or, $A\cdot A+A\cdot I+I\cdot A+I\cdot I=A+I$ which implies $A\cdot I+I\cdot A=0$ (using above equations)
$(A+B)\cdot (A+B)=A+B$ or,$A\cdot A+A\cdot B+B\cdot A+B\cdot B=A+B$ which implies $A\cdot B+B\cdot A=0$
What's next?
 A: Well, $AI=IA=A$, so your equation $AI+IA=0$ actually says $2A=0$.  Over a field of characteristic $\neq 2$, this implies $A=0$, so $AB=BA=0$ trivially.  Over a field of characteristic $2$, your equation $AB+BA=0$ gives $AB=-BA$, and $-BA=BA$ since the characteristic is $2$.
(Incidentally, if $A$, $B$, and $A+B$ are all idempotent this already implies that $AB=BA$, and that $AB=BA=0$ if the characteristic is not $2$.  As you derived, you get $AB+BA=0$ and hence $AB=-BA$.  But then $$AB=(A^2)B=A(AB)=-A(BA)=-(AB)A=(BA)A=B(A^2)=BA.$$  If the characteristic is not $2$, $AB=BA=-BA$ implies $AB=BA=0$.)
A: Let $a$ and $b$ be elements of a (possibly noncommutative) ring. If $a$, $b$, $a+1$ and $a+b$ are idempotent, then $ab = ba$.
Proof. From $a^2 = a$ and $(a+1)^2 = a+ 1$ one gets $a^2 + a + a + 1 = a + 1$, whence $a^2 + a = 0$. Since $a^2 = a$, it follows that $a + a = 0$ and finally $a = -a$. Now, from $(a+b)^2 = a + b$ one gets $a^2 + ab + ba + b^2 = a + b$. Again, since $a^2 = a$ and $b^2 = b$, it follows $ab + ba = 0$, and since $a = -a$, we finally get $ab -ab= 0$, that is $ab = ba$.
