Let $G$ be an abelian group. Let $H = \{x \in G: x = x^{-1}\}$. Prove that $H$ is a subgroup of $G$.

The identity and inverse are trivial to show. I just want to check if I understand how to show closure under multiplication. Basically, we have to multiply two arbitrary elements in $H$ in such a way that the result abides by the given property in $H$.

Let $x, y \in H.$

$xy = yx $ since $H$ is abelian.

$= y^{-1} x^{-1} = (xy)^{-1}.$

So we have $xy = (xy)^{-1}$ just as prescribed by $H$. 

Is that correct?