I had this question on a final exam. I was wondering if anyone knows a proof for it.
Let R be a ring not necessarily with unity ($1 \neq 0$ and $x \in R$ so that $x*1=x=1*x$) and let R have the property that every element of R is idempotent that is $\forall x \in R\quad x*x=x$. Prove that $R$ is commutative.
Not to put my whole answer up because I know I was wrong. I will put the part where I had trouble going to the next step.
My argument went like this: let $a,b \in R$ then $ab\in R$ cause $R$ is a ring. Therefore $abab=ab$.
Now $aabb=ab$ as well, so $abab=aabb\ \Rightarrow abab-aabb=0 \Rightarrow\ a(ba-ab)b=0\ \because\text{ distributive property of $R$}.$
Now because R is not a division ring then the element $a$ could be a divisor of zero or $b$ could be as well so you cannot just assume $ba-ab=0$. This is where I am stuck.