Semidirect product (source code)

= Semidirect product
{wiki}

Given <groups> $N,H$ and a <group homomorphism> $\phi:H\to\operatorname{Aut}(N)$, their <semidirect product> $N\rtimes_\phi H$ is the <set> $N\times H$ with multiplication
$$
(n,h)(n',h')=(n\phi(h)(n'),hh').
$$
It contains $N$ as a <normal subgroup> and $H$ as a complementary <subgroup>; the action specifies how the two factors fail to commute.

For example, the <dihedral group> of a regular $n$-gon is $C_n\rtimes C_2$, where the reflection acts on rotations by inversion. If $\phi$ is trivial, the construction is the ordinary <direct product of groups>. Specifying the action matters: the same two factor groups can yield different groups.