I'm reading Jacobson's Basic Algebra and going over some old exercises. One of them says
Let M be a monoid generated by a set S and suppose every element of S is invertible. Show that M is a group.
I want to know whether this means that the inverses of said elements are contained within S.
Let $M$ be a monoid and suppose $S \subseteq M$ is a generting set for $M$ such that every element in $S$ is invertible. We will show that every element in $M$ is invertible as well. To this end, let $m \in M$. There exists a finite number of elements $s_1, \ldots, s_n \in S$ such that
$$m = \prod_{j=i}^n s_j = s_1 \cdots s_n.$$
Let $s_1^{-1}, \ldots s_n^{-1}$ denote the inverses of $s_1, \ldots, s_n$. We claim that
$$m^{-1} = \prod_{j=1}^{n} s_{n-j}^{-1} = s_j^{-1} \cdots s_1^{-1}.$$
Verify this by computing the product:
$$mm^{-1} = \bigg( \prod_{j=i}^n s_j \bigg) \bigg(\prod_{j=1}^{n} s_{n-j}^{-1} \bigg) = s_1 \ldots s_{n-1}(s_n s_n^{-1})s_{n-1}^{-1} \ldots s_1^{-1} = s_1 \ldots (s_{n-1}s_{n-1}^{-1}) \ldots s_1^{-1} = \cdots = s_1 s_1^{-1} = e,$$
where $e$ denotes the neutral element in $M$. Similarly, one can verify that the product in opposite order is $e$ as well. Hence, we have proven that $m$ is invertible with the aforementioned inverse.