Semidirect product

In abstract algebra, a semidirect product describes a particular way in which a group can be put together from two subgroups.
Contents 
Some equivalent definitions
Let G be a group, N a normal subgroup of G and H a subgroup of G. The following statements are equivalent:
 G = NH and N ∩ H = {e} (with e being the identity element of G)
 G = HN and N ∩ H = {e}
 Every element of G can be written in one and only one way as a product of an element of N and an element of H
 Every element of G can be written in one and only one way as a product of an element of H and an element of N
 The natural embedding H → G, composed with the natural projection G → G/N, yields an isomorphism between H and G/N
 There exists a homomorphism G → H which is the identity on H and whose kernel is N
If one (and therefore all) of these statements hold, we say that G is a semidirect product of N and H, or that G splits over N, and we write G = N⋉H.
Elementary facts and caveats
If G is the semidirect product of the normal subgroup N and the subgroup H, and both N and H are finite, then the order of G equals the product of the orders of N and H.
Note that, as opposed to the case with the direct product, a semidirect product is not, in general, unique; if G and G' are two groups which both contain N as a normal subgroup and H as a subgroup, and both are a semidirect product of N and H, then it does not follow that G and G' are isomorphic.
Outer semidirect products
If G is a semidirect product of N and H, then the map φ : H → Aut(N) (where Aut(N) denotes the group of all automorphisms of N) defined by φ(h)(n) = hnh^{–1} for all h in H and n in N is a group homomorphism. It turns out that N, H and φ together determine G up to isomorphism, as we will show next.
Given any two groups N and H (not necessarily subgroups of a given group) and a group homomorphism φ : H → Aut(N), we define a new group N ⋉_{φ}H, the semidirect product of N and H with respect to φ as follows: the underlying set is the cartesian product N × H, and the group operation * is given by
 (n_{1}, h_{1}) * (n_{2}, h_{2}) = (n_{1} φ(h_{1})(n_{2}), h_{1} h_{2})
for all n_{1}, n_{2} in N and h_{1}, h_{2} in H. This defines indeed a group; its identity element is (e_{N}, e_{H}) and the inverse of the element (n, h) is (φ(h^{–1})(n^{–1}), h^{–1}). N × {e_{H}} is a normal subgroup isomorphic to N, {e_{N}} × H is a subgroup isomorphic to H, and the group is a semidirect product of those two subgroups in the sense given above.
Suppose now conversely that we are given an internal semidirect product as defined above, i.e. a group G with a normal subgroup N, a subgroup H, and such that every element g of G may be written uniquely in the form g=nh where n lies in N and h lies in H. Let φ : H→Aut(N) be the homomorphism
 φ(h)(n)=hnh^{–1}.
Then G is isomorphic to the outer semidirect product N⋉_{φ}H; the isomorphism sends the product nh to the tuple (n,h). In G, we have the rule
 (n_{1}h_{1})(n_{2}h_{2}) = n_{1}(h_{1}n_{2}h_{1}^{–1})(h_{1}h_{2})
and this is the deeper reason for the above definition of the outer semidirect product, and an easy way to memorize it.
A version of the splitting lemma for groups states that a group G is isomorphic to a semidirect product of the two groups N and H if and only if there exists a short exact sequence
 <math> 0\longrightarrow N \longrightarrow^{\!\!\!\!\!\!\!\!\!u}\ \, G \longrightarrow^{\!\!\!\!\!\!\!\!\!v}\ \, H \longrightarrow 0<math>
and a group homomorphism r : H → G such that v o r = id_{H}, the identity map on H. In this case, φ : H → Aut(N) is given by
 φ(h)(n) = u^{–1}(r(h)u(n)r(h^{–1})).
Examples
The dihedral group D_{n} with 2n elements is isomorphic to a semidirect product of the cyclic groups C_{n} and C_{2}. Here, the nonidentity element of C_{2} acts on C_{n} by inverting elements; this is an automorphisms since C_{n} is abelian.
The group of all rigid motions of the plane (maps f : R^{2} → R^{2} such that the Euclidean distance between x and y equals the distance between f(x) and f(y) for all x and y in R^{2}) is isomorphic to a semidirect product of the abelian group R^{2} (which describes translations) and the group O(2) of orthogonal 2×2 matrices (which describes rotations and reflections). Every orthogonal matrix acts as an automorphism on R^{2} by matrix multiplication.
The group O(n) of all orthogonal real n×n matrices (intuitively the set of all rotations and reflections of ndimensional space) is isomorphic to a semidirect product of the group SO(n) (consisting of all orthogonal matrices with determinant 1, intuitively the rotations of ndimensional space) and C_{2}. If we represent C_{2} as the multiplicative group of matrices {I, R}, where R is a reflection of n dimensional space (i.e. an orthogonal matrix with determinant –1), then φ : C_{2} → Aut(SO(n)) is given by φ(H)(N) = H N H^{–1} for all H in C_{2} and N in SO(n).
Relation to direct products
Suppose G is a semidirect product of the normal subgroup N and the subgroup H. If H is also normal in G, or equivalently, if there exists a homomorphism G → N which is the identity on N, then G is the direct product of N and H.
The direct product of two groups N and H can be thought of as the outer semidirect product of N and H with respect to φ(h) = id_{N} for all h in H.
Note that in a direct product, the order of the factors is not important, since N × H is isomorphic to H × N. This is not the case for semidirect products, as the two factors play different roles.
Generalizations
The construction of semidirect products can be pushed much further. There is a version in ring theory, the crossed product of rings. This is seen naturally as soon as one constructs a group ring for a semidirect product of groups. There is also the semidirect sum of Lie algebras. Given a group action on a topological space, there is a corresponding crossed product which will in general be noncommutative even if the group is abelian. This kind of ring can play the role of the space of orbits of the group action, in cases where that space cannot be approached by conventional topological techniques  for example in the work of Alain Connes (cf. noncommutative geometry).
There are also farreaching generalisations in category theory. They show how to construct fibred categories from indexed categories. This is an abstract form of the outer semidirect product construction.