Is the sum of symmetric, idempotent matrices always an idempotent matrix?

I study the properties of real symmetric idempotent matrices presented here and here. Relevant for my question are the assumptions that

(a) $$X_i$$, $$i= 1,2,...p$$, are symmetric, idempotent matrices;

(b) $$X = \sum_{i}^PX_i$$, which is also a symmetric, idempotent matrix.

In their outline of the proofs of some of those properties, Searle & Gruber (2017, p. 84) state that $$X − X_i − X_j = \sum_{r\ne i\ne j}X_r$$ can be assumed to be a non-negative definite matix. Since they state that $$X − X_i − X_j$$ is non-negative definite, I assume they imply that this matrix is idempotent, too. The eigenvalues of a, idempotent matrix are either $$1$$ or $$0$$. However, how to prove that $$X − X_i − X_j$$ is an idempotent (i.e., non-negative definite) matrix?

My approch would have been that

\begin{align} \ (X − X_i − X_j) & = (X − X_i − X_j)(X − X_i − X_j) \\ & = (X^2 − 2XX_i − 2XX_j + X_iX_i + 2X_iX_j + X_jX_j) \\ & = (X − 2XX_i − 2XX_j + X_i + 2X_iX_j + X_j) \\ \end{align}

To complete this proof, one would have to show that all the cross terms are equal to zero. However, this is not covered by the assumptions of the proof. In fact, I found the above mentioned statement in a proof of the property that if (a) and (b) above are given then $$X_iX_J = 0$$ for $$i \ne j$$.

My question therefore is whether or not the sum of symmetric, idempotent matrices always is an idempotent matrix and how to show this?

• Have you tried some examples? Say, $I$ and some nonzero symmetric idempotent matrix? Commented Mar 3, 2020 at 17:11
• @RobertIsrael, you are absolutely right and I am an idiot. I tried different diagonal matrices whose diagonal elements were 1 and 0. In those, admittedly, selected cases it worked. Thanks for this quite obvious counter example.
– DomB
Commented Mar 3, 2020 at 18:07

No it is not. Take $$\begin{equation*} I = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} \end{equation*}$$
Then $$I$$ is clearly symmetric and idempotent but
$$\begin{equation*} I + I = \begin{pmatrix} 2 & 0 \\ 0 & 2 \end{pmatrix} \end{equation*}$$
Is not idempotent, as $$(2I)^2 = 4I$$
• In nimber arithmetic, $I+I=0$. That's where the claim works. Commented Mar 3, 2020 at 17:42