Gauss Algorithm
Gauss Algorithm
net/publication/309157574
CITATIONS READS
0 2,684
1 author:
Diana Spears
Swarmotics, LLC
78 PUBLICATIONS 1,794 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
Generalized Integrated Learning Architecture (GILA) -- DARPA Integrated Learning View project
All content following this page was uploaded by Diana Spears on 15 October 2016.
Note: The reader is assumed to have had a basic course in abstract algebra,
and to understand recursion as well as how to read an algorithm.
Note: This paper is not published. However if you quote it, please acknowl-
edge either the author Diana Spears, or Paramanand Singh, whoever is more
appropriate. Please send errors/omissions to annikazenna@yahoo.com.
1 GAUSS’S ALGORITHM
Throughout this paper we borrow (verbatim and paraphrased) a great deal
of material from Paramanand Singh’s Math Notes entitled ”Gauss and Regu-
lar Polygons” – see http://paramanands.blogspot.com/2009/12/gauss-
and-regular-polygons.html. In fact, this paper arose from reading Singh’s
notes and adding many explanations that seemed to be missing. This pa-
per is subject to the same CC-BY-SA license as Singh’s blog. The URI for
this licence may be found at https://creativecommons.org/licenses/by-
sa/3.0/legalcode. We also include material from the book ”Disquisitiones
Arithmeticae” by Carl Friedrich Gauss (published in 1801; English edition re-
published by Springer-Verlag in 1966). This is the book upon which this paper
and Singh’s notes are based. We reorganized Singh’s notes into a more instruc-
tional, tutorial-style exposition. Finally, (following Singh) we occasionally use
group theoretic terminology, despite the fact that Gauss did not use this termi-
nology (since it had not yet been invented). We do this for ease of exposition.
Like Singh’s notes, this paper is informal. However, it is hoped that our ad-
ditions and revisions will increase the clarity and completeness for the reader
interested in this topic.
The objective of this paper is to examine Gauss’s algorithm for determin-
ing what regular polygons are constructible with a compass and straightedge
only. For example, is a regular pentagon (i.e., a 5-sided polygon, or 5-gon)
constructible with these tools? What about a regular hexagon (i.e., a 6-sided
polygon, or 6-gon)? Construction from compass and straightedge (unmarked
ruler) alone was a problem tackled by the ancient Greeks, and it is called classi-
cal constructibility. Gauss, in his book ”Disquisitiones Arithmeticae” presented
an original algorithm for determining for which values of p a regular p-gon is
classically constructible. It is this algorithm that we study here.
1
We need to define what is meant by ”classical constructibility” (or, simply,
”constructibility”) of a planar figure. Such a figure is constructible if all of
its points are constructible. So let us focus on constructible points/numbers.
Begin by drawing two points. Obviously, these points are constructible. The
remaining points in the constructible set are defined by sequentially applying
any of the following operations:
• Draw a point at the intersection of two circles, two lines, or a circle and a
line.
2
which is not a factor of any polynomial z m − 1 where m is less than p.” This
polynomial is unique.
For example, for p = 1, Φ1 (z) = z − 1. If p = 2, then Φ2 (z) = z + 1 because
z 2 − 1 = (z − 1) (z + 1), and the first factor is already used in the factorization
of Φ1 (z). For p = 3, z 3 − 1 = (z − 1) (1 + z + z 2 ) and Φ3 (z) = 1 + z + z 2 . If p
is any prime number, then:
Φp (z) = 1 + z + z 2 + · · · + z p−1
For p in general, we can isolate the factor (z − 1) for which the solution
is the trivial root 1. If we divide z p − 1 by this ”trivial factor” then we get
the pth cyclotomic polynomial, denoted by Φp (z). Singh provides proofs that
this polynomial is indeed cyclotomic, it is irreducible (cannot be factored) over
the field of rationals, it has integer coefficients, the roots of the equation Φp (z)
= 0 are precisely the φ(p) primitive pth roots of unity, Φp (z) is the minimal
polynomial for each of the primitive roots, and the degree of Φp (z) is φ(p).
In a ”perfect world”, in order to solve the cyclotomic equation for any p we
would factor the pth cyclotomic polynomial Φp (z). The problem with factoring
is that, as just stated, the polynomial Φp (z) is irreducible over the rationals.2
An alternative approach is to find a formula. This has been done for small val-
ues of p. For example, we can solve for p = 2 using the quadratic formula, for p
= 3, 5, and 7 using de Moivre’s formula, and for p = 11 using Vandermonde’s
formula. But formulas do not exist for large values of p because they are too
hard to obtain. Furthermore, Gauss knew that the values (in terms of radicals)
of roots of unity could be found for any value of p, and that led him to seek a
more general solution that would apply to all p. (In fact, Gauss’s algorithm ap-
plies to values of p that are not primes. We focus on primes here for simplicity of
presentation.) Gauss decided to decompose the problem using a novel approach
that did not involve factoring or formulas. The approach taken by Gauss was to
recursively decompose the cyclotomic equation into equations of lower degree.
(Note that ”decomposition” differs from ”factoring.”) Gauss’s approach results
in the values of the primitive roots as algebraic solutions. An algebraic solution
or ”solution in radicals” is a closed-form expression that is the solution to an
algebraic polynomial equation that can be expressed in terms of the polyno-
mial coefficients. This expression of the coefficients must be built up using only
addition, subtraction, multiplication, division, raising to integer powers, or the
extraction of nth roots (i.e., it can include radicals). Algebraic solutions form
a subset of closed-form expressions, because the latter permit transcendental
functions (non-algebraic functions) such as the exponential function, the loga-
rithmic function, and the trigonometric functions and their inverses. Gauss’s
approach was designed for building up each algebraic solution (which we some-
times call a ”radical expression” because it contains radicals) using recursively
nested formulas. Using Gauss’s algorithm, the lower-degree equations are de-
rived in a forward direction during recursion, and their radical-form solution is
built up in a reverse direction (i.e., while popping back out of the recursion).
Before discussing this decomposition process, however, we need to begin by first
examining explicit trigonometric formulas for the primitive roots of unity, and
then defining and discussing Gaussian periods.
2 We only care about factoring over the rationals because irrational coefficients would not
3
1.1.1 Primitive pth Roots of Unity
The complex number ζ = cos(2π/p) + i sin(2π/p) is a pth root of unity because
p 2π 2π
ζ = cos p · + i sin p · = cos (2π) + i sin (2π) = 1.
p p
For all exponents k, where 0 ≤ k ≤ p, ζ k is a pth root of unity. Furthermore,
the value of each of these powers of ζ is unique. Because ζ p = 1, the root 1 is
included and these powers are all of the pth roots of unity. For 0 < k < p, the
primitive pth roots of unity are
k 2kπ 2kπ
ζ = cos + i sin .
p p
By taking powers of one primitive root of unity we can derive all of the others.
Note, however, that this is not the desired form of the solutions. Recall from
above that we seek algebraic, not transcendental, solutions to the cycolotomic
equation. Therefore, a lot more work needs to be done.
4
chosen pair of values we focus on a set of e periods, each consisting of f terms,
i.e., of length f , where ef = (p − 1) and (p − 1) is the total number of primitive
pth roots of unity.3 Different pairs of e and f values are chosen at each stage
of Gauss’s algorithm. The method by which they are chosen will be discussed
later in this paper.
So far this discussion has been rather abstract, so let us consider an illus-
trative example. Suppose we wish to solve the cyclotomic equation Φ17 (z) for
the 17-gon. Then we can formulate a set of 1 period consisting of all 16 terms
(which are the primitive roots of unity). However this set is too trivial to be
useful, so it is ignored. On the first meaningful step of forward recursion, we
define a set consisting of 2 periods, each one consisting of a sum of 8 terms, and
its derived polynomial (for which the periods are roots). On the subsequent
recursive steps we get a set of 4 periods of 4 terms, a set of 8 periods of 2 terms,
and finally a set of 16 periods each of 1 term (i.e., a primitive root of unity).
And each set has an associated derived polynomial. The forward recursion has
now ”bottomed out”. Popping up backwards through the recursive levels ac-
tually proceeds in a first-in-first-out (FIFO) order. First, the derived equation
for the 8-term periods is solved, then for the 4-term periods, and so on.
The derived polynomials will have lower degrees than the original cyclotomic
polynomial (see theorems later in this paper) and can typically be solved with
formulas, e.g., for quadratic or cubic equations. In the case of p = 17, for
example, all derived polynomials are quadratic and can therefore be solved in
terms of radicals using the quadratic formula. Variables of one derived poly-
nomial are related to variables of the previous derived polynomial in a nested
manner.4 Therefore the derived polynomial equations can be solved composi-
tionally while popping through the levels during backward recursion. The final
solution is an expression for one of the primitive roots of unity that has been
built up as compositionally nested radical expressions. The details of this ex-
ample of the 17-gon will be fleshed out later in this paper – after we have seen
the fundamental principles behind Gauss’s algorithm.
For now, we resume our main discussion by considering how the primitive
roots of unity are divided into different periods within a set, in particular, which
roots go into which periods. There is an order chosen for all the primitive roots
of unity and this order affects how these roots are divided into the individual
periods within a set. How and why Gauss chose an ordering is one of the most
important and clever aspects of his algorithm. Note that the roots of unity
have a natural ordering based on cyclotomy. In particular, if we draw a unit
circle in the complex plane with the circle origin at the origin of the axes, then
we can order the roots of unity sequentially by traversing the unit circle in a
counterclockwise direction, beginning with the root 1. Obviously, we have the
sequence of primitive-only roots if we ignore the root 1 lying on the real axis.
Gauss found a more beneficial way to order the roots, where ”beneficial” is used
in the sense of aiding the process of dividing the overall cyclotomic equation-
solving problem into subproblems. Periods were a means toward this end. The
first step that Gauss took in defining his notion of periods was to rearrange the
3 Gauss used handy notation to discuss these sets. For example, if e is 3 and f is 4 then
Gauss used the notation (4, 3) to refer to the third period (out of 4 total periods in the set)
of length 4.
4 The word ”previous” is used in the sense of a previous level of forward recursion, and it
explains why we want FIFO rather than LIFO when doing backward recursion.
5
primitive roots of unity so that the sequential process of taking powers of roots
is cyclic. In other words, for some integer g, we can begin with an arbitrary
g
primitive root ζ and the sequence ζ, ζ g , (ζ g ) , . . . is cyclic. The sequence is
finite and its elements are precisely the p − 1 primitive pth roots of unity.
The key to reordering the roots in order to achieve this cyclic property is
to work with integers modulo p. As proved in Gauss’s book (and restated in
Singh), we know that
For any given prime p, there exists a positive integer g such that g p−1 ≡
1 mod p, but this is not true for g i where i is any integer < (p − 1).
An integer g which satisfies this property is called a primitive root of p. Note
that a primitive root of p is not the same as a primitive root of unity (because
herein we assume p 6= 1). From the above-stated result by Gauss, it follows that
the integers 1 (≡ g p−1 ), g, g 2 , . . . , g p−2 , when taken modulo p, are all unique
and non-zero. In some order, they are equal to the integers 1, 2, . . . , (p − 1),
which are least residues modulo p.
Consider the following example. Let p be 5. Is g = 2 a primitive root of
5? Yes it is because 24 ≡ 1(mod 5) but 21 ≡ 2(mod 5), 22 ≡ 4(mod 5), and
23 ≡ 3(mod 5). Note that 1 ≡ 24 (mod 5) ≡ 20 (mod 5). Therefore, the
sequence 0, 1, 2, 3 of powers (modulo 5) of 2 gives us the sequence 1, 2, 4, 3,
which equals the sequence 1, 2, 3, 4 (of least residues modulo p) but in a different
order. The order we derived by taking powers (modulo 5) of 2 is cyclic, i.e., [1 2
4 3] is a cyclic permutation when viewed as a sequence of powers (modulo 5) of g.
In other words, when the exponents are taken modulo 5, [(g p−1 = g 4 ≡ g 0 ≡ 1)
(g 1 ) (g 2 ) (g p−2 =g 3 )] is a cyclic permutation and is equal to [ 1 2 4 3 ].
We are now ready to rearrange the primitive roots of unity in a cyclic order.
To do so, we begin by choosing an arbitrary primitive root g of p. Then our
new arrangement of the primitive roots is
0 1 2 p−2
ζg , ζg , ζg , . . . , ζg .
i
To simplify, we introduce the new notation ζi = ζ g . We can now express
the newly-arranged cyclic sequence of primitive pth roots of unity in this new
notation as ζ0 , ζ1 , . . . , ζp−2 . Note that the operator for cyclically permuting
the elements of this sequence is to replace ζ by ζ g , i.e., raise the previous
element in the sequence to the power g in order to obtain the next item in
the sequence. Thus our cyclic permuation is [ζ0 ζ1 · · · ζp−2 ]. The symmetry
(cyclicity) that Gauss obtained via this rearrangement of the primitive roots is
exploited extensively in his algorithm for solving the cyclotomic equation.
The definition of the Gaussian periods depends fundamentally upon the
cyclic rearrangement of the primitive roots. Recall that there are p−1 primitive
pth roots of unity. To define the periods we first divide this number into two
factors, i.e., we find two positive integers e and f such that ef = (p − 1). Then
we define e periods (which are complex numbers), each with f terms (i.e., length
f ), as follows:
6
η0 = ζ0 + ζe + ζ2e + · · · + ζe(f −1)
η1 = ζ1 + ζe+1 + ζ2e+1 + · · · + ζe(f −1)+1
..
.
ηe−1 = ζe−1 + ζ2e−1 + ζ3e−1 + · · · + ζp−2
The periods of length f have no primitive roots in common. This is because
two periods of the same length are identical if they have at least one root in
common.
Observe that [η0 η1 · · · ηe−1 ] is a cyclic permutation of the periods, which is
achieved using the same operator that was used to permute the roots, namely,
replace ζ by ζ g . To see the cyclic permutation of the primitive roots, start at
the leftmost column of terms in the set of periods (shown above), and go down
the column by replacing ζ by ζ g . Then begin at the top of the second column
of terms and do likewise. Continue through the last column. The last element
in the last column of terms is ζp−2 . When ζ is replace by ζ g in that term we
cycle all the way back to the first term in the first column, namely, ζ0 .
a0 + a1 ζ + a2 ζ 2 + · · · + ap−2 ζ p−2 .
In particular, the expressions have terms consisting of rational coefficients mul-
tiplied by primitive pth roots of unity.
Because the pth cyclotomic polynomial Φp (z) is a factor of the (pth ) cyclo-
tomic equation and ζ is one of its roots, we know that Φp (ζ) = 0. And recall
that if p is any prime number, then:
Φp (z) = 1 + z + z 2 + · · · + z p−1 .
Substituting, we get:
1 + ζ + ζ 2 + · · · + ζ p−1 = 0
⇒ a0 = −a0 ζ + ζ 2 + · · · + ζ p−1
⇒ a0 + a1 ζ + a2 ζ 2 + · · · + ap−2 ζ p−2
= (a1 − a0 ) ζ + (a2 − a0 ) ζ 2 + · · · + (ap−2 − a0 ) ζ p−2 + (−a0 ) ζ p−1 .
7
Therefore every u ∈ Q(ζ) can be expressed uniquely as a linear combination of
powers of ζ and rational coefficients in the following form:
a1 ζ + a2 ζ 2 + · · · + ap−1 ζ p−1 .
Changing indices from exponents to subscripts (which were defined in the section
on periods), and rearranging terms as needed, we find that this expression is
equal to:
a0 ζ0 + a1 ζ1 + a2 ζ2 + · · · + ap−2 ζp−2 .
Because ζ is primitive, all the primitive roots of unity are elements of Q(ζ).
The reader should observe that our final Q(ζ) expression above uses the cyclic
arrangement of all of the primitive roots. We will now exploit that arrangement.
Recall from above that the periods can be cyclically permuted, i.e., [η0 η1 · · · ηe−1 ]
is a cyclic permutation of the periods that is achieved using the operator ”re-
place ζ by ζ g ”. We can likewise define a cyclic permutation of any arbitrary
expression of Q(ζ). We call it σ and it is an automorphism of Q(ζ) onto it-
self that leaves the rationals and only the rationals fixed. The following is the
definition of σ:
8
by definition, the fixed field of σ is Q. Further recall that Gauss’s algorithm
involves choosing two positive integers, e and f , such that ef = (p − 1) for p
a prime number whose roots of unity we wish to find. Also from above, we
know that σ e cycles through all e periods of length f . More generally, σ e can
be applied to any element of Q(ζ), including polynomial expressions of periods
(which are sums of roots of unity). More will be said about this below. But
first consider the fixed field of the automorphism σ e , which we call Kf . The
following lemma holds:
a0 ζ0 + a1 ζ1 + a2 ζ2 + · · · + ap−2 ζp−2 .
We can expand an internal portion of this sum to see more of the terms:
a0 ζ0 + a1 ζ1 + · · · + ae−1 ζe−1
+ ae ζe + ae+1 ζe+1 + · · · + a2e−1 ζ2e−1
+···
+ ae(f −1) ζe(f −1) + ae(f −1)+1 ζe(f −1)+1 + · · · + ap−2 ζp−2 .
Because a ∈ Kf , σ e (a) = a. Therefore:
9
Thus a ∈ Kf (i.e., the fixed field of σ e ) can be expressed as a linear combination
of the e periods of f terms. The periods are linearly independent because the
only difference between two periods is multiplication by ζ i , 1 < i. Therefore, it
follows that the e periods form a basis of Kf over the rationals Q and therefore
the dimension of Kf is e. Q.E.D.
We now state Theorem 1 and its proof:
Theorem 1 Any period of f terms (and recall that there are e of them) can be
expressed as a polynomial in any other period of f terms, with rational coeffi-
cients.
We can paraphrase this property as stating that if η1 and η2 are both periods
of f terms, then the fields Q(η1 ) and Q(η2 ) are identical. In other words, all
periods of f terms are in the same field and are indistinguishable by algebraic
operations (although not by operations such as < or >).
Proof of Theorem 1: We just showed (Lemma 1) that the e periods of length
f form a basis over Q of Kf . From linear algebra we know that any linearly
independent set over Q of members of Kf of size e is a basis of it. In particular,
the e powers of the period η, i.e., 1, η, η 2 , . . . , η e−1 (which are also elements of
Kf ) form a linearly independent set over Q. Consider the following polynomial
equation with coefficients in Q:
a0 + a1 η + · · · + ae−1 η e−1 = 0.
Because the powers of η are elements of Kf , the coefficients ai are left un-
changed. It follows that η, σ(η), σ 2 (η), . . . , σ e−1 (η) are the e distinct roots of
the polynomial equation P (z) = 0. But the only way this is possible is if all
coefficients are zero (because P (z) is of degree at most (e − 1)). Therefore,
we conclude that the e powers of η are linearly independent over Q and they
form a basis of Kf over Q. Any member a ∈ Kf , therefore, can be expressed
as a unique linear combination of 1, η, η 2 , . . . , η e−1 over Q. This leads to the
conclusion that Kf = Q(η), i.e., the fixed field of σ e is the field obtained by
adding a period of f terms to the rationals.
The result follows easily at this point. If η1 and η2 are two periods of f
terms in Kf , then:
η2 = a0 + a1 η1 + a2 η1 2 + · · · + ae−1 η1 e−1 .
Thus any period of f terms can be expressed as a polynomial, with rational
coefficients, in any other period of f terms. Q.E.D.
The second theorem, which is one of the most important keys to understand-
ing Gauss’s algorithm, is the following:
Theorem 2: If a positive integer g divides (p − 1), and a positive integer f
divides g, then any period of f terms is a root of a polynomial equation of
degree g/f whose coefficients are rational expressions of a period of g terms.
10
The polynomial equation of degree g/f mentioned in this theorem is a de-
rived equation in Gauss’s algorithm – one that is derived from a set of periods
of length f (and those periods are solutions to the derived equation). Theorem
2 will be proved later in this paper – after some relevant background material
has been presented.
As mentioned above, recursive problem decomposition is not linear in Gauss’s
algorithm. Theorem 2 justifies the rate(s) of decomposition, which are derived
from the prime factorization of p − 1. Note that at the bottom of the recursion
we want a polynomial whose roots are periods of one term, and also note that
a period of one term is a primitive root of unity (which solves the cyclotomic
equation z p − 1 = 0), and recall that once we have one primitive root of unity
all the others can be derived from it. Therefore our objective is to recursively
derive polynomials of decreasing degree until we get a (not necessarily linear)
polynomial whose roots are periods of one term.
The pattern that Gauss used to reduce the degrees of the polynomials is
called a chain of divisors, which is defined as a sequence of integer divisors
f0 , f1 , f2 , . . . , fk of (p − 1) such that:
11
following:
• Consider all periods of fk = (p − 1) terms. In fact, there is only one of
them. It is the sum of all roots of unity and its value is -1. Therefore we
do not need to consider a derived polynomial equation at this step.
• The next divisor in the chain is fk−1 . We now consider periods of fk−1
terms. By Theorem 2, a period of fk−1 terms, e.g., η1 , is a root of a derived
polynomial equation (with rational coefficients) of degree dk−1 = fk /fk−1 .
The first time this step is applied (i.e., before it is repeated), the value of
fk−1 will be the second-to-the-last number in the chain of divisors. It is
important to note that this is called the base case because the term ”base
case” will be referenced again in this paper.
• Repeat the previous step, descending the chain of divisors one-by-one, but
with one very important change. On the previous step the polynomial
equation had coefficients that were rational numbers. On this and all
subsequent steps the polynomial equation (whose degree is dk−2 or less)
will have coefficients that are rational expressions in longer periods. For
example, suppose we just completed the previous step and we are now on
the third step. Then we are considering periods of fk−2 terms. We can
use Theorem 2 to find the degree of the polynomial equation for which
such a period is a root. But we can also use Theorem 2 to determine
the nature of the coefficients. In particular, the polynomial equation will
have coefficients that are rational expressions of periods of length fk−1
(which is > fk−2 ). This is the nesting that is implemented during the
decomposition procedure which enables the composition of the solution
when popping back up from the recursion. More will be said about this
later.
• When we have periods of one term, we are at the last step of the downward
recursion (i.e., the final step of the decomposition procedure). A period of
one term is a primitive root. At this point the recursion halts. In normal
recursion this would be considered the ”base case”. But recall that we are
using a FIFO order for our recursion. Thus the first significant step to
begin with when we pop back up the recursion is the one that we labeled
as the ”base case” above.
After this decomposition procedure has completed, the solution is then com-
posed while popping back upward through the recursion. We call the formula-
tion of the solution while recursion unwinds the composition procedure; it will
be described later.
Let us now summarize why the cycotomic equation problem gets decomposed
using the decomposition procedure. Suppose we have a period of fi+1 terms.
Then we can reduce the number of terms by solving a polynomial equation
whose coefficients are rational expressions of a period of fi+1 terms. We’ve
reduced the number of terms because the root (solution) will be a period of fi
terms, and fi < fi+1 . By reducing the length (number of terms) of the period,
we are reducing the number of variables (roots) we need to obtain (i.e., solve
for, or find the value of).
To illustrate, we resume the p = 13 example. Recall that we have the
chain of divisors 1, 2, 4, 12 = (p − 1). A period of 12 terms is the sum of all
12
primitive roots of unity and therefore has the value -1. A period of 4 terms,
which we call η1 , is a root of a cubic equation (with rational coefficients) because
12/4 = 3 (and also this is the first prime number in the prime factorization of
p − 1). Next, we consider a period of 2 terms, η2 . This period is a root of a
quadratic equation because 4/2 = 2. This quadratic polynomial equation has
coefficients that are rational expressions in η1 , which is a period with more
terms. Finally, a period of one term, which we call η3 , and which is equal to
ζ0 (i.e., a primitive root of unity), is a root of a quadratic equation because
2/1 = 2. This quadratic equation has coefficients which are rational expressions
in η2 . Because any quadratic or cubic polynomial equation is solvable using
standard formulas consisting of radicals, we can therefore recursively find a
radical expression for the primitive root of unity ζ0 . Solutions for the remaining
primitive roots follow.
Let us analyze this process using field theory from abstract algebra. Our
focus is on the field used at each step of the decomposition procedure from
which to draw the coefficients of the polynomial derived at that step. Recall
that the coefficients are functions of periods used on the previous step, and at
each step of the procedure the periods used for coefficients are shorter than on
the last step. Also, to define the field from which we draw the coefficients of the
derived polynomial, we need to extend Q to contain the required periods. In
other words, if ηfi is a period with fi terms, then the fields formed by extending
the field Q with the periods (as needed for polynomial coefficients) forms a
nested sequence:
1 | 2 | 4 | 12 = (p − 1)
ef = hg = (p − 1).
To ground this discussion, think of f and g as period lengths, and e and h as
being the number of periods of those lengths, respectively. Assume g > f in
the chain of divisors, i.e., the decomposition procedure step involving g-length
periods precedes the step involving f -length periods.
Let k = g/f = e/h, which implies that e = hk. Let Kf and Kg be the fixed
fields of the automorphisms σ e and σ h . These automorphisms cycle through
the e periods and h periods, respectively. Because e = hk, the following holds:
k
σ e = σ hk = (σ h ) .
From this we conclude that any rational expression fixed by σ h is also left fixed
by σ e . Therefore, Kg ⊂ Kf . This is a less abstract way of saying the same
13
thing as the nested fields Q(ηfk ) ⊂ Q(ηfk−1 ) etc. above. We now present and
prove a lemma that enables us to complete the proof of Theorem 2:
Lemma 2: Every element of Kf is a root of a polynomial equation of degree
g/f with coefficients in Kg .
Proof of Lemma 2: Let η be a period of length f , where η ∈ Kf . Then by
definition of Kf , σ e (η) = η. As mentioned above, from η and other periods
of length f we can derive a polynomial equation for which η is a root. What
do we know that can be applied to lead us toward the form of this polynomial
equation? First, we know from the proof of Theorem 1 that for any period
η ∈ Kf , η is a root of the polynomial equation:
14
coefficients of a polynomial derived for one step in the decomposition procedure
will be rational expressions in periods used in a previous step of the procedure.
This fact not only facilitates the decomposition procedure, but it also facilitates
the composition procedure, which we will describe shortly.
Recall that the recursion in the decomposition procedure gives us a sequence
of increasingly shorter periods, and a period of each length is a root of a (derived)
polynomial equation (which we call a ”subproblem”). We have just presented
a rough sketch of how such an equation is derived. In particular, Theorem 2
tells us what the degree of this derived polynomial will be, as well as the nature
of its coefficients. However Gauss gave us more guidance than just those two
hints. The approach taken by Gauss was to calculate the sum and the product
of the periods which are roots of this polynomial equation. This yielded the
coefficients of the polynomial equation. In Section 1.2, we will show an example
of how this is done.
Earlier, we presented the decomposition procedure that is part of Gauss’s
algorithm. We next present the composition procedure that follows decomposi-
tion. The process of decomposition yields a sequence of polynomial equations,
which we call subproblems. For example, for the second step of the procedure,
we derive a polynomial equation whose roots are periods of length fk−1 , which
is the next smaller integer in the chain of factors than (p − 1). For the final
step of the procedure, we have a polynomial equation whose root is a period of
length one, i.e., a primitive root of unity ζ.
To compose the desired algebraic solution, which is the value of this primi-
tive root as a radical expression, we follow the procedure outlined below, which
makes the assumption that the first (base case) polynomial derived during de-
composition is solvable in terms of radicals. (See the decomposition procedure
above for the definition of the ”base case”.) If this base case, derived poly-
nomial has degree small enough to apply a known formula, then that is what
is used. Otherwise, other polynomial solving techniques may be used to solve
the derived polynomial equation, which is simpler and easier to solve than the
cyclotomic equation Φ(p).
The composition procedure is:
• Begin with the polynomial equation whose roots are periods of length
fk−1 , which is the next smaller integer in the chain of factors than (p − 1).
This is the base case polynomial/equation mentioned above. We can solve
this equation in terms of radicals to find the values of the periods ηfk−1
whose lengths are fk−1 .5
• After the base case, the next step of the de-composition procedure (above)
yielded a derived polynomial equation whose roots were periods of length
fk−2 , which is the next smaller integer in the chain of factors than fk−1 .
By Theorem 2 its coefficients are rational expressions in periods of length
fk−1 . This is by design – not luck! It means that we can now solve our
derived polynomial equation whose roots are periods of length fk−2 . We
can do this by plugging in the now-known values of the periods of length
5 Actually, we need more information about the periods in order to figure out which period
is which root of the derived polynomial equation. In particular, we need to know the ordering
of the values of the periods. This information is obtained using trigonometric identities, as
mentioned in the example in Section 1.2 below.
15
fk−1 . The result will be radical expressions (i.e., nothing but rational
numbers and radicals) that are the values of the periods of length fk−2 .
• Repeat the previous step until we are working with periods of length one,
i.e., primitive roots of unity. Due to all of the previous compositional
steps, we now have the composed value of at least one primitive root of
unity ζ as a radical expression. From ζ, all of the other primitive roots
can be derived using powers of ζ. And because taking powers results in
modular cyclicity, it does not matter which primitive root is chosen as ζ.
At this point it is useful to see how Gauss’s algorithm relates to his original
problem of deciding for which values of p a regular p-gon is constructible. This
involves a brief ”sneak preview” of constructibility, which is discussed in depth
in Section 2. Constructibility becomes possible when (p − 1) is a power of 2, as
we will soon see. In that case a chain of divisors would be 1, 2, 22 , . . . , 2m for
some integer m. Furthermore, the derived polynomials for which the periods
are roots are all quadratic. From this we can conclude that the expression for
a pth root of unity, where (p − 1) = 2m , will consist of a radical expression
involving square roots only, where the square roots are likely to be nested. √ In
Section 2 below we will learn that if an integer x is constructible then x is
constructible. We conclude that a polygon of p sides, where p is a power of 2,
is constructible using only a straightedge and compass (because its primitive
roots of unity are radical expressions involving square roots only). Continuing
our example, p = 2m + 1, and since p is assumed to be prime, m must be a
power of 2, which implies that p is a Fermat prime. A Fermat prime is a Fermat
n
number that is a prime. A Fermat number is a number in the form 22 + 1. The
above proves the following result, which is considered by many to be Gauss’s
most significant theorem:
Using similar reasoning, we can also conclude more generally that ”A pla-
nar point is constructible using straightedge and compass alone if it an alge-
braic solution (to a polynomial equation) whose only radicals are square roots.”
Gauss’s Constructibility Theorem finally settled the problem of constructing
regular polygons with ruler and compass only. We will discuss this theorem
further, and prove it, in Section 2 on ”Constructibility Background”. In that
section, it is called Theorem 3.
Φ17 (z) = z 17 − 1 = 1 + z + z 2 + · · · + z 16 = 0.
Let α = 2π/17. Then ζ = cos α + i sin α is a primitive 17th root of unity, i.e.,
a root of this equation. The first step is to reorder all of the primitive roots of
16
unity cyclically. We select 3 as a primitive root of 17. (Reminder: A primitive
root of 17 differs from a primitive root of 1.) Our new (cyclic) indexing scheme
m
is ζm = ζ 3 for 0 ≤ m ≤ 15. (Note that all arithmetic is modulo p = 17.)
Assuming the original indexing scheme for the primitive roots was ζ k , where
1 ≤ k ≤ 16 as one traverses the unit circle in a counterclockwise direction, the
following table specifies the correspondence between m and k:
m 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
k 1 3 9 10 13 5 15 11 16 14 8 7 4 12 2 6
For this example, k = 3m mod 17. In general, k = g m mod p.
The next step is to define the periods of each length, and to get these lengths
we need the chain of divisors. This chain is 1, 2, 4, 8, 16 for (p − 1) = 16. The
periods of 8 terms are:
X
x1 = ζm = ζ 1 + ζ 9 + ζ 13 + ζ 15 + ζ 16 + ζ 8 + ζ 4 + ζ 2
m even
X
x2 = ζm = ζ 3 + ζ 10 + ζ 5 + ζ 11 + ζ 14 + ζ 7 + ζ 12 + ζ 6 .
m odd
The reason for making the summation subscript modulo 4 is that there are e = 4
periods. The periods of 2 terms are:
X
z1 = ζm = ζ 1 + ζ 16
m≡0(mod8)
X
z2 = ζm = ζ 3 + ζ 14
m≡1(mod8)
X
z3 = ζm = ζ 9 + ζ 8
m≡2(mod8)
X
z4 = ζm = ζ 10 + ζ 7
m≡3(mod8)
X
z5 = ζm = ζ 13 + ζ 4
m≡4(mod8)
X
z6 = ζm = ζ 5 + ζ 12
m≡5(mod8)
17
X
z7 = ζm = ζ 15 + ζ 2
m≡6(mod8)
X
z8 = ζm = ζ 11 + ζ 6 .
m≡7(mod8)
Singh (in his Math Notes) applies a simplification step at this point. He uses a
translation of the primitive roots of unity into their trigonometric forms in order
to realize that the decomposition procedure can halt after the step consisting of
periods of 2 terms, instead of 1 term. Let us see how this works.
Since ζ k + ζ 17−k = 2 cos kα, where α = 2π/17, the translation is:
(x − x1 )(x − x2 ) = 0,
x2 − xx1 − xx2 + x1 x2 = 0,
x2 − x(x1 + x2 ) + x1 x2 = 0.
Plugging in the values we have for the sum and product of the periods, we
find that the derived polynomial for which x1 and x2 are roots is:
x2 + x − 4 = 0.
In order to distinguish the two periods as roots, we can use trigonometric iden-
tities to discover that x1 > x2 .
We can derive a single 4th -degree polynomial for which the four y periods
are roots. However, as noted in Singh’s Math Notes, we can take a shortcut by
observing that a pairing of the y periods will yield two quadratic equations, with
two periods each as roots. This is a clever further subdivision that subsequently
18
simplifies the composition procedure. First, we pair the roots/periods. The
periods y1 and y2 form one pair, and the periods y3 and y4 form another pair.
This particular choice of pairing simplifies matters because y1 + y2 = x1 and
y3 + y4 = x2 . We have y1 y2 = −1 and y1 + y2 = x1 ; thus y1 and y2 are roots of
the quadratic equation:
y 2 − x1 y − 1 = 0.
The astute reader will observe that Theorem 2 is relevant here because the
polynomial equation for y1 and y2 has a coefficient that is a rational expression
in a longer period, namely, x1 . Again, trigonometric identities lead to the
distinction that y1 > y2 .
Next consider y3 and y4 . Because y3 y4 = x1 + x2 = −1 and y3 + y4 = x2 ,
the quadratic equation for which y3 and y4 are roots is:
y 2 − x2 y − 1 = 0,
and we find that y3 > y4 .
Finally, using the trigonometric definitions of the periods z1 and z2 , we
determine that z1 + z2 = y1 and z1 z2 = y3 . After some algebra, we see that z1
and z2 are roots of the equation:
z 2 − y1 z + y3 = 0.
and trigonometry gives us z1 > z2 .
By executing the composition procedure (which begins by applying the
quadratic formula to the base case, derived polynomial), we obtain the solu-
tion:
2π
2 cos α = 2 cos =
17
√ √ √ √ √
p q p p
−1 + 17 + 34 − 2 17 + 2 17 + 3 17 − 34 − 2 17 − 2 34 + 2 17
.
8
From 2 cos α we can calculate the value of one primitive root of unity and from
that one we can calculate the values of all of the others via exponentiation.
Details on how to calculate a primitive root of unity from 2 cos α may be found
in Section 2.2. At this point, we have the solution to the cyclotomic equation
for p = 17.
Before concluding Section 1, we present a very high-level synopsis of Gauss’s
algorithm:
19
3. Determine the chain of divisors of (p − 1) and arrange it in descending
order. Let fk = (p − 1) be the largest element in the chain and label the
other elements fk−1 , fk−2 , . . . , f0 = 1.
2 CONSTRUCTIBILITY BACKGROUND
At this point, we apply the above results to the original problem tackled by
Gauss, namely, what regular polygons are constructible with straightedge and
compass alone?
20
We know that the minimal polynomial of ζ = cos(2π/n) + i sin(2π/n) is
the nth cyclotomic polynomial Φn (z). Because the multiplicative inverse of
an nth root of unity is its complex conjugate, we know that η = ζ + ζ −1 .
(I.e., ζ = cos(2π/n) + i sin(2π/n) and therefore ζ −1 = cos(2π/n) − i sin(2π/n).)
Because ζ −1 = ζ i for some i, we know that ζ −1 is a root of Φn (z) = 0. We
conclude that Φn (z) = z φ(n) Φn (z −1 ). Since n > 2, φ(n) is even, i.e., φ(n) = 2m
for some positive integer m.
From all of the above, it follows that z −m Φn (z) can be expressed in the
form:
z m Ψm (z + z −1 ) = z m z −m Ψn (z).
Since Φn (z) = z m Ψm (z + z −1 ), Ψm (z) is irreducible over the rationals. This
is because if it were not irreducible then we could factor it as Ψm (z) = f (z)g(z)
where f (z) is of degree r < m (because the above states that Ψm (z) has degree
m). Therefore,
Φn (z) = z m Ψm (z + z −1 )
= z m f (z + z −1 )g(z + z −1 )
= (z r f (z + z −1 ))(z m−r g(z + z −1 )).
which leads to a contradiction since Φn (z) is irreducible. We conclude that
Ψm (z) is irreducible. It follows from the above that Ψm (z) is the minimal poly-
nomial of degree m = φ(n)/2 for η = 2 cos 2π n , and therefore η is constructible
only if m = φ(n)/2 is a power of 2, i.e., when φ(n) is a power of 2.
Now will prove the ”if” part of Theorem 3. Note that φ(n) = 2k if and only
if
n = 2l p1 p2 · · · pm
where the pi are distinct Fermat primes. A Fermat prime is a prime number
of the form 2k + 1 for some positive integer k. There are two cases to consider
now:
21
• Case 2. If n has the prime factorization
n = p0 k0 p1 k1 p2 k2 · · · pm km
then
and in this case φ(n) will be a power of 2 only at least one of the primes
pi is 2 and the exponents of all the other primes is 1 and, furthermore, for
those primes (pi − 1) is a power of 2.
Before completing our proof of Theorem 3, we first need the following lemma:
LEMMA 3: If a regular polygon of m sides and a regular polygon of n sides
can be constructed by Euclidean tools (straightedge and compass alone), and m
is coprime to n, then a regular polygon of mn sides can also be constructed by
Euclidean tools.
PROOF OF LEMMA 3: Because m and n are coprime, by Bézout’s Identity
(see wikipedia on ”Coprime Integers”), there exist integers a and b such that
am + bn = 1 (because 1 is the greatest common divisor of a and b). Then
a b 1
+ =
n m mn
2π 2π 2π
⇒a· +b· = .
n m mn
By assumption, we can construct the angles 2π/m and 2π/n using Euclidean
tools. Because products and sums of constructible numbers are constructible
(see Section 2.1 on constructible numbers, below), we can construct the angle
2π
mn . Therefore a regular polygon of mn sides is contructible using Euclidean
tools. Q.E.D.
Recall Gauss’s Constructibility Theorem, which states that if p is a Fermat
prime then a regular polygon of p sides is constructible using Euclidean tools.
We can now further extend this result to state that if n is a product of dis-
tinct Fermat primes (which are coprime), then a regular polygon of n sides is
constructible using Euclidean tools. Q.E.D.
Corollary to Theorem 3: If the only radicals in the expression for the value
of a primitive pth root of unity (for p prime, p > 2) are square roots, then a
regular polygon of p sides is constructible by straightedge and compass only.
Proof of Corollary to Theorem 3: We assume that an arbitrary primitive pth
root of unity ζ has a radical expression as its value that contains no radicals other
than square roots. Because the choice of primitive root of unity is arbitrary,
this assumption also holds for all of the other primitive pth roots of unity.
By Theorem 2, when Gauss’s algorithm is used to derive this value of ζ, the
degrees of all the derived polynomials (subproblems) from which this value is
obtained (during the composition procedure) must all be powers of 2. Recall
from above that the prime factorization of (p − 1) (in descending order) equals
the sequence of degrees of polynomials for which the periods are roots. The
prime factorization of (p − 1) must therefore be 2k for some positive integer k.
Since p is assumed to be prime, φ(p) = (p − 1). Thus φ(p) = 2k . The corollary
follows by Theorem 3. Q.E.D.
22
2.2 Constructible Numbers
The integers are constructible, and so are sums, differences, products, quotients
(which implies rational numbers are constructible), and square roots of con-
structible numbers. For a good introduction to constructible numbers, see the
wikipedia entry entitled ”Constructible Number”. Assuming the reader has
paused to read and learn the basics of constructible numbers, we now continue
our discussion of the construction of primitive roots of unity, which enables the
construction of a regular p-gon.
Recall from above that the ”only if” part of the proof of Theorem 3 showed
that the constructibility of η = 2 cos(2π/n) implies the constructibility of cos(2π/n).
We will now go further to show that the constructilibility of η implies the con-
structibility of a primitive root of unity ζ = cos α + i sin α = cos(2π/n) +
i sin 2π/n). This is relevant to our p = 17 illustrative example of Gauss’s algo-
rithm in the previous section. In particular, in that example we showed how
Gauss’s algorithm resulted in a radical expression for the value of η (which
was the period z1 ). By the Corollary to Theorem 3, this radical expression is
constructible because the only radicals in the expression are square roots. We
know that all integers are constructible (above). We also know that if x and
y are constructible then so are x + y, x − y, xy, and x/y. Therefore if 2 cos α
is constructible then so is cos α. From the unit circle in the complex plane,
we can construct sin α from cos α using trigonometric identities. According to
the wikipedia entry ”Constructible Number”, if x and y are constructible, then
x + iy is also constructible.
This chain of reasoning shows that the constructibility of η implies the con-
structibility of ζ. And ζ is a primitive root of unity which means that from it all
the other primitive roots of unity can be derived. We have just completed the
example of the previous section where we applied Gauss’s algorithm to the case
of p = 17. What we have just shown is that a regular 17-gon is constructible
from straightedge and compass only.
23
Figure 1: The 17-gon (heptadecagon). From Singh’s Math Notes (with permis-
sion).
24
x2 = 2(cos 3α + cos 7α + cos 5α + cos 6α)
With our new variable, we now get:
x1 = 2 tan 2β
x2 = −2 cot 2β.
The derived quadratic equation, for which x1 and x2 are roots used to be:
x2 + x − 4 = 0
in Section 1. Using our new definitions of the roots, we can rewrite this equation
as:
x2 + 4x cot 4β − 4 = 0.
Likewise, recall from Section 1 that:
y 2 − x1 y − 1 = 0.
y 2 − x2 y − 1 = 0.
Substituting our new values of x1 and x2 into these equations, we get:
y1 = tan(β + π/4)
y2 = tan(β − π/4)
y3 = tan β
y4 = − cot β
and therefore
OB = OA = 1.
1
OC = .
4
25
It is now possible to obtain the values of y2 and y3 using the graph:
26