Nonabelian semidirect products of order $pq$?

Given $p,q$, with $p<q$ and $p|(q-1)$, there exist a non-abelian group of order $pq$ and it is unique up to isomorphism:

If $G$ is a non-abelian group, $|G|=pq$, then subgroup $H$ of order $q$ is normal (by Sylow theorem); let $K$ be its subgroup of order $p$. Then $HK\leq G$ (since $H\triangleleft G$) and $HK=G$ (since $|KH|=|H|.|K|/|H\cap K|=pq=|G|$). So,

$H\triangleleft G$, $K\leq G$, $HK=G$, $H\cap K=(1)$ $\implies G\cong H \rtimes K$.

Now, to get all possible (non-isomorphic) semidirect products $H$ by $K$, we have to consider homomorphisms $\phi \colon K \rightarrow Aut(H)$.

Since $K\cong \mathbb{Z}/p$, $H\cong \mathbb{Z}/q$, we know that $Aut(H)\cong \mathbb{Z}/(q-1)$.

As $p|(q-1)$, and $Aut(H)$ is cyclic group of order $q-1$, it contains unique subgroup of order $p$. So for any two non-trivial homomorphisms $\phi, \psi \colon K\rightarrow Aut(H)$, we have $\phi(K)=\psi(K)$, and $K$ is cyclic. Also, these homomorphisms are injective, since $K$ is of prime order. (Note that trivial homomorphisms will give direct product of $H$ by $K$, so $G\cong H\times K$, abelian group of order $pq$).

Therefore by following theorem semidirect products of $H$ by $K$ w.r.t. $\phi$ and $\psi$ are isomorphic:

If $K$ is a cyclic group and $\phi,\psi\colon K\rightarrow Aut(H)$ are two injective homomorphisms such that $\phi(K)=\psi(K)$, then these two homomorphisms give isomorphic semi-direct products of $H$ by $K$ (Alperin and Bell- Groups and Representations).

Now it is clear the existance and uniqueness (up to isomorphism) of non-abelian groups of order $pq$.


I'm going to use a few facts from group theory, which are certainly in Lang. Let me know if I can clear anything up!

It should be clear that a non-trivial homomorphism $$ \mathbf Z/p\mathbf Z \to \operatorname{Aut}(\mathbf Z/q\mathbf Z) $$ will answer your question in the affirmative. You could use such a map to finish your calculations, since it will necessarily be an injection and so the class of $-1$ will map to an automorphism which is not the identity, which must move $1$.

Recall that $\operatorname{Aut}(\mathbf Z/q\mathbf Z)$ is isomorphic to $(\mathbf Z/q\mathbf Z)^*$. Since $q$ is prime, the latter group is cyclic; we can identify it with $\mathbf Z/(q - 1)\mathbf Z$ if we choose a primitive root mod $q$. Now, to give a non-trivial homomorphism $\mathbf Z/p\mathbf Z \to \mathbf Z/(q - 1)\mathbf Z$ is to give an element of $\mathbf Z/(q - 1)\mathbf Z$ having period $p$. I claim that you can find $p - 1$ such elements if $p$ divides $q - 1$.

In your example, $3$ is a primitive root mod $7$ and we can send $1 \in \mathbf Z/3\mathbf Z$ to the automorphism of $\mathbf Z/7\mathbf Z$ given by $a \mapsto 9a = 2a$.