Fields

Ruler and compass

For two thousand years nobody could double a cube, trisect an angle or draw a regular heptagon with ruler and compass. Field theory shows why in a few lines: a constructible length lives in a tower of square roots, so its degree is a power of 2. The same theory says exactly which regular polygons can be drawn, and writes the square roots down.

Constructible numbers

Start with two points a unit apart. A ruler draws the line through two known points, a compass the circle about one known point through another, and new points appear where lines and circles cross. A real number is constructible if a segment of that length can be reached. Sums, differences, products and quotients of constructible numbers are constructible (by similar triangles), and so is the square root of one (by a semicircle). Conversely, intersecting lines and circles only ever solves linear and quadratic equations. So:

xx is constructible exactly when it lies in a field KmK_m at the top of a tower Q=K0⊂K1⊂⋯⊂Km\mathbb{Q} = K_0 \subset K_1 \subset \dots \subset K_m with every step of degree 2.

By the tower law such a number has degree 2k2^k over Q\mathbb{Q}. That necessary condition already settles the classical problems. It is not quite sufficient: a root of x4+x+1x^4 + x + 1 has degree 4, but there is no field of degree 2 below it. The complete criterion, used by constructible, is that the splitting field has degree a power of 2, that is, the Galois group is a 2-group.

import { constructible } from "@ratmath/structures";

constructible("x^4 - 2").constructible;       // true: group D4 of order 8
constructible("x^3 - 2").constructible;       // false: degree 3
constructible("x^4 + x + 1").constructible;   // false: degree 4, but the group is S4 of order 24
constructible("x^4 + x + 1").reason;          // says so in words

When the answer is yes, each root comes with an expression in square roots alone, from solving by radicals.

The three classical problems

  • Doubling the cube asks for 23\sqrt[3]{2}, a root of the irreducible x3−2x^3 - 2: degree 3, impossible.
  • Trisecting an angle θ\theta asks for cos⁡(θ/3)\cos(\theta/3) given c=cos⁡θc = \cos\theta. The triple-angle formula cos⁡θ=4cos⁡3(θ/3)−3cos⁡(θ/3)\cos\theta = 4\cos^3(\theta/3) - 3\cos(\theta/3) makes it a root of 4x3−3x−c4x^3 - 3x - c. For θ=60°\theta = 60° that is 8x3−6x−18x^3 - 6x - 1, irreducible, so the 60° angle cannot be trisected and there is no general method. Some angles can: for θ=90°\theta = 90° the cubic factors.
  • Squaring the circle asks for π\sqrt\pi. Constructible numbers are algebraic and π\pi is not (Lindemann, 1882). This one is quoted, not computed.
import { classicalProblems } from "@ratmath/structures";

classicalProblems.doublingTheCube().possible;     // false
classicalProblems.trisecting("1/2").reason;       // "8x³ − 6x − 1 is irreducible, so cos(θ/3) has degree 3 over Q, …"
classicalProblems.trisecting("0").possible;       // true: a right angle can be trisected
classicalProblems.squaringTheCircle().reason;

Regular polygons

Drawing a regular nn-gon means constructing cos⁡(2π/n)\cos(2\pi/n), which generates a field of degree φ(n)/2\varphi(n)/2 inside the cyclotomic field. That field is Galois with an abelian group, so the degree test is the whole story. Gauss (sufficiency, 1796) and Wantzel (necessity, 1837):

The regular nn-gon is constructible exactly when φ(n)\varphi(n) is a power of 2, that is, when nn is a power of 2 times a product of distinct Fermat primes 3,5,17,257,655373, 5, 17, 257, 65537.

So the 7-gon, 9-gon, 11-gon and 13-gon are impossible, and the 17-gon is possible, which Gauss found at nineteen. For a Fermat prime pp the Galois group of the pp-th roots of unity is cyclic of order p−1=2mp - 1 = 2^m. Halving the group mm times splits the roots into sums called Gaussian periods; each period satisfies a quadratic whose coefficients are periods from the level before. regularPolygon follows that chain and then combines prime factors by the addition formula for cosines and powers of 2 by the half-angle formula.

import { regularPolygon } from "@ratmath/structures";

const p = regularPolygon(17);
p.constructible;          // true
p.cos.inline();           // "(−1 + √17 + √(34 − 2·√17) + 2·√(17 + 3·√17 − √(170 + 38·√17)))/16"
p.cos.usesOnlySquareRoots; // true
p.cos.check(50);          // { agrees: true, digits: 50 }

regularPolygon(7).reason; // "φ(7) = 6 is not a power of 2, so cos(2π/7) has degree 3 over Q …"
regularPolygon(257).cos.size;   // 66: the 257-gon takes 66 square roots

The formula for 17 is Gauss's own, up to the order of the terms. The 65537-gon is constructible too, but its formula is left to the patient.

constructiblePolygon(n) is another name for regularPolygon(n). The theorem also reaches constructible: when a factor has degree 8 or more (beyond the Galois groups computed directly) but is, coefficient for coefficient, the minimal polynomial of cos⁡(2π/n)\cos(2\pi/n) or of 2cos⁡(2π/n)2\cos(2\pi/n) from algebraic's cosMinimal, its splitting field is Q(cos⁡2π/n)\mathbb Q(\cos 2\pi/n), abelian of degree φ(n)/2\varphi(n)/2, and the answer is decided. Only the finitely many nn with φ(n)=2deg⁡\varphi(n) = 2\deg can match. Any other polynomial of such a degree is still left undecided.

import { cosMinimal } from "@ratmath/algebraic";
constructible(cosMinimal(17)).constructible;   // true: it is the minimal polynomial of cos(2π/17)
constructible("x^8 - 2").constructible;        // null: degree 8, not a cosine, left undecided
Try itEdit the code and run it with @ratmath/structures and Core's Rational in scope. The last line's value is shown; PRINT(…) adds lines, TEX(…) typesets math.
Ctrl/⌘ + Enter runs