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!

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.
