# Is there a ring so that any two distinct non-zero elements do not commute?

I was wondering if there was a ring so that any two distinct non-zero elements do not commute.

Formally, is there a ring $R\not=\{0\}$ so that

$$\forall x,y\in R\setminus\{0\}, x\not= y\implies xy\not=yx$$

Obviously, $\{0\}$ and $\Bbb Z/2\Bbb Z$ work but I'm searching for a non-trivial example (or a proof that there is none).

If $R$ has a $1$, then if we have $x\in R$ so that $x\not=0$ and $x\not=1$ (that is, $R\not=\Bbb Z/2\Bbb Z$), $x$ and $1$ commute.

$$\boxed{R\text{ doesn't have }1}$$

Let $x\in R$

$(x+x)x=xx+xx=x(x+x)$

We have $x=0$ or $x+x=0$ or $x+x=x$

So $x+x=0$

$$\boxed{R\text{ has characteristic }2}$$

Suppose we have a nilpotent element $x\in R$

$\exists n\in\Bbb N^*,x^{n}=0$

If $n=1$, $x=0$

If $n=2$, $x^2=0$

If $n>2$, $x^{n-1}\not=x$ but they commute

$$\boxed{\text{The square of a nilpotent element is }0}$$

(Given by Arthur in the comments)

Let $x\in R$

$x$ and $x^2$ commute so $x=0$ or $x^2=0$ or $x=x^2$

$$\boxed{\text{Every element is either nilpotent or idempotent.}}$$

• You can add that all elements are either nilpotent or idempotent by considering $x$ and $x^2$. – Arthur Mar 14 '14 at 15:44
• Perhaps the Klein 4-group with $ab=a,ba=b,a(a+b)=a^2+a=0,(a+b)a=a+b,b(a+b)=0,(a+b)b=a+b,(a+b)^2=a+b+a+b=0$? Distibutivity is automatic, and every three-way product I've checked is associative, but there are 24 or so to check and I don't see how to do it efficiently. – Kevin Carlson Mar 14 '14 at 16:17
• @KevinCarlson One way to see it quickly is that the semigroup $S=\langle a,b\mid a^2=ab=a,b^2=ba=b\rangle$, which has two elements, is certainly associative (every product is just the letter on the farthest left, and that doesn't change with association.) Then the semigroup ring $F_2[S]$ is automatically associative. – rschwieb Mar 14 '14 at 19:42

Kevin Carlson's suggestion in the comments does the job. Namely, take the $\mathbb Z/2\mathbb Z$-vector space $$R=\mathbb Z/2\mathbb Z v\oplus\mathbb Z/2\mathbb Z w$$ and define multiplication by setting $v^2=v=vw$, $w^2=w=wv$ and extending linearly to the sum. In particular, $(av+bw)(cv+dw)=a(c+d)v+b(c+d)w=(c+d)(av+bw)$ for $a,b,c,d\in\mathbb Z/ 2\mathbb Z$. This multiplication is easily checked to be associative by verifying that $$(av+bw)(cv+dw)(ev+fw)=(c+d)(e+f)(av+bw)$$ in either order of multiplication. (In fact, this is associative over any ring of coefficients.)
Though Kevin already demonstrated that $R$ satisfies: $$\forall x,y\in R\setminus\{0\}, x\not= y\implies xy\not=yx$$ but for completeness I will include that argument here. Suppose $x=av+bw\neq 0$, $y=cv+dw\neq 0$, and $xy=yx$. Then $$a(c+d)v+b(c+d)w=c(a+b)v+d(a+b)w$$ so in particular, $a(c+d)=c(a+b)$ and $d(a+b)=b(c+d)$ and thus $ad=cb$. Now if $a=0$, then since $x\neq 0$ we must have $b=1$, hence $c=0$ and $d=1$, so $x=y$. An identical argument applies to the case $b=0$, so we can assume $a=b=1$. But then $c=d=1$ so again $x=y$. Therefore, non-equal non-zero elements do not commute. (I should also note that here, we need that the coefficients are all in $\mathbb Z/2\mathbb Z$. Since $v,w$ are idempotent, it is easy to see that an arbitrary coefficient ring of character $2$ would not work from the properties listed in the OP.)
Consider an abelian (additive) group $$G =\oplus_{\alpha\in A} {\mathbb Z}/2 {\mathbb Z},$$ where $A$ is any set of cardinality $\ge 2$. The useful property that $G$ satisfies is that $x+x=0$ for every $x\in G$. Define the following product operation on $G$: For all $x, y\in G$, $$xy=y$$ unless $x=0$, in which case, of course, $xy=0$. It is then straightforward to verify that $G$ with these two binary operations is a ring where $xy=yx$ if and only if either $x=y$, or $x=0$, or $y=0$.