# Subgroup criterion.

I've been reading some stuff about algebra in my free time, and I think I understand most of the stuff but I'm having trouble with the exercises. Specifically, the following:

Prove that a nonempty subset $H$ of a group $G$ is a subgroup if for all $x, y \in H$, the element $xy^{-1}$ is also in H.

Proving that the identity is in $H$ is easy: just take $x=y$, so $x x^{-1} = 1 \in H$. However, I'm having trouble showing that multiplication is closed and that each element in $H$ has an inverse. Can anyone give some hints?

-
Hint: For inverses use the fact that the identity is in $H$. Once you have inverses, you can get products using that fact. –  Matt Aug 10 '12 at 1:57

1. by given condition for any $x\in H$ we have $xx^{-1}=e$ is in $H$, denote identity element by $e$
2. 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$.
3. 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.
For any $b \in H$, $eb^{-1} = b^{-1} \in H$, so every element has an inverse in $H$. To show closure, note that if $a, b \in H$, then $b^{-1} \in H$ as we have just shown. So $a(b^{-1})^{-1} = ab \in H$. Hence, $H$ is a subgroup.