# Why are there only two groups of order 2p for $p=5,7$?

It is clear to me that using semidirect products we can get the groups of order $2p$ for $p=5,7$. I know that there is only one order 2 automorphism of $\mathbb{Z}_q$ for $p=5,7$. How can I use this information to see that $D_{2q}$ and $\mathbb{Z}_{2q}$ are the only groups we can construct?

• Semidirect products are classified by the twisting automorphism. Since it is clear to you that the groups have to be semidirect products, and you know there are only $2$ automorphisms, you are done. – Cheerful Parsnip Mar 22 '18 at 18:50
• This is true for any odd prime $p$. – Lord Shark the Unknown Mar 22 '18 at 18:50
• @LordSharktheUnknown: True for any prime, odd or even :) – Steve D Mar 22 '18 at 18:59

This is because there are then just two homomorphisms from $\Bbb Z_2$ to $\textrm{Aut}(\Bbb Z_p)\cong\Bbb Z_p^*$. That is the trivial automorphism, and the one mapping $1$ to $-1$. These give the cyclic group and the dihedral groups of orders $2p$ respectively.

I suspect some people very new to group theory might want an answer to this so I'll give a possibly more full answer. I'll be assuming a little knowledge of group theory so feel free to ask me to expand:

Let $G$ be a group of order $2p$ for any prime $p$.

$G$ then has some element of order $p$, say $x$, and some element of order $2$, say $y$. Let $N=\langle x\rangle$ (the subgroup generated by $x$).

Since $[G:N]=2$, $N$ is normal in $G$, so $yxy^{-1}=x^i$ for some $i\in\{1,\ldots,p-1\}$.

Repeating we get $x=y^2xy^{-2}=yx^iy^{-1}=(yxy^{-1})^i=x^{i^2}$.

In particular $i^2\equiv 1$ (mod $p$) so $i\equiv\pm 1$ (mod $p$). If $i=1$ then $x$ and $y$ commute so $G\cong \mathbb{Z}_{2p}$. If $i=-1$ then $G\cong\langle x,y|x^p=y^2=1,yxy^{-1}=x^{-1}\rangle\cong D_{2p}$.