# Show that the set of all idempotent elements of a commutative ring is closed under multiplication

I have a commutative ring $R$ and I defined $S = \{a\in R | a^2 = a\}$, and I want to show that $S$ is closed under multiplication. So far I have this:

For $x,y \in S$ we know that $x^2 = x$ and $y^2 = y$. I want to consider $x*y = y*x = x^2*y^2 = y^2*x^2$ (because $R$ is commutative). Is it logical to deduce that because $S$ is a subset of $R$ and multiplication is associative on the ring, it is also associative on this subset? This would easily allow me to do this proof.

-
thank you jim for fixing my set brackets. –  furashu Jan 30 '14 at 3:06

If $x,y\in S$ then we have $$(xy)^2=(xy)(xy)=x^2y^2=xy$$ so $xy\in S$. Notice that we used in the above equalities the commutativity of $R$ and the fact that $x=x^2$ and $y=y^2$.

-
beautiful, thanks. didn't even use associativity, idk why i thought i had to. –  furashu Jan 30 '14 at 3:10
Surely I used the associativity. –  Sami Ben Romdhane Jan 30 '14 at 3:11
actually yeah you did. i guess i should ask: is it true that any subset of a ring has multiplication associative on this subset? –  furashu Jan 30 '14 at 3:14
@furashu restricting an associative operation to any closed subset always results in an associative operation on the subset... You should find this pretty easy to prove. –  rschwieb Jan 30 '14 at 3:30