Prove that R is a commutative ring. Suppose that $R$ is a ring. Prove that if $a\in R$, $a^2 = a$, then R is a commutative ring.

So, I know that this means that the ring multiplication is commutative. So... is this saying that for ANY $a\in R$, $a^2 = a$? Which means that every element of R is its own multiplicative inverse... But inverses, if they exist, are unique, so then the only element of R is unity. And if all you have is unity, then of course multiplication is commutative? 

I'm probably way off here.

EDIT: 

So, following the advice in the comments, I produced something that looks like this:

Since R is a ring, if $a,b\in R$, then $ab\in R$. Thus 

$(ab)^2 = ab$

$\to (ab)(ab)=ab $

$\to (ab)(ab)a=aba $

$\to a(ba)(ba)=a(ba)$

$\to a(ba)^2=a(ba)$

So, AM I allowed to just say "by cancellation" $(ba)^2=ba$ therefore R is a commutative ring?
You need to prove that $ab=ba$ for all $a, b \in R$. I'm not sure I follow the approach that people are attempting to outline in the comments, and certainly the phrase "by cancellation" is very fishy. Here's the approach I know works:


Prove that $R$ has characteristic $2$ (or $1$, but that's pretty boring). This follows from $2^2=2$. Edit: Or, as pointed out in the comments, if you don't assume $R$ has unity, you can still show that $a+a=(a+a)^2 = a^2+a^2+a^2+a^2 = a+a+a+a$, witnessing $a+a=0$ for every $a \in R$.
Compare $(a+b)$ with $(a+b)^2$, which must be equal. Since you don't yet know that multiplication is commutative, you have $(a+b)^2 = a^2+ab+ba+b^2 = a+ab+ba+b$. Now subtract $a$ and $b$ to get $ab+ba=0$. In characteristic $2$, this is equivalent to $ab=ba$.
@Indigo i hope this is usefull to you, 
for $a,b\in R$ , $a^{2}=a$ and $b^{2}=b$ , since $R$ is ring, $ab\in R$. 
$ab=(a^{2})(b^{2})$  and  $ab=(ab)^{2}$
We get
$(ab)^{2}=(a^{2})(b^{2})$
$abab=aabb$
By cancelation
$ba=ab$