The following exercise is taken from Atiyah-Macdonald, chapter 1.

Let be a commutative ring. Show that the following statements are equivalent:

(i) is disconnected;

(ii) , where neither or is the zero ring;

(iii) contains an idempotent .

Proof : first we do the easiest parts. It’s clear that ; for example, the elements and are such idempotents. To show that , let be an idempotent which is not or . Let . Then , so is also an idempotent which is not or . Now since , we have for every ; so . Since , the sum is actually direct (as a sum of -modules); indeed, if , then, multiplying by we have . Similarily . So the sum is direct. Give an internal ring structure by defining its unit to be ; this works, since for every . Then as a direct sum of rings.

Now clearly ; indeed, every prime ideal of contains one of or , but none contains both.

Now we show that . Let and be closed sets in such that . Suppose without loss of generality that and are ideals. Since the union is disjoint, we must have , so there exists and with . We must show that we can take and so that ; this will cause the sum to be direct. Since , and since , we have . Thus every prime ideal in contains . Thus is contained in the nilradical of , so it is nilpotent.

Let be such that . Then, by the binomial theorem, for some . Since is nilpotent, so is ; hence is a unit, say . Let and . Then and , as promised. This shows that as -modules. We can, as before, define a ring structure on be letting be the unit, since we have since . Thus as rings.