How do I know there are only 5 different groups of order 8? How many different groups are there in order 8?
And how do I know which groups they are?
I mean, is there anyone can teach me to calculate them?
I want a proof, thank you!
They are $C_8$, $D_4$, $Q_8$, $C_{4h}=C_4 \times V_2$, $D_{2h}=D_2 \times V_2$
 A: If the group has an element of order $8$ then it is cyclic. If all non-identity elements have order $2$ it is abelian ($1=(ab)^2=abab$ so that $ab=a(abab)b=a^2bab^2=ba$) - and there is only one option.
So any other group must have at least one element $a$ of order $4$. Note that the subgroup $<a>$ generated by $a$ has index $2$ and is therefore normal. Consider the elements $b \notin <a>$. 
If there is such a $b$ of order $2$ which commutes with $a$, then the group is abelian $\mathbb Z_4 \times \mathbb Z_2$.
If there is an element $b$ of order $2$ which does not commute with $a$ then $b^{-1}ab$ must be an element of $<a>$ (normal subgroup) of order $4$ which is not equal to $a$ so must be $a^{-1}=a^3$.
The only other possibility is that all the elements outside $<a>$ have order $4$, making six elements of order $4$, one of order $2$ and the identity. The square of any element of order $4$ must be the element of order $2$. So we take $b\notin <a>$ of order $4$ - which cannot commute with $a$ as this would make the whole group commutative, and this doesn't work with all those elements of order 4. As before $<a>$ is normal, so we must have $b^{-1}ab=a^{-1}$, and together with $a^4=b^4=1$ and $a^2=b^2$
There are five groups, which are readily seen to be distinct by considering the orders of the elements.
A: Let $G$ be a group of order 8 - you want to show that $G$ is one of the ones you mentioned. The proof is a little long, but it breaks down into the following cases :


*

*If $G$ is abelian, $G$ must be isomorphic to a product of cyclic groups. These can only be $C_8, C_2\times C_4,$ or $C_2\times C_2\times C_2$

*If $G$ is non-abelian :


a) Not all elements of $G$ have order 2 (because then $(ab)^2 = a^2b^2$ for all $a,b\in G$, which would imply that $G$ is abelian).
b) $G$ does not have an element of order 8.
c) Hence, we can choose $b\in G$ of order $4$, and let $H = \langle b \rangle$. Then $[G:H]=2$, so $H$ is normal in $G$. Write $G/H = \{H, aH\}$
d) Let $K = \langle a \rangle$.
i) If $|K| = 2$, then $H\cap K = \{e\}$, so $G\cong H\times_{\tau} K$ for some non-trivial automorphism $\tau : K\to Aut(H)$. This would give the case $G\cong D_4$
ii) If $|K| = 4$, then $H\cap K = \{e,a^2\}$. This gives the case $G\cong Q_8$


*

*Finally, you need to show that $D_4\ncong Q_8$. 

