Proving the following sets are subgroups of an abelian group, G, is simple enough using the subgroup test, but I'm struggling to find counterexamples that show if G is NOT abelian, H is not necessarily a subgroup using the fact that G is not abelian.
$H_1=\{g \in G\ |\ g = g^{-1}\}$
$H_2=\{g \in G\ |\ g^n = e\}$ where n is a fixed integer.
The best I've come up with as a counterexample for $H_1$ is $G=D_3$ and $H_1=\{\text{the identity and the set of flips}\}$, but it's not a subgroup because its not closed, not because G is not abelian... or is it? I have nothing for $H_2$.