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?