TITLE: Idempotent elements in matrix ring
QUESTION [5 upvotes]: Is there a relation between the idempotent elements of a ring $R$ and those of $M_{n}(R)$ - the ring of $n \times n$ matrices over $R$?

REPLY [7 votes]: Any idempotent $e$ of $R$ induces an idempotent $E=\mathop{diag}(e,\ldots,e)$ of $M_n(R)$. In fact, if $e_i$ are idempotents in $R$, then $E=\mathop{diag}(e_1,\ldots,e_n)$ is an idempotent of $M_n(R)$.
Conversely, if $R$ is nice enough, an idempotent $E$ in $M_n(R)$ can be diagonalized to $E=U^{-1} \cdot \mathop{diag}(e_1,\ldots,e_n) \cdot U$ for some $U \in M_n(R)$ and idempotents $e_i$ in $R$.
Of course, this relies crucially on $R$ being nice enough. One sufficient "nicety" condition is that $R$ is an AW*-algebra; see for example this paper.