Showing that all the subgroups of $Q_8$ are cyclic. Let's define the groupof quaternions $Q_8$: $Q_8$ is the group generated by the 2 matrices $A = \begin{bmatrix}
    0 & 1  \\
    -1 & 0 &  
\end{bmatrix}$  and $B = \begin{bmatrix}
    0 & i  \\
    i & 0 &  
\end{bmatrix}$
I have to show that all the subgroups of $Q_8$ are cyclic.
Here's my attempt: 
First let's make a list of all the elements of $Q_8$.
$A^4 = id$
$B^2 = A^2 \implies B^4 =  id$
$A^3B = BA $
$\therefore$ $Q_8 = \{id , A, A^2, A^3, AB, A^2B, BA, B\}$
We therefore have the following subgroups (attempt atfinding the subgroups):


*

*$\{id\}$

*$Q_8$

*$\{id, B^2\}$

*$\{id, A^2\}$

*$\{A, A^3, A^2, id\}$
I probably forgot a bunch of them but is that the right approach to do it, just write out all the subgorups and show that they're each generated by one elemment.
Also, how is $Q_8$ cyclic if it's only generated by one element?
 A: The quaternion group is given by $Q_8 = \{ \pm 1, \pm i, \pm j, \pm k \}$.
By Lagrange, proper subgroups have order $2$ or $4$. Since all groups of order $2$ are cyclic, we only need to look for subgroups of order $4$.
So we are left with the group
$$
\langle i \rangle= \{\pm 1, \pm i\}
$$
which is generated by $i$ or $-i$. By definition, it is cyclic. The same holds for $\langle k\rangle$ and $\langle j\rangle$. Indeed, we have found all subgroups of order $4$, see this duplicate.
Edit: See here, how to rewrite $Q_8 = \{ \pm 1, \pm i, \pm j, \pm k \}$ into matrices as above. Also, $Q_8$ is not abelian, hence also not cyclic.
A: @DietrichBurde's answer is sufficient, but I think it might be helpful to see this in terms of $A$ and $B$ like in the question.
By Lagrange's theorem, all proper subgroups are either of order $1$, $2$, or $4$.
Subgroups of Order $1$: $\{id\}$ -> Obviously cyclic.
Subgroups of Order $2$: $\{id, A^2\}$ -> Again, obviously cyclic.
Note that I did not list $\{id, B^2\}$. This is because $A^2=B^2$, so this is the same group.
Subgroups of Order $4$: $\{id, A, A^2, A^3\}$ and $\{id, B, A^2, A^2B\}$ and $\{id, AB, A^2, BA\}$
The first group is generated by $A$ (or $A^3$), the second by $B$ (or $A^2B$), and the third by $AB$ (or $BA$). Therefore, all of these groups are cyclic.
Now, finally, we need to prove that we did not miss any subgroups.
We have listed all the groups of order $1$, since there can be only one such group, which is the trivial group.
All groups of order $2$ are isomorphic to $\Bbb{Z}_2$, meaning it has one element of order $2$. If we go through all of the elements in $Q_8$, the only one with order $2$ is $A^2$, so $\{id, A^2\}$ is the only subgroup of order $2$.
All groups of order $4$ are isomorphic to $\Bbb{Z}_4$ or $\Bbb{Z}_2 \times \Bbb{Z}_2$.


*

*$\Bbb{Z}_4$ is generated by an element of order $4$. There are $6$ such elements in $Q_8$: $A, A^3, AB, BA, B, A^2B$. We have listed all subgroups generated by these elements, so this has been exhausted.

*$\Bbb{Z}_2 \times \Bbb{Z}_2$ has three different elements of order $2$. However, as stated above, $Q_8$ has only one element of order $2$, so this can't happen. Thus, there are no subgroups in $Q_8$ isomorphic to $\Bbb{Z}_2 \times \Bbb{Z}_2$.


Therefore, we have listed all proper subgroups of $Q_8$ and shown all of them are cyclic, so we are done.
