Computation

Which polygons can be drawn

Three sides yes, seven no, seventeen yes. The list of constructible regular polygons is neither everything nor almost nothing, and the pattern in it is a fact about which numbers are one less than a power of two.

Worth reading first: Every step is a square root.

On 30 March 1796, a nineteen-year-old wrote in his diary that he had constructed a regular seventeen-sided polygon with straightedge and compass. Nobody had drawn a new regular polygon in two thousand years.

Which regular polygons a compass and straightedge can draw, up to 100A grid of the integers with the constructible ones filled in, each verdict computed two independent ways.3 · 4 · 5 · 6 · 8 · 10 · 12 · 15 · 16 · 17 · 20 · 24 · …3φ24φ25φ46φ27φ68φ49φ610φ411φ1012φ413φ1214φ615φ816φ817φ1618φ619φ1820φ821φ1222φ1023φ2224φ825φ2026φ1227φ1828φ1229φ2830φ831φ3032φ1633φ2034φ1635φ2436φ1237φ3638φ1839φ2440φ1641φ4042φ1243φ4244φ2045φ2446φ2247φ4648φ1649φ4250φ2051φ3252φ2453φ5254φ1855φ4056φ2457φ3658φ2859φ5860φ1661φ6062φ3063φ3664φ3265φ4866φ2067φ6668φ3269φ4470φ2471φ7072φ2473φ7274φ3675φ4076φ3677φ6078φ2479φ7880φ3281φ5482φ4083φ8284φ2485φ6486φ4287φ5688φ4089φ8890φ2491φ7292φ4493φ6094φ4695φ7296φ3297φ9698φ4299φ60100φ40n = 3 to 100: 24 constructible, 74 notdecided twice — by the Fermat-prime criterion and by φ(n) being a power of two — and thetwo agreed at every one of the 98
Fig. 1 Which regular polygons the two operations can draw, up to 100 — 24 of them. Each verdict was computed twice, once from the Fermat-prime criterion and once from φ(n) being a power of two, and the two agreed at every one of the 98.

The list is strange enough to be worth staring at before any explanation. 33 and 44 and 55 and 66, then a gap at 77; 88 and 1010 and 1212, gaps at 99 and 1111; 1515, 1616, 1717, and then nothing until 2020.

The question, in numbers

A regular nn-gon inscribed in a circle has its corners at angles 2πkn\frac{2\pi k}{n}. Constructing the polygon means constructing the angle 2πn\frac{2\pi}{n}, which — by the conversion from the previous rung — means constructing the length cos2πn\cos\frac{2\pi}{n}.

So the question is: for which nn does cos2πn\cos\frac{2\pi}{n} have degree a power of two?

Two things about that number are worth having in hand. It is the real part of a complex number ζ=e2πi/n\zeta = e^{2\pi i/n} satisfying ζn=1\zeta^n = 1, and the nn solutions of that equation sit at the polygon’s own corners, so the polygon and the equation are the same object twice. And the degree of ζ\zeta over the rationals is φ(n)\varphi(n)Euler’s totient, the count of numbers below nn sharing no factor with it.

The reason the totient appears is worth a sentence. The nn-th roots of unity form a cyclic group under multiplication, and the ones that generate the whole group — the primitive roots — are exactly ζk\zeta^k with kk coprime to nn. There are φ(n)\varphi(n) of them, they are permuted among themselves by every symmetry of the situation, and the polynomial they satisfy therefore has degree φ(n)\varphi(n) and no smaller one will do.

Taking the real part halves the degree, so cos2πn\cos\frac{2\pi}{n} has degree φ(n)/2\varphi(n)/2. Either way the conclusion is the same, because a number is a power of two exactly when its half is:

The regular nn-gon is constructible exactly when φ(n)\varphi(n) is a power of two.

The same list from the other side

Gauss stated the criterion differently, in terms of the shape of nn rather than the size of a count.

φ\varphi is multiplicative on coprime parts, and φ(pe)=pe1(p1)\varphi(p^e) = p^{e-1}(p-1). For that to be a power of two:

  • a factor of 2k2^k contributes φ(2k)=2k1\varphi(2^k) = 2^{k-1}, always a power of two, so any number of factors of two is free;
  • an odd prime pp appearing to a power e2e \ge 2 contributes a factor of pp, which is odd and larger than one, so it is fatal;
  • an odd prime pp appearing once contributes p1p-1, which must itself be a power of two.

A prime that is one more than a power of two is a Fermat prime. So:

nn works exactly when it is a power of two times a product of distinct Fermat primes.

The two statements are the same statement. The figure at the top of this page computes both, by routes sharing no code — one factorises nn and inspects the odd part, the other adds up the totient — and asserts that they agree at every nn it draws. A criterion checked against itself would be worth nothing; two criteria agreeing ninety-eight times is a real check on both.

Which regular polygons a compass and straightedge can draw, up to 60A grid of the integers with the constructible ones filled in, each verdict computed two independent ways.3 · 4 · 5 · 6 · 8 · 10 · 12 · 15 · 16 · 17 · 20 · 24 · …3φ24φ25φ46φ27φ68φ49φ610φ411φ1012φ413φ1214φ615φ816φ817φ1618φ619φ1820φ821φ1222φ1023φ2224φ825φ2026φ1227φ1828φ1229φ2830φ831φ3032φ1633φ2034φ1635φ2436φ1237φ3638φ1839φ2440φ1641φ4042φ1243φ4244φ2045φ2446φ2247φ4648φ1649φ4250φ2051φ3252φ2453φ5254φ1855φ4056φ2457φ3658φ2859φ5860φ16n = 3 to 60: 19 constructible, 39 notdecided twice — by the Fermat-prime criterion and by φ(n) being a power of two —and the two agreed at every one of the 58
Fig. 2 The same test up to 60, laid out ten to a row so the pattern of gaps is easier to read. The number under each n is φ(n), and a square is filled exactly when that number is a power of two.

Why seven fails and five does not

The abstract criterion is convincing but it is worth watching one case fail in the concrete.

For n=7n = 7, φ(7)=6\varphi(7) = 6, which is not a power of two. Concretely, 2cos2π72\cos\frac{2\pi}{7} satisfies

x3+x22x1=0,x^3 + x^2 - 2x - 1 = 0,

a cubic. If it has a rational root, the root’s numerator divides 11 and its denominator divides 11, so the only candidates are ±1±1.

Every rational number that could be a root of x³ + x² − 2x − 1A table of the candidate rational roots allowed by the rational root theorem, with the polynomial's exact value at each.x³ + x² − 2x − 1candidatevalue thereroot?-111-1x³ + x² − 2x − 1 has no rational root — all 2 candidates the theoremallows were tested and none is zeroa cubic with no rational root is irreducible over ℚ, so its roots have degree3
Fig. 3 The cubic satisfied by twice the cosine of a seventh of a turn. Two candidates, neither of them a root — so the cubic is irreducible, the number has degree three, and the seven-sided polygon cannot be drawn.

Neither is. The cubic is irreducible, the degree is three, and the heptagon is out.

For n=5n = 5, φ(5)=4\varphi(5) = 4, a power of two — and the concrete version is that 2cos2π5=5122\cos\frac{2\pi}{5} = \frac{\sqrt5-1}{2}, one square root deep and therefore constructible in one step.

Constructing the square root of 5A semicircle on a diameter split into two parts, with the perpendicular at the split reaching the arc.15√51 and 5 on one line, and the perpendicular where they meet has height √5 = 2.2361the apex sits on the semicircle, so it sees the diameter at a right angle — checked, at 0
Fig. 4 √5, which is the whole of what the pentagon needs. One semicircle on a segment of 1 and a segment of 5, and the perpendicular at the join is the length the five-sided polygon is built from.

That is the pentagon’s entire secret, and it is why the pentagon and the golden ratio are the same subject: 1+52\frac{1+\sqrt5}{2} is the diagonal of a unit pentagon, and 5\sqrt5 is one circle away.

Looking for a polynomial with φ as a rootA table of the closest an integer polynomial of each degree comes to vanishing at the number, over a bounded search.φ = 1.618033989…coefficients from −5 to 5degreeclosest missvalue there1−3x + 50.146110 tried2−5x² + 5x + 501,210 tried3−5x³ + 5x² + 5x013,310 tried4−5x⁴ + 3x³ + 4x² + 5x + 30146,410 triedthe same search over 161,040 polynomials finds φ exactlythe closest miss is reported at each degree, so the search can be seen working
Fig. 5 A blind search over integer polynomials with small coefficients, aimed at the golden ratio. It finds the quadratic exactly, at the first degree it looks — which is what a number of degree two looks like from the outside.

The same blind search aimed at the heptagon’s cosine would have to reach degree three before finding anything, and aimed at π\pi it finds nothing at any degree, which is the subject of the last rung of this ladder.

Nine fails, and three does not

The case that catches people is n=9n = 9, because 33 is a Fermat prime and 99 is a power of 33.

The criterion says distinct Fermat primes, and 9=329 = 3^2 repeats one. The totient version says φ(9)=6\varphi(9) = 6, not a power of two. And the concrete version is an equation already seen on this site:

Every rational number that could be a root of x³ − 3x − 1A table of the candidate rational roots allowed by the rational root theorem, with the polynomial's exact value at each.x³ − 3x − 1candidatevalue thereroot?-111-3x³ − 3x − 1 has no rational root — all 2 candidates the theorem allowswere tested and none is zeroa cubic with no rational root is irreducible over ℚ, so its roots have degree3
Fig. 6 The cubic satisfied by twice the cosine of a ninth of a turn. It is the sixty-degree trisection cubic in different clothes, and its two candidates fail for the same reason they failed there.

2cos2π9=2cos40°2\cos\frac{2\pi}{9} = 2\cos 40° satisfies x33x1=0x^3 - 3x - 1 = 0, which is exactly the trisection cubic for sixty degrees rescaled: 8y36y18y^3-6y-1 with x=2yx = 2y. That is not a coincidence. Constructing the nine-gon is trisecting the angle of the three-gon, and the two impossibilities are one impossibility.

The same collision explains the rest of the list. nn works, 2n2n works — bisecting is free. nn works and 3n3n generally does not, because trisecting is not.

The polygon and the equation are one object

It is worth dwelling on the identification made in passing above, because it is the reason this problem has an answer at all and it is the most surprising thing on the page.

Place the polygon’s corners on the unit circle in the plane of complex numbers. Then the corners are the nn solutions of zn=1z^n = 1, and multiplying complex numbers is turning, so stepping from one corner to the next is multiplication by a fixed number. The polygon is not merely described by the equation; it is the solution set drawn.

That means a question about drawing has become a question about factorising zn1z^n - 1 over the rationals, and factorisation is something there are theorems about. The polynomial splits into pieces, one for each divisor of nn, and the piece belonging to nn itself — the cyclotomic polynomial — has degree φ(n)\varphi(n) and is irreducible. Its irreducibility is a real theorem, due to Gauss, and it is what pins the degree down rather than merely bounding it.

For n=5n = 5 the piece is z4+z3+z2+z+1z^4+z^3+z^2+z+1, degree 44. For n=7n = 7 it is z6++1z^6+\cdots+1, degree 66. For n=9n = 9, after dividing out the cube roots of unity, it is z6+z3+1z^6+z^3+1, degree 66 again. The two sixes are why neither of those polygons can be drawn, and they are the same six that shows up as the cubics above once the real part is taken.

This is the pattern the site keeps meeting: a construction, an equation and a group turn out to be one object seen from three sides, and the side that answers the question is whichever one has a finite check attached to it. Here it is the equation, and the check is a degree.

What is actually known about the list

The criterion is complete and the list it produces is not, which is an unusual and slightly uncomfortable position.

The known Fermat primes are

3,5,17,257,65537,3,\quad 5,\quad 17,\quad 257,\quad 65537,

being 22k+12^{2^k}+1 for k=0,1,2,3,4k = 0,1,2,3,4. Fermat conjectured in 1640 that every number of that form is prime. Euler disposed of the next one in 1732 by finding that

232+1=4294967297=641×6700417,2^{32}+1 = 4294967297 = 641 \times 6700417,

and every subsequent case anyone has managed to test has been composite. No Fermat prime beyond 6553765537 is known, and it is not known whether there are finitely many.

So the constructible polygons are completely characterised and cannot be completely listed. There are at least 25=322^5 = 32 odd values of nn that work — every subset of the five known Fermat primes, including the empty one — and each may be multiplied by any power of two. Whether there are more depends on a question about the primality of enormous numbers that has been open for three hundred and eighty years.

The largest odd constructible polygon anybody can name has

3×5×17×257×65537=42949672953 \times 5 \times 17 \times 257 \times 65537 = 4294967295

sides, which is 23212^{32}-1. That number being one less than a power of two is not a coincidence either: it is the product of all five known Fermat primes, and the identity k=04(22k+1)=2321\prod_{k=0}^{4}(2^{2^k}+1) = 2^{32}-1 is the same telescoping that makes a difference of squares factor.

Reading the gaps

The pattern in the grid rewards a little decoding, because each kind of gap has a different cause.

Odd primes that are not Fermat primes. 7,11,13,19,23,29,31,7, 11, 13, 19, 23, 29, 31, \ldots — every one of them fails, because p1p-1 has an odd factor. That accounts for most of the silence: primes are common and Fermat primes are not.

Squares of Fermat primes. 9,259, 25 and 289289 fail although 3,53, 5 and 1717 succeed. Repeating a prime introduces a factor of that prime into the totient, and the criterion’s word distinct is doing all the work.

Anything carrying a bad factor. 14=2×714 = 2 \times 7 fails because 77 does, 21=3×721 = 3 \times 7 fails for the same reason, and so on. A polygon is only as constructible as its worst prime.

Products of different Fermat primes, which all work. 15=3×515 = 3 \times 5 and 51=3×1751 = 3 \times 17 and 85=5×1785 = 5 \times 17 are on the list, and the construction is pleasant: given a regular pp-gon and a regular qq-gon with pp and qq coprime, the pqpq-gon follows because some combination ap+bq=1ap + bq = 1 lets the two angles be added to make the small one. That is the Chinese remainder theorem doing geometry, and it is the reason 1515 was known to Euclid while 1717 waited two thousand years.

The doubling rule is the last piece: nn constructible implies 2n2n constructible, because bisecting an angle is one circle. So each entry on the list drags an infinite chain of doublings behind it, and that is why the filled squares thin out but never stop.

The seventeen-gon, briefly

Gauss did not merely prove the seventeen-gon possible; he produced the number, and it is worth seeing once because it is what “a tower of square roots” looks like when written out:

16cos2π17=1+17+34217+217+31734217234+217.16\cos\frac{2\pi}{17} = -1+\sqrt{17}+\sqrt{34-2\sqrt{17}}+2\sqrt{17+3\sqrt{17}-\sqrt{34-2\sqrt{17}}-2\sqrt{34+2\sqrt{17}}}.

Four square-root signs, nested three deep. The degree is φ(17)/2=8=23\varphi(17)/2 = 8 = 2^3, and the three levels of nesting are the three doublings the tower takes to reach it.

The tower ℚ ⊂ ℚ(√2) ⊂ ℚ(√2, √3)A tower of field extensions with the degree of each step, beside the multiplication table of the basis.dim 12ℚ(√2)dim 22ℚ(√2, √3)dim 41√2√3√61√2√3√61√2√3√6√22√62√3√3√633√2√62√33√262 square roots taken, one at a time, and the degree doubles at each: 1 → 2 → 4the 4×4 table is the closure check — every product of basis elements landed on a whole-numbermultiple of another
Fig. 7 Two doublings of a tower, and the closure check that says the sizes are real. The seventeen-gon’s number needs three such doublings; the pentagon’s needs one; the heptagon’s would need a step of size three, which no circle can take.

The construction itself was first written down by Johannes Erchinger in the 1820s and takes a few dozen steps. Gauss asked for the polygon on his tombstone; the stonemason declined, reportedly on the grounds that a seventeen-sided figure would be indistinguishable from a circle.

What the figures decide, and what they do not

The grid at the top of this page is a report on a computation, and it is worth being exact about which one.

For every nn it factorises nn, applies both criteria, and asserts that they agree. That is a genuine check of the equivalence of the two statements at every size drawn — a hundred independent chances for a mistake in either route to show up.

What it does not do is prove the Gauss–Wantzel theorem. The theorem’s forward half is the degree argument of the second rung; its converse half — that every nn passing the criterion really can be drawn — needs Galois theory, because the degree being a power of two is not by itself enough, as that essay was careful to say.

The converse is true here for a reason peculiar to roots of unity: their symmetry group is cyclic, and a cyclic group of order 2k2^k has a chain of subgroups stepping down by twos, which is exactly a tower of quadratic extensions. That fact is why Gauss could construct the polygon rather than merely count its degree, and it is the one place in this ladder where the easy direction is not the whole story.

Why this one is the interesting impossibility

The cube and the angle are single facts. This is a classification, and classifications behave differently.

A single impossibility invites the response “then use a better tool”, and the response is correct: a marked ruler doubles the cube. A classification invites a different question — why that list? — and the answer turns out to have nothing to do with drawing at all. The polygons that can be drawn are the ones whose totient is a power of two, and the totient knows nothing about compasses. It is a count of coprime residues, an object from modular arithmetic that was invented for entirely unrelated reasons.

So the shape of the answer is: a question about instruments turned out to be a question about the multiplicative structure of the whole numbers, and the strangeness of the list is inherited from the strangeness of the Fermat primes. That is a much better return than a single negative result, and it is why this is the theorem Gauss put on his own list of achievements while Wantzel’s two impossibilities went comparatively unremarked.

There is one more consequence worth stating, because it is the sharpest form of the surprise. Whether the list is finite or infinite — that is, whether there are finitely many odd constructible polygons — is an open problem in number theory, not in geometry. Nothing further about compasses will settle it. The question of what can be drawn has been completely converted into a question about which numbers of the form 22k+12^{2^k}+1 are prime, and there it sits.

Where this ladder goes

Three of the four classical problems are now closed, and all three closed the same way: a number, a polynomial, a degree that is not a power of two.

The fourth does not work like that at all. Squaring the circle needs π\sqrt\pi, and the obstruction is not that π\pi has the wrong degree — it is that π\pi has no degree, satisfying no polynomial equation with whole-number coefficients whatsoever. That is a much stronger statement about a much stranger kind of number, it was proved sixty years after Wantzel, and it is the one impossibility in this field that no figure can carry.

What links here

Computed from the collection, not written here: the essays that point at this one.

Reads more easily once this is understood

Essays that name this one as worth reading first.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

A dashed tag is an object no other essay names yet.

Constructible numberCyclic groupDegree of an extensionFermat primeRational root theoremRegular polygonStraightedge and compassTotient