Dihedral group:D8

Definition by presentation
The dihedral group $$D_8$$, sometimes called $$D_4$$, also called the of order eight or the dihedral group of degree four (since its natural action is on four elements), is defined by the following presentation, with $$e$$ denoting the identity element:

$$\langle x,a \mid a^4 = x^2 = e, xax^{-1} = a^{-1}\rangle$$

Here, the element $$a$$ is termed the rotation or the generator of the cyclic piece and $$x$$ is termed the reflection.

Geometric definition
The dihedral group $$D_8$$ (also called $$D_4$$) is defined as the group of all symmetries of the square (the regular 4-gon). This has a cyclic subgroup comprising rotations (which is the cyclic subgroup generated by $$a$$) and has four reflections each being an involution: reflections about lines joining midpoints of opposite sides, and reflections about diagonals.

Definition as a permutation group
The group is (up to isomorphism) the subgroup of the symmetric group on $$\{ 1,2,3,4 \}$$ given by:

$$\! \{, (1,2,3,4), (1,3)(2,4), (1,4,3,2), (1,3), (2,4), (1,4)(2,3), (1,2)(3,4) \}$$

This can be related to the geometric definition by thinking of $$1,2,3,4$$ as the vertices of the square and considering an element of $$D_8$$ in terms of its induced action on the vertices. It relates to the presentation via setting $$a = (1,2,3,4)$$ and $$x = (1,3)$$.

Multiplication table
Here, $$e$$ denotes the identity element, $$a$$ is an element of order 4, and $$x$$ is an element of order two that isn't equal to $$a^2$$, as in the above presentation.

Other definitions
The dihedral group can be described in the following ways:


 * 1) The dihedral group of order eight.
 * 2) The generalized dihedral group corresponding to the cyclic group of order four.
 * 3) The holomorph of the cyclic group of order four.
 * 4) The external wreath product of the cyclic group of order two with the cyclic group of order two, acting via the regular action.
 * 5) The $$2$$-Sylow subgroup of the symmetric group on four letters.
 * 6) The $$2$$-Sylow subgroup of the symmetric group on five letters.
 * 7) The $$2$$-Sylow subgroup of the alternating group on six letters.
 * 8) The member of family::unitriangular matrix group of degree three $$UT(3,2)$$ over field:F2, $$2$$-Sylow subgroup of PSL(3,2).
 * 9) The member of family::extraspecial group of order $$2^3$$ and type '+'.

Elements
Below is the conjugacy and automorphism class structure:

Smallest of its kind

 * This is the unique non-T-group of smallest order, i.e., the unique smallest example of a group in which normality is not transitive.
 * This is a non-abelian nilpotent group of smallest order, though not the only one. The other such group is the quaternion group.

Different from others of the same order

 * It is the only group of its order that is isomorphic to its automorphism group.
 * It is the only group of its order that is not a T-group.
 * It is the only group of its order having two Klein four-subgroups. In particular, it gives an example of a situation where the number of elementary abelian subgroups of order $$p^2$$ is neither zero nor $$1$$ modulo $$p$$. Contrast this with the case of odd $$p$$, where we have the congruence condition on number of elementary abelian subgroups of prime-square order for odd prime.

Description by presentation
Here is the code:

gap> F := FreeGroup(2);; gap> G := F/[F.1^4, F.2^2, F.2 * F.1 * F.2 * F.1];  gap> IdGroup(G); [ 8, 3 ]

The group $$G$$ constructed here is the dihedral group of order $$8$$. The first generator $$F.1$$ maps to the rotation element of order four and the second generator $$F.2$$ maps to a reflection element of order two.

Long descriptions
It can be described as the holomorph of the cyclic group of order four. For this, first define $$C$$ to be the cyclic group of order four (using CyclicGroup), and then use SemidirectProduct and AutomorphismGroup:

C := CyclicGroup(4); G := SemidirectProduct(AutomorphismGroup(C),C);

Here, $$G$$ is the dihedral group of order eight. We can also construct it as a semidirect product of the Klein four-group and an automorphism of order two.

K := DirectProduct(CyclicGroup(2),CyclicGroup(2)); A := AutomorphismGroup(K); S := SylowSubgroup(A,2); G := SemidirectProduct(S,K);

Then, $$G$$ is isomorphic to the dihedral group of order eight.

GAP verification
Below is a GAP implementation verifying the various function values and group properties as stated in this page. Before beginning, set G := DihedralGroup(8); or any equivalent way of setting $$G$$ to be dihedral of order eight.

gap> IdGroup(G); [ 8, 3 ] gap> Order(G); 8 gap> Exponent(G); 4 gap> NilpotencyClassOfGroup(G); 2

More:

gap> DerivedLength(G); 2 gap> FrattiniLength(G); 2 gap> Rank(G); 2 gap> SubgroupRank(G); 2 gap> RankAsPGroup(G); 2 gap> NormalRank(G); 2 gap> CharacteristicRank(G); 1 gap> Length(ConjugacyClasses(G)); 5 gap> Length(RationalClasses(G)); 5 gap> Length(Subgroups(G)); 10 gap> Length(ConjugacyClassesSubgroups(G)); 8 gap> Length(NormalSubgroups(G)); 6 gap> Length(CharacteristicSubgroups(G)); 4