Is the sum or product of idempotent matrices idempotent? If you have two idempotent matrices $A$ and $B$, is $A+B$ an idempotent matrix?
Also, is $AB$ an idempotent Matrix? 
If both are true, Can I see the proof? I am completley lost in how to prove both cases.
Thanks! 

Let $e_1$, $e_2 \in \mathbb{R}^n$ be linearly independent unit vectors with $c := \left\langle e_1,e_2\right\rangle \neq 0$, viewed as column vectors. For $i=1$, $2$, let $P_i := e_i e_i^T \in M_n(\mathbb{R})$ be the orthogonal projection onto $\mathbb{R}e_i$. Thus, $P_1$ and $P_2$ are idempotents with
$$
 P_1 e_1 = e_1, \quad P_1 e_2 = c e_1, \quad P_2 e_1 = c e_2, \quad P_2 e_2 = 1.
$$
Then:


*

*On the one hand,
$$
 (P_1 + P_2)e_1 = e_1 + c e_2,
$$
and on the other hand,
$$
 (P_1 + P_2)^2 e_1 = (P_1+P_2)(e_1+ce_2) = (1+c^2)e_1 + 2c e_2,
$$
so that $(P_1+P_2)^2 e_1 \neq (P_1+P_2)e_1$, and hence $(P_1+P_2)^2 = P_1+P_2$.

*On the one hand,
$$
 P_1 P_2 e_1 = P_1 (c e_2) = c^2 e_1,
$$
and on the other hand,
$$
 (P_1 P_2)^2 e_1 = P_1 P_2 (c^2 e_1) = c^4 e_1,
$$
so that since $0 < |c| < 1$, $(P_1 P_2)^2 e_1 \neq P_1 P_2 e_1$, and hence $(P_1 P_2)^2 \neq P_1 P_2$.
