Let $A$ be an $n\times n$ idempotent matrix i.e. $A^2=A$. Suppose that $A=A_1+A_2$ and $rank(A)=rank(A_1)+rank(A_2)$. Show that $A_1,A_2$ are both idempotent and $A_1A_2=A_2A_1=0$.
Without confusion, I'd like to identify the matrices and their corresponding linear transformations. Then we have $\text{Im}A\subset\text{Im}A_1+\text{Im}A_2$. Hence we have $\dim\text{Im}A\leq\dim(\text{Im}A_1+\text{Im}A_2)\leq\dim\text{Im}A_1+\dim\text{Im}A_2$. However, the dimension of the image space is the same as the rank of the corresponding matrix. Hence the equality holds. In other words, we have $\dim\text{Im}A=\dim(\text{Im}A_1+\text{Im}A_2)=\dim\text{Im}A_1+\dim\text{Im}A_2$. In particular, $\text{Im}A=\text{Im}A_1+\text{Im}A_2$. So we deduce that $\text{Im}A=\text{Im}A_1\oplus\text{Im}A_2$. But I don't know what can I do next. Could anyone help me complete the proof?