TITLE: Let R be a ring. Prove that if $x^2=x$ for each $x \in R$, then R is a commutative ring.
QUESTION [9 upvotes]: Let R be a ring. Prove that if $x^2=x$ for each $x \in R$, then R is a commutative ring. 
Ok, so I'm just looking for some confirmation that I'm doing this correctly.
If we suppose $x,y \in R$
Let's consider $(x+y)^2$,
Then $(x+y)^2 = x^2+xy+yx+y^2$ but $x^2=x$ and $y^2=y$ 
We can also see that for all $x \in R, x=-x$
So, $(x+y)^2= x+xy+yx+y$
Also, by our given  $(x+y)^2=(x+y)$ so 
$x+y =x+xy+yx+y$, Solving this algebraicly gives us $-yx=xy$ but since $(-yx)^2=(yx)$, 
We have, $yx=xy$, Therefore R is commutative. Does that about wrap it up?

REPLY [4 votes]: As stated in the comments, your proof is correct.  
However, It would make the proof more readable if you could more thoroughly explain steps following the equality $-yx = xy$.
Alternatively, it might be easier to explicitly state that $x = -x$ for all $x \in R$, as MooS explains.