Subgroup criterion.
Solution 1:
- by given condition for any $x\in H$ we have $xx^{-1}=e$ is in $H$, denote identity element by $e$
- take any $x\in H$ and $e\in H$ so by the given condition $ex^{-1}=x^{-1}\in H$ so every element of $H$ has inverse in $H$.
- take any $x,y\in H$ as $y^{-1}\in H$ so by given condition $x(y^{-1})^{-1}=xy\in H$, which proves the closure property.