# Does every commutative ring have $2^n$ idempotents?

I've spent a lot of time looking for examples, and I can't find any commutative rings which have a finite number of idempotents other than a power of $$2$$. Intuitively, adjoining an extra idempotent $$a$$ always seems to double the number, as for every other idempotent $$b$$, $$ab$$ is a new idempotent. But there doesn't seem to be any way to turn this into a proof. I'm not sure whether it's even true.

I have managed to prove the characteristic $$2$$ case, as there the idempotents form a subring, and hence $$\mathbb{Z}_2$$-Algebra. But this doesn't seem to be any help for the other cases. I'm sorry I can't show more of an attempt, but this really has me stumped.

So are there commutative rings with a finite number of idempotents which don't have $$2^n$$ idempotents for some $$n$$?

I also don't know of any rings that have $$k \ne 2^n$$ idempotents in the noncommutative case, but I haven't investigated that much.

• Given an idempotent $e$ of a unital commutative ring $R,$ $eR$ and $(1-e)R$ are unital rings and $R\cong (eR)\times ((1-e)R).$ So you might be able to come up with an induction approach. Commented Apr 1, 2023 at 23:27
• This is surely a duplicate (all the existing answers appear to be dupes too based on a quick search). Commented Apr 2, 2023 at 2:37
• @BillDubuque I did not see you vote for closing, does that mean you didn't find a duplicate, after all? Commented Apr 2, 2023 at 4:32
• For the noncommutative case take the ring of 2 by 2 matrices with second column all zeros over a field with q elements. This has q + 1 idempotents which is in general not a power of 2. Commented Apr 3, 2023 at 18:55
• The ring of all 2 by 2 matrics over the field with 3 elments has 14 idempotents. I got this by direct calculation with Maple. Perhaps someone has found the number of idempotents in a n by n matrix ring over a field with $q$ elements? Commented Apr 6, 2023 at 20:54

Let $$(A,+,\cdot)$$ be a commutative ring and let $$E$$ be its set of idempotents. Define a binary operation $$\&$$ on $$E$$ by

$$e_1 \& e_2 = e_1 + e_2 - 2e_1e_2.$$

Then (exercise!) $$(E,\&,\cdot)$$ is a well-defined commutative ring of characteristic $$2$$. If $$E$$ is finite, it follows that $$\lvert E \rvert$$ is a power of $$2$$.

• Another way to write the operation: $e_1 \& e_2 := (e_1 - e_2)^2$ Commented Apr 1, 2023 at 23:36
• Note that this exhibits $E$ as a subring of $A$ iff $\operatorname{char} A = 2$ Commented Apr 1, 2023 at 23:41
• I can see that everything works out algebraically (and it's a very neat proof) but I would like to know if there is any intuition for why & is associative? Commented Apr 2, 2023 at 0:01
• @ZoeAllen: If you imagine that idempotents are functions that take the values $0$ and $1$, the operation $\&$ is pointwise addition mod $2$ of functions. See also my answer for some motivation behind this construction. Commented Apr 2, 2023 at 0:02
• You only need that $(E,\&)$ is an abelian group with the property that $e\&e=0.$ Then $E$ is a vector space over $\mathbb F_2.$ Commented Apr 2, 2023 at 1:08

From the perspective of algebraic geometry, this is obvious. Idempotent elements of a commutative ring $$A$$ are in bijection with clopen subsets of $$\operatorname{Spec} A$$. So if $$A$$ has finitely many idempotents, $$\operatorname{Spec} A$$ has finitely many clopen subsets, and the minimal nonempty clopen subsets are easily seen to be the connected components of $$\operatorname{Spec} A$$. The clopen subsets of $$\operatorname{Spec} A$$ are then just the unions of connected components, so they are in bijection with the power set of the set of connected components.

(To connect this to diracdeltafunk's answer, his operation $$\&$$ corresponds to the symmetric difference operation on clopen subsets, and multiplication corresponds to intersection. So his ring structure on idempotents is just the usual Boolean ring structure on the clopen subsets. Of course, the real work here is being hidden in the result that idempotent elements are in bijection with clopen subsets of the spectrum.)

• The proof that idempotents are in bijection with closed subsets of the spectrum is as follows: each idempotent $e$ partitions $\operatorname{Spec}A$ into two closed subsets $Z(e)$ and $Z(1-e)$. In other direction, given a clopen subset $X \subseteq \operatorname{Spec}A$, there is a unique section of the structure sheaf which takes value $1$ on $X$ and value $0$ on the complement of $X$. This gives an idempotent element of $A$, and it is not hard to check that these two constructions are inverse to each other. Commented Apr 1, 2023 at 23:54
• Or, from a more abstract perspective, idempotents in $A$ are in bijection with homomorphisms $\mathbb{Z}[x]/(x^2-x)\to A$, and $\mathbb{Z}[x]/(x^2-x)\cong \mathbb{Z}[x]/(x)\times\mathbb{Z}[x]/(1-x)\cong\mathbb{Z}\times\mathbb{Z}$ by the Chinese remainder theorem, and morphisms $\operatorname{Spec}A\to\operatorname{Spec}\mathbb{Z}\times\mathbb{Z}\cong \operatorname{Spec}\mathbb{Z}\coprod \operatorname{Spec}\mathbb{Z}$ are in bijection with clopen subsets of $\operatorname{Spec} A$ since $\operatorname{Spec}\mathbb{Z}$ is terminal. Commented Apr 1, 2023 at 23:58
• Please strive not to post more (dupe) answers to dupes of FAQs, cf. recent site policy announcement here. Commented Apr 2, 2023 at 2:39

I believe this is another way to prove this. Let $$r \neq 0, 1$$ be an idempotent in the (assumed unital) ring $$R$$. Then, $$\langle r \rangle$$ forms a ring with multiplicative identity $$r$$. It is easily verified that $$(1-r)$$ is also idempotent, so the same is true for $$\langle 1-r \rangle$$. We now use that there is an isomorphism:

$$R \cong \langle r \rangle \times \langle 1-r \rangle$$

Note that the number of idempotents in a product ring is the product of the number of idempotents in each factor. We can now apply induction on the number of idempotents since, as unital rings, both $$\langle r \rangle$$ and $$\langle 1-r \rangle$$ have at least two idempotents.

• Yeah, that was my thought too. The advantage of the otherwise "magic" proof from Diracdeltafunk is that it works for rings without unity. Commented Apr 1, 2023 at 23:41
• @ThomasAndrews Absolutely. The result I used was the only fact I knew about idempotents though :) Commented Apr 1, 2023 at 23:42
• @ThomasAndrews A slight tweak of $\langle 1-r\rangle$ to $\{x-xr\mid x\in R\}$ allows this argument to work without the assumption of unity.
– anon
Commented Apr 2, 2023 at 0:05
• Please strive not to post more (dupe) answers to dupes of FAQs, cf. recent site policy announcement here. Commented Apr 2, 2023 at 2:38
• @BillDubuque I do not find any on a cursory search. Feel free to link one you have found. If anything, I think the frequency of duplicates illustrates the difficulty of searching this site than a lack of diligence on the part of its users. Commented Apr 2, 2023 at 16:34