Subgroup of a Finite Group Let $G$ be a finite group, and let $S$ be a nonempty subset of $G$. Suppose $S$ is closed with respect to multiplication. Prove that $S$ is a subgroup of $G$. (Hint: It remains to prove that $S$ contains $e$ and is closed with respect to inverses. Let $S = \{a_{1},...,a_{n} \}.$ If $a_{i} \in S$, consider the distinct elements $a_{i}a_{1}, a_{i}a_{2},...a_{i}a_{n}$.)
Preliminary questions: Can I assume that every element in $S$ unique? If each element is unique, then does that imply the products $a_{i}a_{1}, a_{i}a_{2},...a_{i}a_{n}$ are distinct? If I cannot assume that each element is not unique, then why should I just consider the distinct products?
(i). Show that $S$ contains $e$: Because we know $S$ is closed under multiplication, we know that each element in $S$ can be written as a product of elements in $S$. The book claims that I can write $a_{1} = a_{1}a_{k}$ for some $k$. I don't really understand why I can make such a claim. Does the following explain why? If $a_{1} \in S$ then will one of the following products $a_{1}a_{1}, a_{1}a_{2}, ... , a_{1}a_{n}$ be equal to one element in $S$ and eventually will every product be paired with each element in $S$? How do we know $a_{1} \neq a_{3}a_{2}$? 
Because if I assume $a_{1} = a_{1}a_{k}$, then $a_{1}^{-1}a_{1} = a_{1}^{-1}a_{1}a_{k}$ shows that $e = a_{k}$. And I can still make use of $a_{1}^{-1}$ because if $a_{1} \in S$, then $a_{1} \in G$ and $a_{1}^{-1} \in G$ since $G$ is a group. Is this reasoning correct?
(ii). Show that every element $a_{p} \in S$ has an inverse $a_{p}^{-1} \in S$: Let $a_{p} \in S$, then we can write $a_{p} = a_{1}a_{q}$ for some $q$. We can rearrange and get $a_{q} = a_{1}^{-1}a_{p} = (a_{p}^{-1}a_{1})^{-1}$. At this point I've shown that $(a_{p}^{-1}a_{1})^{-1} \in S$, but now I have been stuck for a while. Could I get a hint?
Thanks in advance.

Update
(i). Show that $S$ contains $e$: Using the hint, ``If $a_{i} \in S$, consider the distinct elements $a_{i}a_{1}, a_{i}a_{2},...a_{i}a_{n}$," if $a_{1} \in S$, then we consider $a_{1}a_{1}, a_{1}a_{2},...a_{1}a_{n}$. Then we can write the following:
\begin{align*}
a_{1} &= a_{1}a_{k} \newline
a_{1}^{-1}a_{1} &= a_{1}^{-1}a_{1}a_{k} \newline
e &= ea_{k} \newline
e &= a_{k}
\end{align*}
(ii). Show that every element $a_{p} \in S$ has an inverse $a_{p}^{-1} \in S$: To show that $e \in S$, we can write $a_{1}a_{p} = e$ for $a_{1}, a_{p} \in S$
\begin{align*}
a_{1}a_{p} &= e\newline
a_{1}a_{p}a_{p}^{-1} &= ea_{p}^{-1}\newline
a_{1} &= a_{p}^{-1}
\end{align*}
 A: The above answer is perfectly good, but here's an easier (in my opinion) way to proceed. Say you want to show that $e \in S$. Since $S$ is closed under multiplication, in particular $a_1^2 \in S$. And $a_1^3, a_1^4$, etc. are also all in $S$. Given that $G$ is a finite group, what does this tell you? 
This line of reasoning will also tell you how to find inverses.
A: If you are asking if you can assume that distinct elements of $S$ are distinct... yes. Generally, you cannot assume that all elements of a family are distinct, because a family is really a function (with domain the index set) and we are focusing on the images.
That means that you can start by saying "Let $S=\{a_1,\ldots,a_m\}$, with $a_i\neq a_j$ if $i\neq j$" with no problem: just remove all the repeats.
For groups, you know that $xy=xz$ implies $y=z$. So if you know that the $a_i$ are pairwise distinct (that's the fancy way of saying they are all different; saying "each element is unique" is a bit hard to parse), then it does indeed follow that for a fixed $j$, $a_ja_1,\ldots,a_ja_m$ are pairwise distinct.
(i) Consider the (set-theoretic) map $S\to S$ given by "left multiplication by $a_1$". That is, the map that sends $s\in S$ to $a_1s$. Because the map is one-to-one, and because the set is finite, it follows that the map is also onto. Therefore, there exists $s\in S$ such that $a_1s = a_1$. Yes, we will in fact also have that $a_1$ can be expressed as $a_2a_j$ for some $j$ (by the same argument), but that is irrelevant here. Remember that elements of a group can be expressed as products in many different ways. In fact, given any $x$ and any $y$ in a group $G$, you can always find a $z$ such that $x=yz$. 
Yes, you can still cancel $a_1$ from $a_1=a_1a_j$; that equality holds in $G$, so you can manipulate it "in $G$". Just like, in the positive integers, you can go from $2k = 2$ to $k=1$ even though $\frac{1}{2}$ is not in the integers.
(ii) You already know that $e\in S$. Look at "left multiplication by $a_p$ from $S$ to $S$ again, and ask: is there an element whose image is $e$?
A: As $G$ is finite group, every element has finite order. Let $a\in S$ be non-identity element. Then $a$ has finite order say $m>1$. i.e. $a^m=a.a^{m-1}=1$. As $a$ is non-identity, $m-1>0$, so $a^{m-1}$ is the inverse of $a$ in $G$, and as $S$ is closed under multiplication, it should be in $S$; so $S$ is subgroup. 
