Let $S\subset G$, $S$ finite and nonempty, $G$ group. Suppose additionally that $$SS=\{s_1 s_2: s_1\in S, s_2 \in S\}=S.$$
How can I prove that $S$ is a subgroup of $G$? Does this hold for $S$ infinite?
$S$ is obviously closed, for $s_1 s_2 =s\in S$ by the above equation. Now if $S={s_1,\cdots,s_n}$, we can arrange the elements of $SS$ in a matrix with $n^2$ entries, whose elements equal the original $n$ members of $S$, giving us quite a lot of overlay. Other than what I just stated, I can't extract more tools to help me demonstrate what is required.
I am reading Rotman's book, which at this stage hasn't introduced the notion of order of an element.
To show $S$ is a subgroup, you need to show it is closed under multiplication (which you already stated is obvious), and it is closed under inverses, and that it has $G$'s identity.
Why does it have $G$'s identity element? Well, it is nonempty, so it has some element. But $SS = S$ implies that for each $a \in S$, $aa = a^{2} \in S$ since $aa \in SS \subseteq S$. But then that means $a^{2}a \in S$ since $a^{2}a \in SS \subseteq S$. But this means $a^{3} \in S$. Since $S$ is finite, it must be the case that $a^{n} = e \in S$, since if $a^{n}$ is never $e$, $S$ would be infinite (because for each $m$, $a^{m}$ would be distinct).
Now, why does every element have an inverse? Well, as we just stated in our last argument, for each element in $S$, it has finite order. Specifically, if $a \in S$, $a^{n} = e \in S$ for some $n$. But we also said $a^{n - 1} \in S$, and so we have $a a^{n - 1} = a^{n - 1}a = e \in S$, so the inverse of $a$ is $a^{n - 1}$, which is in $S$, and this shows each element of $S$ has an inverse in $S$.
Thus, $S$ is a subgroup of $G$.