Finding the size of the smallest subgroup of $\mathrm{GL}(2,\mathbb{R})$ containing two matrices. I've only been exposed to basic abstract algebra (Like Definition of a group + Subgroup lemma etc) and some first year linear algebra. (We have not seen lagranges theorem, incase that is required for this question).
I was hoping if someone could show an elementary way of doing this question:

Let $H$ be the smallest subgroup of $GL(2,\mathbb{R})$ containing both $$A = \pmatrix{0 & 1 \\ -1 & 0} \text{ and } B =\pmatrix{0 & 1 \\ 1 & 0}.$$
Show that $H$ has eight elements.
  (Recall $GL(2,\mathbb{R})$ is the group of $2\times 2$ invertible matrices with real entries under matrix multiplication)

Is there a way of doing the question without making a long 8 by 8 multiplication table? (That was my initial attempt, but it was far too tedious).
Thanks!
 A: Every element of $\langle A,B\rangle $ can be written as a word $A^{\alpha_1}B^{\beta_1}A^{\alpha_2}B^{\beta_2}\dots A^{\alpha_k}B^{\beta_k}$ for some $k$, with $0\le\alpha_j\le3$ and $0\le\beta_i\le1$.  Using the commutation relation $BA=A^3B$, we can put each element in the form $A^{\alpha}B^{\beta}$, where again $0\le\alpha\le3$ and $0\le\beta\le1$.  So there are at most $8$ elements. 
Next check that $I,A,A^2,A^3,B,A^3B,A^2B$ and $AB$ are all distinct.
A: First, verify that $|A|=4$ and $|B|=2$.
Next compute $AB,A^2B,A^3B,BA,$ and so on.
But from here you will get that $$BA=A^3B$$
By using this relation, we obtain that $$BA^2=A^2B, BA^3=AB$$ 
By using these relation, every element in $H$ can be written as $A^iB^j$ where $0\le i\le3$ and $0\le j \le1$.
So we get $$H=\{1,A,A^2,A^3,B,AB,A^2B,A^3B\}$$
and this is actually isomorphic to $D_8$.
A: I don't know you will find this one short or not but it is elementary I can say.
Say $A = \pmatrix{0 & 1 \\ -1 & 0}$ and $ B= \pmatrix{0 & 1 \\ 1 & 0}$. Then, first we can multiply and element with itself until we get identity matrix $I$. For $B$, we have $B^2 = I$. For $A$, we have $A^2 = \pmatrix{-1 & 0 \\ 0 & -1}$ so $A^2 \in H$. Then, $A^3 = \pmatrix{0 & -1 \\ 1 & 0}$ so $A^3 \in H$. Then, $A^4 = I$. Now, we need to check $AB$, $A^2B, A^3B$. Can you take it from here?
Note that this procedure comes from the closure of groups.
