This article includes a list of references, but its sources remain unclear because it has insufficient inline citations. (April 2015) (Learn how and when to remove this template message)

In mathematics, a dihedral group is the group of symmetries of a regular polygon,^{[1]}^{[2]} which includes rotations and reflections. Dihedral groups are among the simplest examples of finite groups, and they play an important role in group theory, geometry, and chemistry.
The notation for the dihedral group differs in geometry and abstract algebra. In geometry, D_{n} or Dih_{n} refers to the symmetries of the ngon, a group of order 2n. In abstract algebra, D_{2n} refers to this same dihedral group.^{[3]} The geometric convention is used in this article.
A regular polygon with sides has different symmetries: rotational symmetries and reflection symmetries. Usually, we take >=3 here. The associated rotations and reflections make up the dihedral group . If is odd, each axis of symmetry connects the midpoint of one side to the opposite vertex. If is even, there are n/2 axes of symmetry connecting the midpoints of opposite sides and axes of symmetry connecting opposite vertices. In either case, there are axes of symmetry and elements in the symmetry group. Reflecting in one axis of symmetry followed by reflecting in another axis of symmetry produces a rotation through twice the angle between the axes.
The following picture shows the effect of the sixteen elements of on a stop sign:
The first row shows the effect of the eight rotations, and the second row shows the effect of the eight reflections, in each case acting on the stop sign with the orientation as shown at the top left.
As with any geometric object, the composition of two symmetries of a regular polygon is again a symmetry of this object. With composition of symmetries to produce another as the binary operation, this gives the symmetries of a polygon the algebraic structure of a finite group.
The following Cayley table shows the effect of composition in the group D_{3} (the symmetries of an equilateral triangle). r_{0} denotes the identity; r_{1} and r_{2} denote counterclockwise rotations by 120° and 240° respectively, and s_{0}, s_{1} and s_{2} denote reflections across the three lines shown in the adjacent picture.
r_{0}  r_{1}  r_{2}  s_{0}  s_{1}  s_{2}  

r_{0}  r_{0}  r_{1}  r_{2}  s_{0}  s_{1}  s_{2} 
r_{1}  r_{1}  r_{2}  r_{0}  s_{1}  s_{2}  s_{0} 
r_{2}  r_{2}  r_{0}  r_{1}  s_{2}  s_{0}  s_{1} 
s_{0}  s_{0}  s_{2}  s_{1}  r_{0}  r_{2}  r_{1} 
s_{1}  s_{1}  s_{0}  s_{2}  r_{1}  r_{0}  r_{2} 
s_{2}  s_{2}  s_{1}  s_{0}  r_{2}  r_{1}  r_{0} 
For example, , because the reflection s_{1} followed by the reflection s_{2} results in a rotation of 120°. The order of elements denoting the composition is right to left, reflecting the convention that the element acts on the expression to its right. The composition operation is not commutative.
In general, the group D_{n} has elements r_{0}, ..., r_{n1} and s_{0}, ..., s_{n1}, with composition given by the following formulae:
In all cases, addition and subtraction of subscripts are to be performed using modular arithmetic with modulus n.
If we center the regular polygon at the origin, then elements of the dihedral group act as linear transformations of the plane. This lets us represent elements of D_{n} as matrices, with composition being matrix multiplication. This is an example of a (2dimensional) group representation.
For example, the elements of the group D_{4} can be represented by the following eight matrices:
In general, the matrices for elements of D_{n} have the following form:
r_{k} is a rotation matrix, expressing a counterclockwise rotation through an angle of . s_{k} is a reflection across a line that makes an angle of with the xaxis.
Further equivalent definitions of D_{n} are:
D_{1} is isomorphic to Z_{2}, the cyclic group of order 2.
D_{2} is isomorphic to K_{4}, the Klein fourgroup.
D_{1} and D_{2} are exceptional in that:
The cycle graphs of dihedral groups consist of an nelement cycle and n 2element cycles. The dark vertex in the cycle graphs below of various dihedral groups represents the identity element, and the other vertices are the other elements of the group. A cycle consists of successive powers of either of the elements connected to the identity element.
D_{1} = Z_{2}  D_{2} = Z_{2}^{2} = K_{4}  D_{3}  D_{4}  D_{5} 

D_{6} = D_{3} × Z_{2}  D_{7}  D_{8}  D_{9}  D_{10} = D_{5} × Z_{2} 
An example of abstract group D_{n}, and a common way to visualize it, is the group of Euclidean plane isometries which keep the origin fixed. These groups form one of the two series of discrete point groups in two dimensions. D_{n} consists of n rotations of multiples of 360°/n about the origin, and reflections across n lines through the origin, making angles of multiples of 180°/n with each other. This is the symmetry group of a regular polygon with n sides (for n >= 3; this extends to the cases n = 1 and n = 2 where we have a plane with respectively a point offset from the "center" of the "1gon" and a "2gon" or line segment).
D_{n} is generated by a rotation r of order n and a reflection s of order 2 such that
In geometric terms: in the mirror a rotation looks like an inverse rotation.
In terms of complex numbers: multiplication by and complex conjugation.
In matrix form, by setting
and defining and for we can write the product rules for D_{n} as
(Compare coordinate rotations and reflections.)
The dihedral group D_{2} is generated by the rotation r of 180 degrees, and the reflection s across the xaxis. The elements of D_{2} can then be represented as {e, r, s, rs}, where e is the identity or null transformation and rs is the reflection across the yaxis.
D_{2} is isomorphic to the Klein fourgroup.
For n>2 the operations of rotation and reflection in general do not commute and D_{n} is not abelian; for example, in D_{4}, a rotation of 90 degrees followed by a reflection yields a different result from a reflection followed by a rotation of 90 degrees.
Thus, beyond their obvious application to problems of symmetry in the plane, these groups are among the simplest examples of nonabelian groups, and as such arise frequently as easy counterexamples to theorems which are restricted to abelian groups.
The 2n elements of D_{n} can be written as e, r, r^{2}, ... , r^{n1}, s, r s, r^{2}s, ... , r^{n1}s. The first n listed elements are rotations and the remaining n elements are axisreflections (all of which have order 2). The product of two rotations or two reflections is a rotation; the product of a rotation and a reflection is a reflection.
So far, we have considered D_{n} to be a subgroup of O(2), i.e. the group of rotations (about the origin) and reflections (across axes through the origin) of the plane. However, notation D_{n} is also used for a subgroup of SO(3) which is also of abstract group type D_{n}: the proper symmetry group of a regular polygon embedded in threedimensional space (if n >= 3). Such a figure may be considered as a degenerate regular solid with its face counted twice. Therefore, it is also called a dihedron (Greek: solid with two faces), which explains the name dihedral group (in analogy to tetrahedral, octahedral and icosahedral group, referring to the proper symmetry groups of a regular tetrahedron, octahedron, and icosahedron respectively).
2D D_{6} symmetry  The Red Star of David
2D D_{24} symmetry  Ashoka Chakra, as depicted on the National flag of the Republic of India.
The properties of the dihedral groups D_{n} with n >= 3 depend on whether n is even or odd. For example, the center of D_{n} consists only of the identity if n is odd, but if n is even the center has two elements, namely the identity and the element r^{n/2} (with D_{n} as a subgroup of O(2), this is inversion; since it is scalar multiplication by 1, it is clear that it commutes with any linear transformation).
In the case of 2D isometries, this corresponds to adding inversion, giving rotations and mirrors in between the existing ones.
For n twice an odd number, the abstract group D_{n} is isomorphic with the direct product of D_{n / 2} and Z_{2}. Generally, if m divides n, then D_{n} has n/m subgroups of type D_{m}, and one subgroup Z_{m}. Therefore, the total number of subgroups of D_{n} (n >= 1), is equal to d(n) + ?(n), where d(n) is the number of positive divisors of n and ?(n) is the sum of the positive divisors of n. See list of small groups for the cases n
The dihedral group of order 8 (D_{4}) is the smallest example of a group that is not a Tgroup. Any of its two Klein fourgroup subgroups (which are normal in D_{4}) has as normal subgroup order2 subgroups generated by a reflection (flip) in D_{4}, but these subgroups are not normal in D_{4}.
All the reflections are conjugate to each other in case n is odd, but they fall into two conjugacy classes if n is even. If we think of the isometries of a regular ngon: for odd n there are rotations in the group between every pair of mirrors, while for even n only half of the mirrors can be reached from one by these rotations. Geometrically, in an odd polygon every axis of symmetry passes through a vertex and a side, while in an even polygon there are two sets of axes, each corresponding to a conjugacy class: those that pass through two vertices and those that pass through two sides.
Algebraically, this is an instance of the conjugate Sylow theorem (for n odd): for n odd, each reflection, together with the identity, form a subgroup of order 2, which is a Sylow 2subgroup ( is the maximum power of 2 dividing ), while for n even, these order 2 subgroups are not Sylow subgroups because 4 (a higher power of 2) divides the order of the group.
For n even there is instead an outer automorphism interchanging the two types of reflections (properly, a class of outer automorphisms, which are all conjugate by an inner automorphism).
The automorphism group of D_{n} is isomorphic to the holomorph of Z/nZ, i.e., to and has order n?(n), where ? is Euler's totient function, the number of k in coprime to n.
It can be understood in terms of the generators of a reflection and an elementary rotation (rotation by k(2?/n), for k coprime to n); which automorphisms are inner and outer depends on the parity of n.
D_{9} has 18 inner automorphisms. As 2D isometry group D_{9}, the group has mirrors at 20° intervals. The 18 inner automorphisms provide rotation of the mirrors by multiples of 20°, and reflections. As isometry group these are all automorphisms. As abstract group there are in addition to these, 36 outer automorphisms; e.g., multiplying angles of rotation by 2.
D_{10} has 10 inner automorphisms. As 2D isometry group D_{10}, the group has mirrors at 18° intervals. The 10 inner automorphisms provide rotation of the mirrors by multiples of 36°, and reflections. As isometry group there are 10 more automorphisms; they are conjugates by isometries outside the group, rotating the mirrors 18° with respect to the inner automorphisms. As abstract group there are in addition to these 10 inner and 10 outer automorphisms, 20 more outer automorphisms; e.g., multiplying rotations by 3.
Compare the values 6 and 4 for Euler's totient function, the multiplicative group of integers modulo n for n = 9 and 10, respectively. This triples and doubles the number of automorphisms compared with the two automorphisms as isometries (keeping the order of the rotations the same or reversing the order).
The only values of n for which ?(n) = 2 are 3, 4, and 6, and consequently, there are only three dihedral groups that are isomorphic to their own automorphism groups, namely D_{3} (order 6), D_{4} (order 8), and D_{6} (order 12).^{[4]}^{[5]}^{[6]}
The inner automorphism group of D_{n} is isomorphic to:^{[7]}
There are several important generalizations of the dihedral groups:
Corollary 7.3. Aut(D_{n}) = D_{n} if and only if ?(n) = 2