Examples of rings with idempotent elements As a part of my studies in ring theory, I've encountered the concept of an idempotent element, i.e., an element $e$ such that $e^2=e$.
Are there some interesting examples of rings with idempotent elements?
 A: As you realize, all rings have the idempotents $0$ and $1$, so the
question is whether they have any others.
If a commutative ring has a non-trivial idempotent, then it is
isomorphic to a product of two non-trivial rings. The same
is true for a non-commutative ring, as long as the idempotent
lies in its centre.
If $n$ is a positive integer which is not a prime power then
$\mathbb{Z}/n\mathbb{Z}$ has nontrivial idempotents.
Matrix rings tend to have lots of idempotents, but not usually in their centres.
A group algebra $KG$ for a finite group $G$ over a characteristic zero
field $K$ has the
central idempotent $|G|^{-1}\sum_{g\in G}g$ and usually others.
A: Actually there are rings in which every element is idempotent. They are called boolean rings. Stone duality tells us that
$X \mapsto C_0(X,\mathbb{F}_2)$
is a duality between locally compact totally disconnected hausdorff spaces and boolean rings. Compactness here corresponds to unitality. For example, every finite boolean ring is isomorphic to $(\mathbb{F}_2)^n$ for some $n$.
A: Nontrivial idempotents are intimately connected to direct product decompositions. Generally, any idempotent  $\rm e^2 = e$ yields a decomposition $\rm\  R  =  e R + (1-e) R\ $  known as the Pierce Decomposition, and vice versa. This extends to any finite set of idempotents with sum 1 which are mutually orthogonal: $\rm\ e_j\: e_k = 0\ $ if $\rm\ j \ne k\ $. For example, the Chinese Remainder Theorem (CRT) for rings has this form.
A: Let $X$ be a disconnected space. Then the ring $C(X)$ of complex continuous functions has an idempotent.
In a sense, this is a motivating example, because if $R$ has a nontrivial idempotent, then $Spec(R)$ is disconnected. Since elements of $R$ can be viewed (loosely) as functions, we can construct an element of $R$ which is "one" on one half of $Spec(R)$ and "zero" on the other. (To make this precise, one thinks in terms of the sheaf of regular functions on the scheme $Spec(R)$.)
A: The endomorphism ring $\mathrm{End}(V)$ of a given vector space $V$ is riddled with idempotents. For instance, all projections $\pi=\pi_{L_1,L_2}$ of $V$ onto $L_1$ along $L_2$ where $V=L_1 \oplus L_2$ is a direct decompositon of $V$ are idempotents ($\pi(x)=\pi(x_1+x_2)=x_1$ where $x \in V$ and $x_k \in L_k,$ $k=1,2$).
Also, there are many hard/nice questions concering idempotents in group rings.  
A: You can compute idempotents in any square matrix ring $M_n(K)$, $K$ a field, as follows:  $A \in M_n(K)$ is idempotent if and only if $A^2 = A$. But this means that the polynomial $p(t) = t(t-1)$ annihilates $A$. So the minimal polynomial $m_A(t)$ of $A$ must divide $p(t)$. This leaves only four possibilities for $m_A(t)$:


*

*$m_A(t) = 1$, in which case the unit matrix equals the zero matrix $I=0$ and $K = 0$.

*$m_A(t) = t$, in which case $A = 0$.

*$m_A(t) = t-1$, in which case $A=I$.

*$m_A(t) = t(t-1)$ is the only non trivial one. It means that your matrix $A$ has only two eigenvalues: $0$ and $1$. For instance, 


$
A=
\begin{pmatrix}
0 & 0 \\
0 & 1
\end{pmatrix} \ .
$
Since all of prime factors in the minimal polynomial have multiplicity $1$, all diagonalize, so it's fairly easy to get a picture of them: all are of the form $A = S^{-1}D S$, with $D$ a diagonal matrix with just $0$ and $1$ on the main diagonal.
Matrices of Olod's non-trivial projections belong to this case.
