# Decomposition of an idempotent matrix

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?

You've proved the hardest part. Next, let's take any $x\in\mathop{\mathrm{Im}}A_1$. It also belongs to $\mathop{\mathrm{Im}}A$, so $x=Ax=A_1x+A_2x$. Therefore, $A_2x=x-A_1x\in\mathop{\mathrm{Im}}A_1$, but it also belongs to $\mathop{\mathrm{Im}}A_2$, and since $\mathop{\mathrm{Im}}A_1\cap\mathop{\mathrm{Im}}A_2=\{0\}$, we conclude that $A_2x=0$. This implies $A_2A_1=0$ and $A_1x=x$, so $A_1$ is idempotent. The same reasoning applies to $A_1A_2=0$ and idempotency of $A_2$.