# Ring of order $p^2$ is commutative.

I would like to show that ring of order $p^2$ is commutative.

Taking $G=(R, +)$ as group, we have two possible isomorphism classes $\mathbb Z /p^2\mathbb Z$ and $\mathbb Z/ p\mathbb Z \times \mathbb Z /p\mathbb Z$.

Since characterstic must divide the size of the group then we have two possibilities $p$ and $p^2$.

Now IU don't understand how can I reason to say that the multiplication is commutative and how can I conclude for the case when characterstic is $p$?

Let $$R$$ be a ring with $$p^2$$ elements. Let $$x \in R$$, we have to show that $$Z(x) := \{r \in R : xr=rx\}$$ coincides with $$R$$. It is an additive subgroup, even a subring, and therefore has order $$p$$ or $$p^2$$. If it has order $$p^2$$, we are done. Assume that it has order $$p$$. Every ring of order $$p$$ is canonically isomorphic to $$\mathbb{Z}/p$$. It follows that $$x=z \cdot 1$$ for some $$z \in \mathbb{Z}$$. But then obviously $$Z(x)=R$$, which has order $$p^2$$, a contradiction.

For rings without unit, also called rngs, this fails: There are $$11$$ rngs with $$p^2$$ elements. Two of them are non-commutative, namely $$E=\langle a,b : pa=pb=0, a^2=a, b^2=b, ab=a, ba=b \rangle$$ and $$F = \langle a,b : pa=pb=0, a^2=a, b^2=b, ab=b, ba=a\rangle.$$

• I hadn't read this while composing my answer (I never think about non unital rings !): +1 . Commented Feb 16, 2013 at 15:20
• The link may be broken. I was wondering what are the orders of $E,F$? Commented Dec 13, 2019 at 12:38
• An age later: a student asked me about this proof. It would probably be clearer to organize this is in a different way: «blah blah and therefore $Z(x)$ has order $p$ or $p^2$. Had it order $p$, then blah blah and it'd follow that $x=z\cdot 1$ for some $z\in\mathbb Z$, so obviously $Z(x)=R$: this is absurd, since $R$ has order $p^2$, not $p$. We thus see that $Z(x)$ has order $p^2$ and therefore that $x$ is central.» Commented Mar 9, 2022 at 4:45
• adjusted it now @Mariano Commented Sep 4 at 15:14

Warning: I assume here that "ring" means "unital ring", not "rng" without unity.

There is a canonical ring morphism $f:\mathbb Z\to R$ (this is true for all rings).
Its image $f(\mathbb Z)\subset R$ has cardinality either $p^2$ or $p$.
$\bullet$ In the first case $f(\mathbb Z)=R$ and since $f(\mathbb Z)= \mathbb Z/p^2\mathbb Z$ (the only quotient of $\mathbb Z$ of cardinality $p^2$) we are done: $R= \mathbb Z/p^2\mathbb Z$, a commutative ring.

$\bullet \bullet$ In the second case $f(\mathbb Z)= \mathbb Z/p\mathbb Z$ (the only quotient of $\mathbb Z$ of cardinality $p$) and $R$ is a $\mathbb Z/p\mathbb Z$-algebra.
That algebra is then generated by any element $r\in R\setminus (\mathbb Z/p\mathbb Z)$, i.e. $R=\mathbb Z/p\mathbb Z[r]$, which immediately implies that $R$ is commutative, since $f(\mathbb Z)=\mathbb Z/p\mathbb Z$ is in the center of $R$ and since powers of $r$ commute with each other.

Complement
Actually, we can classify all the rings in $\bullet \bullet$.
If $m(x)=x^2+ax+b\in \mathbb Z/p\mathbb Z[x]$ is the minimal polynomial of $r$ over $\mathbb Z/p\mathbb Z$ we then have $R=\frac{ \mathbb Z/p\mathbb Z[x]}{\langle m(x)\rangle}$ and it follows that $$R=\mathbb F_{p^2} \;\text {(the field with} p^2 \text {elements)},\;\mathbb Z/p\mathbb Z\times \mathbb Z/p\mathbb Z \;\text{or} \;(\mathbb Z/p\mathbb Z)[x]/(x^2)$$ according as $m(x)$ is irreducible, reducible with distinct roots or reducible with a double root.

• Now $\mathbb{Z}/p^2$ is missing. Sorry ^^ Commented Feb 16, 2013 at 15:25
• @Martin, yes you are quite right: due to some stupid confusion of mine I had replaced the correct nilpotent algebra $(\mathbb Z/p\mathbb Z)[x]/(x^2)$ by the ring $\mathbb Z/p^2\mathbb Z$ already mentioned in $\bullet$, which isn't even a $\mathbb Z/p\mathbb Z$-algebra! Corrected now (your last comment has been teken care of by explicitly stating that the classification only concerns $\bullet \bullet)$. Thanks a lot for your vigilance. Commented Feb 16, 2013 at 15:44
• You're welcome. So there are $11$ rngs of order $p^2$, $4$ rings of order $p^2$, and they are all commutative. $p^3$ is far more complicated: Associative rings of order $P^3$ by Robert Gilmer and Joe Mott. Commented Feb 16, 2013 at 16:04
• "Associative rings"? Good grief, can't we agree on any of the properties of a ring?? Commented Feb 16, 2013 at 19:25
• I completely agree with you, @Pete. And "good grief" reminds me of Charlie Brown, who so amused and moved me in the golden days when I started reading in English, a long time ago. Sigh... (as he also often said) Commented Feb 16, 2013 at 21:22

Recall that a ring which is generates by one element as a ring is commutative. Indeed, it is an epimorphic image of $\mathbb Z[X]$.

Let now $R$ be of order $p^2$. Then $R$ is generated as a ring by one element:

• If the additive group is cyclic, then any additive generator will generate $R$ as a ring.

• If the additive group is not cyclic, it is generated by any two $\mathbb F_p$-linearly independent elemements. Since $1\in R$ is not zero, we can pick a $x\in R$ such that $\{1,x\}$ generates the additive group. In particular, $x$ generates $R$ as a ring.

• i came to a situation something like saying that $x^2=kx$ , but i couldn't really justify if it was true . Commented Feb 16, 2013 at 19:38
• Can you elaborate on your second point . when you say that if the additive group is not cyclic then it is generated by two $\mathbb F_p$- linearly independent elements ? Commented Feb 16, 2013 at 19:48
• Oh ok , got it . thanks Commented Feb 16, 2013 at 19:55
• Doesn't this coincide with George's answer? Commented Feb 16, 2013 at 22:56

Let $R$ be a ring with unity and $|R|= p^2,$ where $p$ is prime. Let $I$ be a principal ideal of $R$ generated by some $x.$ If $|I|=p^2$ then $I=R$ so if $(R,+) \cong \mathbb{Z}/p \oplus \mathbb{Z}/p$ then we get a contradiction since $\mathbb{Z}/p \oplus \mathbb{Z}/p$ does not contain such an $I.$ So $R\cong \mathbb{Z}/p^2$ so there exists $x\in R$ such that every element of is of the form $k.x$ for some $1\leq k\leq p^2$ and hence the product of any $2$ elements will commute as a result of being finite sums of $x.$

Hence every principal ideal must have order $p.$ Let $x,y\in R$ be arbitrary, $x \neq 1, 0$ and let $I_1, I_2$ be the principal ideal generated by $x$ and $y$ respectively. Then both $(I_1, +)$ and $(I_2, +)$ are cyclic of order $p$ and hence can be written as $I_1 = \{0,a, \ldots (p-1).a\}$ and $I_2=\{0,b, \ldots (p-1).b\}.$ By definition of an ideal, $ab, ba \in I_1\cap I_2 = \{0\}$ it follows that $ab =ba=0.$

Since $I_1+I_2$ is an ideal of size $|I_1|. |I_2|/|I_1\cap I_2| = p^2$ we have $R= I_1+I_2.$ Then for any $c, d \in R$ we have $c = m_1.a +n_1.b$ and $d=m_2.a +n_2.b$ so that $cd = (m_1m_2).a + (n_1n_2).b =dc$ and hence $R$ is commutative.

I am just posting the existing proofs but in more details. $$\DeclareMathOperator{\Z}{\mathbb Z}$$ $$\textbf{Proof by isomorphism}\tag*{}$$

Let $$p$$ be a prime number and $$(R,+,\cdot)$$ be a ring of order $$p^2$$ with identity.

We note that $$(R,+)$$ is abelian. By fundamental theorem of abelian groups, there are only two ways to express an abelian group of order $$p^2$$ as product of cyclic groups. (Cases 1 and 2).

$$\\$$ $$\mathbf{Case\ 1: } \ (R,+)\cong \Z_p\times \Z_p\tag*{}$$

$$\Z_p\times \Z_p$$ is generated by two elements of order $$p$$.

\begin{align}\Z_p\times \Z_p&=\langle (1,0), (0,1)\rangle\\ &=\{m(1,0)+n(0,1) : m,n\in \Z\}\end{align}

By isomorphism, $$(R,+)$$ can also be generated by two elements of order $$p$$.

By Lagrange's theorem, $$\text{ord}(1_R)=p$$. (Since $$1_R\neq 0_R$$, it is clear that $$\text{ord}(1_R)\neq 1$$. The group is not cyclic so it does not have an element of order $$p^2$$. This leaves the factor $$p$$.)

If we choose one of our generators to be $$1_R$$, there exists another element $$x\in R$$ such that $$(R,+)=\langle 1_R, x\rangle$$. Thus, any element $$r\in R$$ can be written in the form $$(m\cdot 1_R+n\cdot x)$$ where $$m,n\in\Z$$.

Pick $$r_1=m_1\cdot 1_R + n_1\cdot x$$ and $$r_2=m_2\cdot 1_R + n_2\cdot x$$ from $$R$$. Show that $$r_1r_2=r_2r_1$$.

$$\mathbf{Case\ 2: } \ (R,+)\cong \Z_{p^2}\tag*{}$$ It is cyclic so it has an additive generator $$x\in R$$ so that $$R=\{n\cdot x: n\in \Z\}$$.

Every element is of the form $$n\cdot x$$. Pick $$r_1=n_1\cdot x$$ and $$r_2=n_2\cdot x$$. Show that $$r_1r_2=r_2r_1$$.

Lemma: If the additive group $$(R,+)$$ is cyclic, the ring R is commutative.

Conclusion: A ring with identity of order $$p^2$$ is commutative.

A ring without identity of order $$p^2$$ may or may not be commutative. Example: This ring of matrices over the field $$\Z_p$$. $$\left\{\begin{pmatrix}a&b\\ 0& 0\end{pmatrix}: a,b\in \Z_p\right\}\tag*{}$$ is a non-commutative ring of order $$p^2$$. It does not have an identity.

$$\textbf{Proof by considering the centre}\tag*{}$$

Let $$p$$ be a prime number and $$(R,+,\cdot)$$ be a ring of order $$p^2$$ with identity.

The center $$Z(R)$$ is subring of $$R$$ which is also an additive subgroup.

Clearly, $$0_R,1_R\in Z(R)$$ so by Lagrange’s theorem, $$|Z(R)|=p$$ or $$p^2$$.

If $$|Z(R)|=p^2$$, we are done.

If $$|Z(R)|=p$$, consider the quotient group $$R/Z(R)$$ under coset addition operation.

$$\displaystyle |R/Z(R)|=\frac{|R|}{|Z(R)|}=\frac{p^2}{p}=p\tag*{}$$

Thus, $$R/Z(R)$$ is cyclic group under coset addition. Let $$r\in R$$ such that $$r+Z(R)$$ is the generator of $$R/Z(R)$$.

Every coset in $$R/Z(R)$$ is of the form $$n\left(r+Z(R)\right)=nr+Z(R)\tag*{}$$ for some integer $$n\in \Z$$.

Pick any $$x\in R$$ then $$x$$ must be present in one of the cosets.

Let $$x\in mr+Z(R)$$ for some integer $$m$$. $$\implies x=mr+c$$ for some $$c\in Z(R)$$. Pick another element $$y\in R$$ then $$y=nr+c'$$ for some $$c'\in Z(R)$$ and $$n\in\Z$$.

Now show that $$xy=yx$$ using the fact that $$c,c'\in Z(R)$$.

Note that, in this proof, we used the fact that $$1_R$$ exists and it does not equal $$0_R$$ so that $$|Z(R)|\geq 2$$.