Determining whether a set is a group under matrix multiplication

I am aware of the process of determining groups (closure, identity, inverse and associativity) and have managed previous questions such as the set of square matrices when $\det A =\pm 1$. However I am struggling with getting my head around this set/group:

Let $S\subset M_n(\mathbb{R})$, with the property that if $A\in S$, then $A^{−1}$ exists and is in $S$. Let $G$ be a set of all possible products of a finite number of elements of $S$, that is $$G=\{A_1A_2\dots A_k:A_i\in S, i=1,\dots,k\text{ for some }k\in\mathbb{N}\}$$ Any help would be appreciated.

Let $M, N\in G$. That means that both $M$ and $N$ can be written as a finite product of elements in $S$: $$M = S_1S_2\cdots S_m, \quad N = T_1T_2\cdots T_n\\ S_i, T_i\in S$$ Then clearly $MN$ is the product of finitely many elements of $S$, namely $$MN = S_1S_2\cdots S_mT_1T_2\cdots T_n$$ so $G$ is closed under product.
Showing that the identity matrix is an element of $G$ requires a minor subtlety.
Finally, for any matrix $M\in G$, can you show that $M^{-1}\in G$?
• You don't need the empty product, because $AA^{-1}\in S$. – almagest Feb 6 '18 at 18:36
• @almagest You might think so, but how do you know that $A\in S$? We need some sort of guarantee that $G$ is non-empty, and the empty product is that guarantee. – Arthur Feb 6 '18 at 18:36
• Yes, you are right, you need it if $S=\emptyset$. So that brings us back to the old $\mathbb{N}$ problem. Does it contain 0? – almagest Feb 6 '18 at 18:37
• @AlbertB Depends on whethre you feel that $0\in \Bbb N$. At any rate, if you go by "all possible products of a finite number of elements", then the empty product is definitely allowed. – Arthur Feb 6 '18 at 18:39