# number of solutions of $x^2=x$ divides the number of invertible elements in a ring

Let $$A$$ be a commutative ring with odd number of elements. If $$n$$ is the number of solutions of the equation $$x^2=x,x\in A$$, and $$m$$ is the number of invertible elements of $$A$$, prove that $$n$$ divides $$m$$. Can somebody give me some tips, please? I do not know how to start the proof.Is $$2 \in U(A)$$?

• Yes, $2$ is invertible. This follows from the fact that, as a group under addition, $A$ has odd order. – Robert Israel Mar 5 at 21:43
• Can you explain me that more detailed, please ? – Gaboru Mar 5 at 21:50
• Let the order of $A$ be $2n-1$. Then $2\cdot n=1$, so $n$ is the inverse of $2$. – Wojowu Mar 5 at 21:51
• @Dzoooks How is it a ring homomorphism? It doesn't preserve addition. – Wojowu Mar 5 at 21:52
• @Wojowu, ah sorry...but $x \to x^2$ is a homomorphism on the units. I think it has to do with that map anyway.. – Dzoooks Mar 5 at 21:54

Hint: $$x^2=x$$ iff $$(2x-1)^2=1$$.

Elaboration as requested in the comments. Consider the map $$x\mapsto 2x-1$$. Because $$2$$ is invertible in $$A$$, this map is a bijection from $$A$$ to itself. Therefore, by the hint above, it induces a bijection from the set of elements satisfying $$x^2=x$$ to the set of elements satisfying $$y^2=1$$. The latter, form a subgroup of the group of units and we're done by Lagrange.

• Hey @Wojowu, could you elaborate? Many thanks! – Mike Mar 6 at 3:04
• Can you give me some more details, please? – Gaboru Mar 6 at 15:40
• @Gaboru Expanded my answer. – Wojowu Mar 6 at 15:50
• Thank you very much! Now I have to figure out how to prove that 2 is invertible. – Gaboru Mar 6 at 15:54
1. Every prime ideal of $$A$$ is maximal: let $$\mathfrak p \subset A$$ be a prime ideal, so $$A/\mathfrak p$$ is an integral domain. $$A$$ is finite, so $$A/\mathfrak p$$ is finite. Finite integral domains are fields, so $$A/\mathfrak p$$ is a field, so $$\mathfrak p$$ is maximal.

2. The nilradical $$N(A)$$ is the Jacobson radical $$J(A)$$: the nilradical is the intersection of all prime ideals, and the Jacobson radical is the intersection of all maximal ideals. All prime ideals in $$A$$ are maximal ideals, and conversely in any ring any maximal ideal is a prime ideal.

3. $$A/N(A)$$ is isomorphic to a product of fields $$F_1 \times F_2 \times \cdots \times F_t$$: $$A$$ is finite, so it has finitely many maximal ideals $$\mathfrak m_1$$, ..., $$\mathfrak m_t$$. By Chinese Remainder Theorem (c.f. e.g. Stacks 00DT), $$A/\bigcap_{i=1}^t \mathfrak m_i \cong \prod_{i=1}^t (A/\mathfrak m_i)$$. Let $$F_i := A/\mathfrak m_i$$, so each $$F_i$$ is a field. And finally $$\bigcap_{i=1}^t \mathfrak m_i = J(A) = N(A)$$.

4. Idempotents (solutions of $$x^2=x$$) lift uniquely through the nilradical (c.f. e.g. Stacks 00J9), i.e. there are as many solutions in $$A$$ as there are in $$A/N(A) \cong F_1 \times \cdots \times F_t$$.

5. Each field only has two idempotents ($$x^2=x \iff x(x-1)=0 \iff x \in \{0,1\}$$).

6. There are $$2^t$$ many idempotents: each idempotent in $$\prod_{i=1}^t F_i$$ must be $$0$$ or $$1$$ in each coordinate.

7. $$A^\times = \pi^{-1}((A/N(A))^\times)$$ (c.f. e.g. Stacks 0AMG), so:

$$\begin{array}{rcl} |A^\times| &=& |\pi^{-1}((A/N(A))^\times)| \\ &=& |N(A)| |(A/N(A))^\times| \\ &=& |N(A)| |(F_1 \times \cdots \times F_t)^\times| \\ &=& |N(A)| |F_1^\times \times \cdots \times F_t^\times| \\ &=& |N(A)| |F_1^\times| \cdots |F_t^\times| \\ &=& |N(A)| (|F_1| - 1) \cdots (|F_t| - 1) \end{array}$$

Since $$|A|$$ is odd, each field is of odd order, so each $$|F_i| - 1$$ is even, so $$2^t$$ divides $$|A^\times|$$ as required.

An example: $$\{-4,-3,-2,-1,0,1,2,3,4\}$$ is a complete residue system mod 9, but note that -x and x will have the same square ( while having opposite parity positive versions). This means we will only have at most 5 quadratic residues mod 9, namely:$$\{0^2\equiv0,1^2\equiv1,2^2\equiv4,5^2\equiv7\}$$ mod 9 has 1 less because it's a perfect square. 3 and -3 and 0 fail invertibility. This leaves 6 elements which are invertible. but We've Also shown The number of quadratic residues equal to themselves is 2, which clearly divides 6. 2 is invertible as $$2\cdot(-4)\equiv-8\equiv 1$$ .

As multiplication is commutative in the ring by definition, The only way to get an odd number of invertible elements is for an odd number of elements to be their own inverses. Invertible elements must be coprime. And I'm not sure about how to complete the quadratic residue part.