TITLE: $R$ is a ring with unity, and for each $a \in R$, there exists $x \in R$ such that $a^2x=a$. Show that $ax=xa$.
QUESTION [8 upvotes]: Let $R$ be a ring with unity. For each $a \in R$, there exists $x \in R$ such that $a^2x=a$. Show that $ax=xa$.

I know that $R$ has no nonzero nilpotent elements and $axa=a$.
Thus I tried to show that
$$(ax-xa)^2=0$$
but I failed to show that.
Thanks in advance.

REPLY [2 votes]: You already know that $R$ has no nonzero nilpotent elements and $axa=a$. 
Now since $axax=axa\cdot x=ax$, $ax$ is idempotent. We prove that $ax$ is in the center of $R$. 
For any $z\in R$, consider the nilpotent commutator of $ax$ and $axz$ (commutator of $a$ and $b$ is $ab-ba$) 
\begin{align}
(\underbrace{axaxz}_{axax=ax}-axzax)^2&=(axz-axzax)^2
\\
&=axzaxz-axzaxzax-\underbrace{axzaxaxz}_{axax=ax} +axzaxaxzax
\\
&=axzaxz-axzaxzax-axzaxz+axzaxzax
\\
&=0
\end{align}
Since $R$ has no nonzero nilpotent elements, $axz=axzax$. 
Again consider the nilpotent commutator of $ax$ and $zax$ 
\begin{align}
(zaxax-axzax)^2&=(zax-axzax)^2
\\
&=zaxzax-\underbrace{zaxaxzax}_{axax=ax}-axzaxzax+axzaxaxzax
\\
&=zaxzax-zaxzax-axzaxzax+axzaxzax
\\
&=0
\end{align}
So $zax-axzax=0$ and $zax=axzax=axz$, i.e. $ax$ is in the center of $R$. 
Moreover $xaxa=x\cdot axa=xa$. So $xa$ is idempotent. Similarly we can prove that $xa$ is in the center of $R$. 
Finally we have 
$$
(ax-xa)^2=axax-\underbrace{axxa}_{x\cdot xa=xa\cdot x}-\underbrace{xaax}_{aax=a}+xaxa=axax-axax-xa+xa=0
$$
So  $ax=xa$.