Let’s talk about semi-direct products! We’ll talk about the categorical significance of semi-direct products and some simple examples. But first, just what is a semi-direct product?

Take a group $G$ with a structure-respecting group action of $G$ on a group $H$. In other words, we have a homomorphism $\phi : G \rightarrow \text{Aut}(H)$. Contrast this with a group action of $G$ on $H$ which does not respect the group structure of $H$, or in other terms a homomorphism $G \rightarrow \text{Bij}(H)$. From $\phi$ we can form a group $H \rtimes_{\phi} G$. We write $H \rtimes G$ when the context is clear. As a set this is $H \times G$, but we put an operation on it which is distinct from the usual group product. Instead, we define $(h, g) (h', g') = (h \phi(g)(h'), g g')$. This group is called the semi-direct product of $G$ and $H$. Note that it is dependent on the homomorphism $\phi$. If $G$ acts on $H$ trivially, then we get the ordinary direct product $G \times H$, since $(h, g)(h', g') = (h \phi(g)(h') , g g') = (h h', g g')$. But in general, the semi-direct product is ‘twisted’ in a way, and certainly not isomorphic to $G \times H$.

Let’s check that this is a group. To see the operation is associative, take $g, g', g'' \in G$ and $h, h', h'' \in H$. Then
$((h , g) (h', g'))(h'', g'') = (h \phi(g)(h'), g g') (h'', g'') = (h \phi(g)(h') \phi(g g') (h'') , g g' g'' )$
and
$(h , g) ((h', g')(h'', g'')) = (h, g) (h'' \phi(g')(h''), g' g'') = (h \phi(g) (h'' \phi(g')(h'')), g g' g'')$
And the RHS of the two equations is seen to be equal since $\phi$ is a homomorphism and $\phi(g)$ is a homomorphism. $(1, 1)$ is an identity for $H \rtimes G$: $(1, 1) (h, g) = (\phi(1)(h), g) = (h, g)$ and $(h, g)(1, 1) = (h, g)$. And lastly we need an inverse for $(h, g)$. It will have to be of the form $(h, g)(x, g^{-1})$ for some $x \in H$. We need $h \phi(g)(x) = e$, so that we can take $x = \phi(g^{-1})(h^{-1})$ and that will do. But we should check that $(x, g^{-1})(h, g) = (1, 1)$: $(x, g^{-1})(h, g) = (x \phi(g^{-1})(h), 1) = (\phi(g^{-1})(h^{-1}) \phi(g^{-1})(h), 1) = (1, 1)$. So $H \rtimes G$ is a group.

Let’s look at a few examples. Take an abelian group $A$. $\mathbb{Z} / 2 \mathbb{Z}$ acts on $A$ by $\overline{1} \cdot a = a^{-1}$ and $\overline{0} \cdot a = a$. We need to require that $A$ be abelian, so that $\overline{1} \cdot (ab) =(ab)^{-1} = b^{-1} a^{-1} = a^{-1} b^{-1} = (\overline{1} \cdot a) (\overline{1} \cdot b)$. Under this action, we get a group $A \rtimes \mathbb{Z} / 2 \mathbb{Z}$. We can describe it with generators and relations as $(A * \mathbb{Z} / 2 \mathbb{Z}) / K$ where $K$ is the subgroup generated by the relations $\{ at = ta^{-1} : a \in A \}$. When $A = \mathbb{Z} /n \mathbb{Z}$, we get $D_{n}$.

Another interesting example: $\mathbb{R}^n$ and $O_n$. For $x \in \mathbb{R}^n$ and $M \in O_n$, put $M \cdot x = Mx$. $\mathbb{R}^n \rtimes O_n \cong E(n)$, the Euclidian group.

It is not hard to see that $H \rtimes G \cong (H * G)/ K$ where $K$ is the smallest normal subgroup containing the relations $g h = \phi(g) (h) g$. Take the homomorphism $H * G \rightarrow H \rtimes G$. It’s surjective, and it can be seen to have kernel $K$. This gives us a way of expressing the semi-direct product as a colimit, but it’s not the nicest categorical expression at hand. To see the nicer property, let $G \uparrow \text{Grp}$ be the category of groups under $G$. It’s objects are homomorphisms $\phi : G \rightarrow H$, and its morphisms $\phi \rightarrow \psi$ are morphisms $\alpha : \text{Cod} (\phi) \rightarrow \text{Cod}(\psi)$ such that $\alpha \circ \phi = \psi$. We also have the category of $G$-groups, $G \text{-Grp}$. Its objects are groups $H$ with morphisms $G \rightarrow \text{Aut}(H)$, and its morphisms are $G$-equivariant homomorphisms.

We can think of the objects in $G \uparrow \text{Grp}$ as special types of $G$-groups. Every morphism $\phi: G \rightarrow H$ induces a $G$-group, which consists of $H$ with the $G$-action $g \cdot h = \phi(g) h \phi(g)^{-1}$. If we replace an object $\phi : G \rightarrow H$ under $G$ with its corresponding $G \text{-Grp}$ $\psi : G \rightarrow \text{Aut}(H)$, then we lose information about the homomorphism, and it can’t be recovered. But there is a “best approximation”, namely $G \rightarrow H \rtimes_{\psi} G$!

In categorical terms, we have a forgetful functor $F : G \uparrow \text{Grp} \rightarrow G \text{-Grp}$ whose left adjoint $- \rtimes G : G \text{-Grp} \rightarrow G \uparrow \text{Grp}$ sends objects $\phi : G \rightarrow \text{Aut}(H)$ to objects $H \rtimes_{\phi} G$. A morphism $H \rightarrow H'$ under $G$ is sent to that same morphism in $G \text{-Grp}$, and a $G$-equivariant homomorphism $\alpha : H \rightarrow H'$ is sent to the morphism $\alpha : H \rtimes G \rightarrow H' \rtimes G$ where $(h, g) \mapsto (\alpha(h), g)$.

To see that this is actually an adjoint relationship, take a $G$-group $H$ and set a map $\eta_H : H \rightarrow H \rtimes G$ where $h \mapsto (h, 1)$. We’ll check the unit definition of an adjunction: for each object $G \stackrel{\phi}{\rightarrow} K$ in $G \uparrow \text{Grp}$ and each morphism $\alpha : H \rightarrow F(K)$, there is a unique morphism $\beta: H \rtimes G \rightarrow K$ such that $F(\beta) \circ \eta_H = \alpha$.

Take an object $G \stackrel{\phi}{\rightarrow} K$ and a $G$-equivariant homomorphism $\alpha : H \rightarrow F(K)$. We must set $\beta : H \rtimes G \rightarrow K$ where $\beta(h, 1) = \alpha(h)$ and $\beta(1, g) = \phi(g)$. This gives $\beta(h, g) = \alpha(h, 1)\phi(1, g)$. Taking $h, h' \in H$ and $g, g' \in G$. Then
$\alpha(h \phi(g)(h')) \phi(gg') = \alpha( h) \alpha(\phi(g)(h')) \phi(g) \phi(g') = \alpha (h) \phi(g) \alpha(h') \phi(g)^{-1} \phi(g) \phi(g') = \alpha(h) \phi(g) \alpha(h') \alpha(h') \phi(g')$
As desired.

There is a nice characterization of which objects $G \rightarrow H$ in $G \uparrow H$ are isomorphic in $G \uparrow \text{Grp}$ to $G \rightarrow K \rtimes G$ for some $G$-group $K$. Recall that retract of a morphism $G \rightarrow H$ is a morphism $H \rightarrow G$ such that $G \rightarrow H \rightarrow G$ is the identity. A morphism $G \rightarrow H$ is isomorphic in $G \uparrow \text{Grp}$ to $G \rightarrow K \rtimes G$ for some $G$-group $K$ if and only if it has a retract. For a $G$-group $K$, it is clear that the composition $G \stackrel{\phi}{ \rightarrow} K \rtimes G \stackrel{\psi}{\rightarrow} G$, where $\phi(g)= (1, g)$, and $\psi(1, g) = g$, is the identity. Conversely, suppose we have a morphism $G \rightarrow H$ with retract $\phi : H \rightarrow G$. Let $K = \ker(\phi)$. Since $K$ is normal, the $G$-group on $H$ where $h \mapsto \phi(g) h \phi(g)^{-1}$ induces a $G$-group on $K$. The following diagram commutes, where $\iota : K \rightarrow F(H)$ is the inclusion map:
Note that $\iota$ is $G$-equivariant by the construction of the action of $G$ on $K$. Applying the adjoint correspondence, we get a commutative diagram in $G \uparrow \text{Grp}$:
Examination of the rows reveals that they are in fact exact sequences. That $\alpha$ in the above diagram is an isomorphism follows from the 5-lemma. N.B. the 5-lemma is usually applied in the context of abelian groups or $R$-modules – or an abelian category, using the Mitchell’s embedding theorem. One can check, however, that the usual diagram chase works here, however. Thus we have an isomorphism $K \rtimes G \rightarrow H$ in $G \uparrow \text{Grp}$.

Exercise: This observation also allows for a nice internal characterization of a semi-direct product. Suppose that $G$ and $N$ are subgroups of a group $H$ such that (i) $NG = H$, (ii) $N \cap G = \{ e \}$, and (iii) $N$ is normal. Show that $H / N \cong G$, and that there is a section $H / N \rightarrow H$. What about the converse?