Intuition for idempotents, orthogonal idempotents? 
Given a ring $A$, an element $e \in A$ is called an idempotent if one has $e^2 = e$. If $e$ is an idempotent, then so is $1 - e$, since$$(1 - e)^2 = 1 - 2e + e^2 = 1 - 2e + e = 1 - e.$$Also, we have $e(1 - e) = 0$. This is a special case of the following situation.
A collection of elements $e_1, \dots, e_n \in A$ is said to be a set of orthogonal idempotents if one has$$e_i^2 = e_i \text{ and }e_ie_j = 0 \text{ for }i \neq j.$$

My question is, what is the underlying intuition behind idempotents and orthogonal idempotents? I am finding them quite hard to work with...
 A: The orthogonal projection $Px$ of a point $x\in\mathbb R^n$ onto a linear subspace $W\subseteq\mathbb R^n$ is a point $Px\in W$ with the property that $x-Px$ is orthogonal to $Px$ and in fact orthogonal to every member of $W$.  This is just what geometric intuition would suggest: draw a straight line through the origin and call it $W$. Let $x$ be a point not in $W$.  Draw the line from $x$ to $W$ that is orthogonal to $W$.  Where that line intersects $W$ is $Px$.
Notice that $P$ is idempotent: $P^2=P$.  ($P$ is also self-adjoint: $P^T=P$.)
Now let $Q = I-P$ where $I$ is the identity map.  Notice that $Px$ and $Qx$ are orthogonal to each other and $Qx$ is the orthogonal projection of $x$ onto the orthogonal complement of the space $W$.  The mapping $Q$ satisfies $Q=Q^2 = Q^T$.
$P$ and $Q$ are complementary orthogonal projections.
A: Consider direct sums of unital rings, $S=R_1\oplus R_2\oplus\cdots \oplus R_n$. If the rings $R_1,\cdots,R_n$ all have no idempotents besides $0$ and $1$, then the idempotents of $S$ are vectors whose every coordinate is either $0$ or $1$. If $e$ is one of those idempotents, then $1-e$ is the idempotent obtained by swapping all the $0$s and $1$s, and then it becomes obvious $e(1-e)$ is $0$ in every coordinate. All of these idempotents are central. Take $e_i$ to be the coordinate vector with $i$th coordinate $1$ and all other coordinates $0$. The principal ideal that $e_i$ generates is precisely $R_i$ in the $i$th coordinate and $0$ in all the other coordinates. Moreover, $e_ie_j=0$ if $i\ne j$ and $e_i^2=e_i$ for every $i$, and all the $e_i$s are central. Thus $\{e_i\}$ is a collection of central, primitive, orthogonal idempotents.
So idempotents are useful for directly decomposing rings. Indeed more generally they are useful for decomposing modules. For every idempotent $e\in S$ and $S$-module $M$ we have the direct sum decomposition $M=eM\oplus (1-e)M$. This makes sense even if $S$ doesn't have a $1$; one can simply interpret $(1-e)M=\{m-em:m\in M\}$. Can you prove this decomposition? The more idempotents one finds, the further one can decompose a module. Primitive idempotents occur where you can't decompose $eS$ any further (though you might be able to with $(1-e)S$).
For general rings $S$, if we lose the centrality condition, we can still decompose the algebra by decomposing as a module on both sides. Set $f=1-e$ and write 
$$\begin{array}{ll} S & = eS\oplus fS \\ & =e(Se\oplus Sf)\oplus f(Se\oplus Sf)\\ & = eSe\oplus eSf\oplus fSe\oplus fSf. \end{array} $$
Basically, it's $(e+f)S(e+f)$ expanded out. Although, once again, this even makes sense if $S$ doesn't have a $1$ if one interprets things correctly.
A: The following is a very nice intuition.  Suppose that your ring $A$ actually is a subring of the ring of all functions $S\to\mathbb{R}$ for some set $S$, where addition and multiplication of functions is defined pointwise (if you like, you can replace $\mathbb{R}$ with any field, or even have different fields as the codomain at different points of $S$).  Then a function $e\in A$ is idempotent iff $e(s)^2=e(s)$ for all $s\in S$, i.e. iff $e(s)=0$ or $e(s)=1$ for all $s\in S$.  Such a function is determined by the set $T=\{s:e(s)=1\}\subseteq S$ and is called the characteristic function of $T$; we write $e=1_T$.
In this case, the fact that $1-1_T$ is also idempotent is obvious, and we have $1-1_T=1_{S\setminus T}$.  The product of two idempotents is also idempotent, with $1_T1_U=1_{T\cap U}$.  So to say that $1_T$ and $1_U$ are orthogonal is to say that $1_{T\cap U}=0$, which just means that $T\cap U=\emptyset$. That is, orthogonal idempotents correspond to disjoint subsets of $S$.  (Warning: in a general ring, it is not always true that a product of idempotents is idempotent; however, it is true in commutative rings, or more generally if the idempotents commute.)
So idempotents correspond to subsets of $S$ (or at least, those subsets whose characteristic functions are in the ring $A$), the operation $e\mapsto 1-e$ corresponds to taking complements of sets, and taking products of idempotents corresponds to intersecting sets.  I'll leave it to you to check that forming unions of sets corresponds to the operation $(e,f)\mapsto e+f-ef$ on idempotents. (Warning: Again, it is not true in a general ring that $e+f-ef$ is an idempotent; you need $e$ and $f$ to commute.)
You can also understand the ideal generated by an idempotent easily from this correspondence.  Namely, if $e=1_T$ is idempotent and $f$ is in the ideal generated by $e$, then we can write $f=eg$ for some $g$ and we find that $f(s)=e(s)g(s)=0\cdot g(s)$ for all $s\not\in T$.  Conversely, if $f(s)=0$ for all $s\not\in T$, then $f=ef$, since $e(s)=1$ for all $s\in T$.  So the ideal generated by $e$ is just the set of all functions in $A$ which vanish on the complement of $T$.
While this discussion was based on the assumption that $A$ was a very special kind of ring (a ring of real-valued functions on some set), the intuitions it gives are often useful for thinking about idempotents in general rings (though as indicated in the warnings above, it is a more accurate intuition in commutative rings than in noncommutative rings).  In fact, every commutative ring without nilpotent elements is isomorphic to a ring of functions from some set to a field, if you allow the field to be different at different points of the set; this is a central idea in algebraic geometry.  Since modding out the nilradical of a commutative ring turns out not to change its idempotents, this means that the story above is in some sense directly applicable to any commutative ring.
A: Here's the simplest-possible concrete example. Fix a natural number $n$. Then given $i,j<n$, write $E^{ij}$ for the $n \times n$ matrix with a $1$ in position $(i,j)$ and $0$'s everywhere else (I begin numbering at position $(0,0)$.) It follows that $E^{ij}E^{jk} = E^{ik},$ otherwise the product is $0$. Hence the set $\{E^{ii} \mid i < n\}$ consists of orthogonal idempotents. In fact, you can show that this is a maximal set of orthogonal idempotents.
Now consider the $C$-module generated by $\{E^{ii} \mid i < n\}$, where $C$ is a commutative ring. Observe that this is just the $n \times n$ diagonal matrices. This explains why its really easy to take products of diagonal matrices. Its because we can write...
$$\left(\sum_{i<n}a_i E^{ii}\right)\left(\sum_{i<n}b_i E^{ii}\right) = \sum_{i,j<n}a_i b_j E^{ii} E^{jj} = \sum_{i,j<n}a_i b_j E^{ii}[i=j] = \sum_{i<n}a_i b_i E^{ii}$$
