Problem. Let $n > 1$ be an integer and consider the ring $R = \mathbb{Z}/n \mathbb{Z}.$ Show that the number of idempotents of $R$ is $2^m,$ where $m$ is the number of distinct prime divisors of $n.$

Solution. Let $n = \prod_{i=1}^m p_i^{n_i}$ be the prime factorization of $n$ and let $R_i = \mathbb{Z}/p_i^{n_i} \mathbb{Z}.$ By the Chinese remainder theorem we have

$R \cong R_1 \times \cdots \times R_m. \ \ \ \ \ \ \ \ \ (*)$

Claim. If $p$ is a prime and $\ell > 0$ is an integer, then the only idempotent elements of $\mathbb{Z}/p^{\ell} \mathbb{Z}$ are $0$ and $1.$

Proof of the cliam. So we want to show that, modulo $p^{\ell},$ the equation $x^2 \equiv x \mod p^{\ell}$ has only two trivial solutions $x =0, 1.$ Suppose that $x \neq 0$ is a solution of $x^2 \equiv x \mod p^{\ell}.$ Let $x=p^r s,$ where $0 \leq r < \ell$ and $\gcd(s,p)=1.$ Then $s(p^rs-1) \equiv 0 \mod p^{\ell - r}$ which gives us $p^rs \equiv 1 \mod p^{\ell - r}.$ Thus $r = 0$ and hence $x=s \equiv 1 \mod p^{\ell}$

It is clear now from $(*)$ and the claim that the number of idempotents of the ring $R$ is $2^m. \ \Box$

Example. Find all idempotents of $R = \mathbb{Z}/60\mathbb{Z}.$

Solution. By the above problem, we know that $R$ has $8$ idempotents, two of them being $0, 1 \mod 60.$ Let $R_1= \mathbb{Z}/4\mathbb{Z}, \ R_2 = \mathbb{Z}/3\mathbb{Z}$ and $R_3 = \mathbb{Z}/5\mathbb{Z}.$ Then $R \cong R_1 \times R_2 \times R_3.$ All idempotents of $R_1 \times R_2 \times R_3$ are $(0,0,0), (1,0,0), (1,1,0), (0,1,0), (0,1,1), (0,0,1), (1,0,1)$ and $(1,1,1).$ So we just need to find the preimage of each idempotent in $R.$ Obviously the preimages of $(0,0,0), (1,1,1)$ are $0, 1 \mod 60$ respectively.
Now, let’s find the preimage of, say, $b=(0,1,1).$ Let $a = m + 60\mathbb{Z}$ be the preimage. Then the image of $a$ is $(m + 4\mathbb{Z}, m + 3\mathbb{Z}, m + 5\mathbb{Z})=b = (4\mathbb{Z},1 + 3\mathbb{Z},1 + 5\mathbb{Z}).$ So $m$ is divisible by $4$ and is equivalent to $1$ modulo $3$ or $5$. It follows that $a = 16 + 60\mathbb{Z} . \Box$

1. Nour says:

How to find all idempotent elements in the ring z modulo n

• Yaghoub Sharifi says:

I just added an example, see if that helps.

2. Gaurav says:

Thanks

3. Seth Troisi says:

This really helped solidify some math I was working on thanks!