Two-Step Subgroup Test

Theorem: Let $$G$$ be a group and let $$H$$ be a nonempty subset of $$G$$. If $$H$$ has closure under its operation and closure under taking inverses, then $$H$$ is a subgroup of $$G$$.

Proof
(Associativity) Since the operation on $$H$$ is the same as that on $$G$$ and since $$G$$ is a group, the operation is associative on $$H$$.

(Identity) Since $$H$$ is nonempty, $$\exists x \in H$$. Since H is closed under taking inverses, $$x^{-1} \in H$$. Since $$H$$ is closed under its operation, $$xx^{-1}=e \in H$$, where $$e$$ is the identity element.

Therefore, $$H$$ is a subgroup of $$G$$.

QED