A ring with no non-zero nilpotents and $(ab)^2=a^2b^2$ for all $a,b$ must be commutative

Given that $R$ is a ring with no non-zero nilpotent elements and has $(ab)^2=a^2b^2$ for all $a,b\in R$, show that $R$ is commutative.

I have previously shown that, if $R$ is unital and has $(ab)^2=a^2b^2$ for all $a,b\in R$, then $R$ is commutative. This allows me to restrict attention to non-unital $R$, but I haven't been able to get anywhere with that "simplification". The proof in the unital case makes explicit use of the unit element, and it does not seem to suggest anything for this new case.

Some of the things I've tried: various element manipulations; looking for some sort of recurrence between powers of a commutator $ab-ba$; studying the set $S=\{(ab-ba)^k\mid k\in\mathbb{N}\}$.

This is from Herstein's Topics in Algebra, second edition, problem #25 in the supplementary problems of chapter 3. Any hints would be appreciated.

Edit: proof in the unital case

If $R$ is unital, evaluate $[a(1+b)]^2$ in two different ways, using the stipulation of the problem, to find $a^2b=aba$. Similarly, $[(1+a)b]^2$ gives $ab^2=bab$. Finally, evaluating $[(1+a)(1+b)]^2$ in two different ways, and canceling terms using those two relations, we end up with $ab=ba$.


Martin Brandenburg asked in a comment how one might come up with the proof in the paper linked by YACP and transcribed in Jonathan's answer; I'll try to answer that here by showing the train of thought that led me to the same (as far as I can see) proof. When I thought about it, I had see the "edit" of the question, using $1+b$ in place of $b$ in the unital case, and, as you'll see, that contributed to my approach.

First, notice that the given equation $(ab)^2=a^2b^2$ asserts a sort of commutativity, since the left side $abab$ and the right side $aabb$ differ only in the order of a pair of $a,b$ factors. The equation can be rewritten to emphasize this observation: $a(ba-ab)b=0$ or, reversing the sign $a(ab-ba)b=0$. So the commutator $ab-ba$ is killed when sandwiched between $a$ and $b$. Also when sandwiched between $b$ and $a$ (see the equation before I reversed the sign, and switch the roles of $a$ and $b$).

The next idea is to try to push this idea of killer sandwiches further. If I could express the same commutator $ab-ba$ as the commutator of some other two elements, then those elements would also kill it in a sandwich. Here the $1+b$ idea surfaced. The commutator of $a$ and $1+b$ is the same as that of $a$ and $b$, because $1$ commutes with $a$. Unfortunately, we don't have a unity element $1$ in our ring. But we do have some other things that commute with $a$ and therefore might be used instead of $1$ here. The simplest of these is $a$ itself. So the commutator of $a$ and $b$ is also the commutator of $a$ and $a+b$ and is therefore killed when sandwiched by $a$ and $a+b$.

But if you write down the two equations saying that $ab-ba$ is killed when sandwiched by $a,b$ and also when sandwiched by $a$ and $a+b$, and if you subtract the first of these equations from the second, you get that $ab-ba$ is killed when sandwiched by $a$ and $a$. Symmetrically or similarly, it's also killed when sandwiched by $b$ and $b$.

These results combine to say that $ab-ba$ is killed when sandwiched by any two (non-commutative) polynomials in $a$ and $b$ as long as these have no constant terms. In particular, it is killed when sandwiched by itself and itself. That means its cube is zero. But we're given that there are no non-zero nilpotents in our ring, so the commutator itself has to be zero.

I hope that, at least by using more words and fewer complicated equations, I've given an idea how a more-or-less reasonable human being might arrive at this proof.


For completeness, I will transcribe the argument from the paper linked by YACP. I feel that the presentation in the paper is also unnecessarily clunky, but that is likely because they are focused on automating proofs of these sorts of results.

Note that the condition of no nonzero nilpotents is stronger than necessary. Instead, we just need that $x^3=0$ implies $x=0$ for all $x\in R$. This is of course not obvious a priori, but we can make the remark in hindsight.

Let $a,b\in R$ and consider $$ \begin{multline} (ab-ba)^3=(ab)^3-ab^2a^2b\\ -ba^2bab+baba^2b-abab^2a+ab^2aba+ba^2b^2a-(ba)^3 \end{multline} $$ We can factor this as $$ \begin{multline} (ab-ba)^3=a\left[(ba)^2-b^2a^2\right]b\\ -b\left[a^2ba-aba^2\right]b-a\left[bab^2-b^2ab\right]a+b\left[a^2b^2-(ab)^2\right]a. \end{multline} $$ Now the first and fourth terms vanish by the stipulation of the problem. The other terms can also be shown to vanish: consider that $$[a(a+b)]^2=(a^2+ab)^2=a^4+a^3b+aba^2+(ab)^2$$ while $$[a(a+b)]^2=a^2(a+b)^2=a^4+a^3b+a^2ba+a^2b^2,$$ so that $a^2ba-aba^2=0$. This shows that the the second term of the four is zero. Similarly, analysis of $[(a+b)b]^2$ yields $bab^2-b^2ab=0$.

Now we conclude that $(ab-ba)^3=0$ and therefore, by the condition of no non-trivial nilpotents, $ab=ba$ for arbitrary $a,b\in R$.