If $A^2=A,\,B^2=B,\,C^2=C$ and $A+B+C=I,$ prove $AB=BC=AC=\mathbb{O}$. 
Let $A,\,B,\,C$ be square matrices such that $A^2=A,\,B^2=B,\,C^2=C$ and $A+B+C=I.$
Prove that $AB=BC=CA=\mathbb{O}.$

Attempt. We have $A(B+C)=A(I-A)=A-A^2=\mathbb{O}$ and similarly we get
$B(A+C)=C(A+B)=\mathbb{O}$, but this is where i get so far.
Thanks in advance for the help.
 A: Roland's answer gives a great and simple linear algebra argument.
Here is a purely algebraic development:
\begin{align*}
(A+B+C)^2 & = A^2 + B^2 + C^2 + AB + AC + BC + BA + CA + CB \\
& = I  + A(B+C) + BC + (B+C)A + CB \\
& = I + A(I - A) + (I-A)A + BC + CB \\
& = I + A - A^2 + A - A^2 + BC + CB \\
& = I + BC + CB \\
I & = I + BC + CB \\
0 & = BC + CB \\
\end{align*}
By permuting the roles of $A,B,C$, we get $BC + CB = AC + CA = AB + BA = 0$.
This would allow us to conclude if we knew that $AB = BA$. It is not one of the hypotheses, but at this point we can deduce it:
\begin{align*}
AB + BA & = 0 \\
AB & = - BA \\
A^2B & = - ABA \\
AB & = - ABA \\
AB & = BA^2 \\
AB & = BA \\
\end{align*}
A: An idempotent matrix is a projection onto a subvectorspace. The assumption $A+B+C=I$ in particular says that the direct sum of the ranges of $A,B,C$ yields the whole space. To see this you have to know that $0,1$ are the only eigenvalues of a projection, since we have $\lambda v=Pv=P^2v=\lambda^2v$ for an eigenvector of a projection $P$. Let $v\in rg(A)$. Then we have $v=Iv=Av+Bv+Cv=v+Bv+Cv$, hence $0=Bv+Cv$ or equivalently $Bv=-Cv$. Set $w=Bv$ then $w\in \mathrm{rg}(B)$ and $w=C(-v)\in \mathrm{rg}(C)$. Then we have $w=Iw=Aw+Bw+Cw=Aw+w+w\Leftrightarrow Aw=-w$. Since the only eigenvalues of $A$ are $0$ and $1$ we necessarily obtain $w=0$, therefore $Bv=w=0$ and also $Cv=-Bv=0$.
This shows that any vector in the range of $A$ is sent to zero by $B$ and $C$, hence $BA=0$ and $CA=0$. The rest follows by intertwining the roles of $A,B$ and $C$.
The above also shows that a basechange to the basis given by the union of the bases of the ranges simplyfies the problem to $A,B,C$ being matrices which are zero everywhere but the diagonal and one of the three is zero on the diagonal if and only if one of the other two is not on the diagonal, e.g.
$A=\begin{pmatrix}1\\ & \ddots\\
 & & 1\\  &  & & & 0\\  & &  & & & \ddots\end{pmatrix}$
$B=\begin{pmatrix}0\\ & \ddots\\
 & & 0\\  &  & & & 1\\  & &  & & & \ddots\\
&&&&&&1\\&&&&&&&0\\&&&&&&&&\ddots\end{pmatrix}$
$C=\begin{pmatrix}0\\ & \ddots\\
 & & 0\\  &  & & & 1\\  & &  & & & \ddots\end{pmatrix}$
