I am trying to classify groups of order 8 (we call it $G$). I understand there are similar questions on this website, but none of them is compatible to what I am expecting.
Basically, I understand that there is a subgroup of order $4$, by the proposition that if $p^{\alpha} \mid |G|$, then $G$ must have a group of order $p^{\alpha}$. Call this subgroup of order $4$ $N$. As $[G : N] = 2$, we also know that $N \triangleleft G$.
Let $K \cong G/N$. We know a short exact sequence $1 \rightarrow N \rightarrow G \rightarrow K \rightarrow 1$.
I am asked to show if this sequence does not split, then we have either the quaternion group or an abelian one. Here is what I tried. If this sequence does not split, so $K \cap N = \{e, h\}$, s.h. $h$ is an element of order $2$. I believe if I can show that $N$ cannot be the Klein-4 group, but $\mathbb{Z}/4$, I can prove that $G \cong Q_8$ or $G \cong \mathbb{Z}/8$. Not sure which step I am missing here.
The second part is to show that if the sequence splits, we can construct all the other three groups of order $8$, using semidirect products, considering different automorphisms.
The second part is more clear to me, but I am not sure how to proceed in the first part. Could anyone help me?