In mathematics, a **constructible polygon** is a regular polygon that can be constructed with compass and straightedge. For example, a regular pentagon is constructible with compass and straightedge while a regular heptagon is not. There are infinitely many constructible polygons, but only 31 with an odd number of sides are known.

Some regular polygons are easy to construct with compass and straightedge; others are not. The ancient Greek mathematicians knew how to construct a regular polygon with 3, 4, or 5 sides,^{[1]}^{: p. xi } and they knew how to construct a regular polygon with double the number of sides of a given regular polygon.^{[1]}^{: pp. 49–50 } This led to the question being posed: is it possible to construct *all* regular polygons with compass and straightedge? If not, which *n*-gons (that is, polygons with *n* edges) are constructible and which are not?

Carl Friedrich Gauss proved the constructibility of the regular 17-gon in 1796. Five years later, he developed the theory of Gaussian periods in his *Disquisitiones Arithmeticae*. This theory allowed him to formulate a sufficient condition for the constructibility of regular polygons. Gauss stated without proof that this condition was also necessary,^{[2]} but never published his proof. A full proof of necessity was given by Pierre Wantzel in 1837. The result is known as the **Gauss–Wantzel theorem**:

- A regular
*n*-gon can be constructed with compass and straightedge if and only if*n*is a power of 2 or the product of a power of 2 and any number of distinct Fermat primes.

A Fermat prime is a prime number of the form

In order to reduce a geometric problem to a problem of pure number theory, the proof uses the fact that a regular *n*-gon is constructible if and only if the cosine is a constructible number—that is, can be written in terms of the four basic arithmetic operations and the extraction of square roots. Equivalently, a regular *n*-gon is constructible if any root of the *n*th cyclotomic polynomial is constructible.

Restating the Gauss–Wantzel theorem:

- A regular
*n*-gon is constructible with straightedge and compass if and only if*n*= 2^{k}*p*_{1}*p*_{2}...*p*_{t}where*k*and*t*are non-negative integers, and the*p*_{i}'s (when*t*> 0) are distinct Fermat primes.

The five known Fermat primes are:

*F*_{0}= 3,*F*_{1}= 5,*F*_{2}= 17,*F*_{3}= 257, and*F*_{4}= 65537 (sequence A019434 in the OEIS).

Since there are 31 combinations of anywhere from one to five Fermat primes, there are 31 known constructible polygons with an odd number of sides.

The next twenty-eight Fermat numbers, *F*_{5} through *F*_{32}, are known to be composite.^{[3]}

Thus a regular *n*-gon is constructible if

*n*= 3, 4, 5, 6, 8, 10, 12, 15, 16, 17, 20, 24, 30, 32, 34, 40, 48, 51, 60, 64, 68, 80, 85, 96, 102, 120, 128, 136, 160, 170, 192, 204, 240, 255, 256, 257, 272, 320, 340, 384, 408, 480, 510, 512, 514, 544, 640, 680, 768, 771, 816, 960, 1020, 1024, 1028, 1088, 1280, 1285, 1360, 1536, 1542, 1632, 1920, 2040, 2048, ... (sequence A003401 in the OEIS),

while a regular *n*-gon is not constructible with compass and straightedge if

*n*= 7, 9, 11, 13, 14, 18, 19, 21, 22, 23, 25, 26, 27, 28, 29, 31, 33, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 65, 66, 67, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 81, 82, 83, 84, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97, 98, 99, 100, 101, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 121, 122, 123, 124, 125, 126, 127, ... (sequence A004169 in the OEIS).

Since there are 5 known Fermat primes, we know of 31 numbers that are products of distinct Fermat primes, and hence 31 constructible odd-sided regular polygons. These are 3, 5, 15, 17, 51, 85, 255, 257, 771, 1285, 3855, 4369, 13107, 21845, 65535, 65537, 196611, 327685, 983055, 1114129, 3342387, 5570645, 16711935, 16843009, 50529027, 84215045, 252645135, 286331153, 858993459, 1431655765, 4294967295 (sequence A045544 in the OEIS). As John Conway commented in *The Book of Numbers*, these numbers, when written in binary, are equal to the first 32 rows of the modulo-2 Pascal's triangle, minus the top row, which corresponds to a monogon. (Because of this, the 1s in such a list form an approximation to the Sierpiński triangle.) This pattern breaks down after this, as the next Fermat number is composite (4294967297 = 641 × 6700417), so the following rows do not correspond to constructible polygons. It is unknown whether any more Fermat primes exist, and it is therefore unknown how many odd-sided constructible regular polygons exist. In general, if there are *q* Fermat primes, then there are 2^{q}−1 odd-sided regular constructible polygons.

In the light of later work on Galois theory, the principles of these proofs have been clarified. It is straightforward to show from analytic geometry that constructible lengths must come from base lengths by the solution of some sequence of quadratic equations.^{[4]} In terms of field theory, such lengths must be contained in a field extension generated by a tower of quadratic extensions. It follows that a field generated by constructions will always have degree over the base field that is a power of two.

In the specific case of a regular *n*-gon, the question reduces to the question of constructing a length

- cos 2π/
*n*,

which is a trigonometric number and hence an algebraic number. This number lies in the *n*-th cyclotomic field — and in fact in its real subfield, which is a totally real field and a rational vector space of dimension

- ½ φ(
*n*),

where φ(*n*) is Euler's totient function. Wantzel's result comes down to a calculation showing that φ(*n*) is a power of 2 precisely in the cases specified.

As for the construction of Gauss, when the Galois group is a 2-group it follows that it has a sequence of subgroups of orders

- 1, 2, 4, 8, ...

that are nested, each in the next (a composition series, in group theory terminology), something simple to prove by induction in this case of an abelian group. Therefore, there are subfields nested inside the cyclotomic field, each of degree 2 over the one before. Generators for each such field can be written down by Gaussian period theory. For example, for *n* = 17 there is a period that is a sum of eight roots of unity, one that is a sum of four roots of unity, and one that is the sum of two, which is

- cos 2π/17 .

Each of those is a root of a quadratic equation in terms of the one before. Moreover, these equations have real rather than complex roots, so in principle can be solved by geometric construction: this is because the work all goes on inside a totally real field.

In this way the result of Gauss can be understood in current terms; for actual calculation of the equations to be solved, the periods can be squared and compared with the 'lower' periods, in a quite feasible algorithm.

Compass and straightedge constructions are known for all known constructible polygons. If *n* = *pq* with *p* = 2 or *p* and *q* coprime, an *n*-gon can be constructed from a *p*-gon and a *q*-gon.

- If
*p*= 2, draw a*q*-gon and bisect one of its central angles. From this, a 2*q*-gon can be constructed. - If
*p*> 2, inscribe a*p*-gon and a*q*-gon in the same circle in such a way that they share a vertex. Because*p*and*q*are coprime, there exists integers*a*and*b*such that*ap*+*bq*= 1. Then 2*a*π/*q*+ 2*b*π/*p*= 2π/*pq*. From this, a*pq*-gon can be constructed.

Thus one only has to find a compass and straightedge construction for *n*-gons where *n* is a Fermat prime.

- The construction for an equilateral triangle is simple and has been known since antiquity; see Equilateral triangle.
- Constructions for the regular pentagon were described both by Euclid (
*Elements*, ca. 300 BC), and by Ptolemy (*Almagest*, ca. 150 AD). - Although Gauss
*proved*that the regular 17-gon is constructible, he did not actually*show*how to do it. The first construction is due to Erchinger, a few years after Gauss' work. - The first explicit constructions of a regular 257-gon were given by Magnus Georg Paucker (1822)
^{[5]}and Friedrich Julius Richelot (1832).^{[6]} - A construction for a regular 65537-gon was first given by Johann Gustav Hermes (1894). The construction is very complex; Hermes spent 10 years completing the 200-page manuscript.
^{[7]}

From left to right, constructions of a 15-gon, 17-gon, 257-gon and 65537-gon. Only the first stage of the 65537-gon construction is shown; the constructions of the 15-gon, 17-gon, and 257-gon are given completely.

The concept of constructibility as discussed in this article applies specifically to compass and straightedge constructions. More constructions become possible if other tools are allowed. The so-called neusis constructions, for example, make use of a *marked* ruler. The constructions are a mathematical idealization and are assumed to be done exactly.

A regular polygon with *n* sides can be constructed with ruler, compass, and angle trisector if and only if where *r, s, k* ≥ 0 and where the *p*_{i} are distinct Pierpont primes greater than 3 (primes of the form ^{[8]}^{: Thm. 2 } These polygons are exactly the regular polygons that can be constructed with Conic section, and the regular polygons that can be constructed with paper folding. The first numbers of sides of these polygons are:

- 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24, 26, 27, 28, 30, 32, 34, 35, 36, 37, 38, 39, 40, 42, 45, 48, 51, 52, 54, 56, 57, 60, 63, 64, 65, 68, 70, 72, 73, 74, 76, 78, 80, 81, 84, 85, 90, 91, 95, 96, 97, 102, 104, 105, 108, 109, 111, 112, 114, 117, 119, 120, 126, 128, 130, 133, 135, 136, 140, 144, 146, 148, 152, 153, 156, 160, 162, 163, 168, 170, 171, 180, 182, 185, 189, 190, 192, 193, 194, 195, 204, 208, 210, 216, 218, 219, 221, 222, 224, 228, 234, 238, 240, 243, 247, 252, 255, 256, 257, 259, 260, 266, 270, 272, 273, 280, 285, 288, 291, 292, 296, ... (sequence A122254 in the OEIS)