How to prove that if group $G$ is abelian, $H = \{x \in G : x = x^{-1}\}$ is a subgroup? $G$ is abelian, $H = \{x \in G : x = x^{-1}\}$ is a subgroup?
I know to prove that a subset $H$ of group $G$ be a subgroup, one needs to (i) prove $\forall x,y \in H:x \circ y \in H$ and (ii) $\forall x \in H:x^{-1} \in H.$

Unless you know $H$ is a nonempty subset of $G$, we need also to show that the identity $e \in G$ is also in $H$:
(o) Clearly, the identity $e \in G$ is its own inverse, hence $e = e^{-1} \in H$.
$(ii)\;$ $\forall x \in H$, $x\in H \implies x = x^{-1}  \in H$. Hence we have closure under inverses.
$(i)$ $x\circ y \in H$?
$$\; x, y \in H, \implies x = x^{-1}, y = y^{-1}$$ $$ x \circ y = x^{-1}\circ y^{-1} = y^{-1}\circ x^{-1} \quad\quad\quad\quad\tag{G is abelian}$$
$$y^{-1}\circ x^{-1} = (x\circ y)^{-1} \implies x\circ y \in H$$
Hence we have closure under the group operation.
Therefore, $H \leq G$. That is, $H$ is a subgroup of $G$.

Added: Note that this problem is equivalent to the task of proving that if $G$ is an abelian group, and $H$ is a subset of $G$ such that $H = \{x \in G\mid x^2 = e\}$, then $H$ is a subgroup of $G$. Why? For $x \in G$ such that $x^2 = e$, note that $$x^2 = e \iff x^{-1}\circ x^2 = x^{-1} \circ e  \iff x^{-1}\circ (x\circ x) = x^{-1}$$ $$\iff (x^{-1}\circ x) \circ x = x^{-1} \iff e\circ x = x^{-1} \iff x = x^{-1}$$
