Let us do a slightly tougher problem.

"Determine all groups of order 8 up to isomorphism".

Now, if is abelian the problem is extremely easy by the powerful fundamental theorem of finitely generated abelian groups. In which case it is either:

.

The hard part is doing the non-abelian case. By Lagrange's theorem the order of an element divides the order of the group, in which case are the possible orders. Now it cannot be for that will imply the group is cyclic and hence abelian. We show it cannot be haveallelements of order 2. Because then a contradiction. Let have order 4. And consider the subgroup of order 4. And let which means the cosets contain all the elements of . This shows that generate the group . Since it means and the factor group . The last sentence implies that . It cannot be that for that will imply that has order 8, which cannot be since is non-abelian group. Thus, there are two possibilities: . We mentioned that so . So, . If a contradiction. If a contradiction. If a contradiction. Thus, . All this work leads to two group presentations: