Computation

Every element is a power of one of them

Pick the right element of a finite field and its powers run through every other non-zero element exactly once before returning to one. Multiplication becomes addition of exponents, and a table of q − 1 entries replaces the whole multiplication table.

Worth reading first: The field with four elements.

A finite field’s addition is dull: kk independent copies of the integers modulo a prime, and nothing more to say. Its multiplication is not.

The non-zero elements of GF(16) as the powers of one of themA ring of the field's non-zero elements in the order the powers of a primitive element produce them, beside a table of exponents.1αα²α³α+1α²+αα³+α²α³+α+1α²+1α³+αα²+α+1α³+α²+αα³+α²+α+1α³+α²+1α³+1GF(16)*15 elementspowerelementα⁰1α¹αα²α²α³α³α⁴α+1α⁵α²+αα⁶α³+α²α⁷α³+α+1α⁸α²+1α⁹α³+αα¹⁰α²+α+1α¹¹α³+α²+αα¹²α³+α²+α+1α¹³α³+α²+1α¹⁴α³+1every non-zero element of GF(16) is a power of α — the 15 of them, once each, around the wheel8 of the 15 elements generate the whole group, which is φ(15) = 8, and the product rule waschecked on all 225 pairs
Fig. 1 The fifteen non-zero elements of the field with sixteen elements, in the order the powers of α produce them. The wheel closes after fifteen steps and hits every one of them exactly once. The exponent rule was checked on all 225 pairs.

The claim

Take a finite field with qq elements and throw away the zero. What is left is q1q-1 elements, closed under multiplication, each with a reciprocal — a group.

That group is always a single cycle. There is an element gg such that

g0, g1, g2, , gq2g^0,\ g^1,\ g^2,\ \dots,\ g^{q-2}

are all q1q-1 of the non-zero elements, each exactly once, and gq1=1g^{q-1} = 1.

Such a gg is called a primitive element. The figure above shows one for GF(16)GF(16): the powers of α\alpha march around the wheel, produce every non-zero element on the way, and close.

This is not obvious, and it is not true in every finite group of the same shape. It is a consequence of the field structure and it fails immediately if the field is replaced by a ring.

What it buys

Once a primitive element is fixed, every non-zero element has a discrete logarithm: the exponent ii with gi=zg^i = z.

Then multiplying is adding:

gagb=ga+bmod(q1).g^a \cdot g^b = g^{a+b \bmod (q-1)}.

The whole q×qq \times q multiplication table collapses to a table of q1q-1 exponents plus one addition. In GF(256)GF(256) that is the difference between sixty-five thousand entries and two tables of two hundred and fifty-five, which is why every implementation of byte arithmetic in the world uses logarithms.

The figure checks that rule rather than announcing it: for every ordered pair of non-zero elements it computes the product in the field, looks up its exponent, and requires it to be the sum of the two exponents modulo q1q-1. Two hundred and twenty-five pairs in GF(16)GF(16), all of them.

That reduction of multiplication to addition is the same manoeuvre as an ordinary logarithm, and the resemblance is not superficial: both turn a group into the integers by naming a generator and counting how far along it each element sits.

The two tables, in practice

It is worth spelling out how the reduction is actually used, because it is one of the few places where a piece of pure algebra is implemented literally and unchanged.

Fix a primitive element. Build two arrays of length q1q-1: log, mapping each non-zero element to its exponent, and exp, mapping each exponent back to its element. Then

ab=exp[(log[a]+log[b])mod(q1)],a \cdot b = \text{exp}\big[(\text{log}[a] + \text{log}[b]) \bmod (q-1)\big],

and division is the same with a minus sign. Two lookups, an addition and one more lookup, with the case a=0a = 0 or b=0b = 0 handled separately because zero has no logarithm.

In GF(256)GF(256) the two arrays are two hundred and fifty-five bytes each. The alternative — a full multiplication table — is sixty-five thousand bytes, and in 1970s hardware that was the difference between fitting and not.

The single awkwardness is the exception for zero, and it is worth noticing that it is unavoidable rather than an artefact. Zero is not in the multiplicative group at all; the group is what is left after removing it. Every convenience on this page is a convenience about that group, and zero has to be handled by hand precisely because it is the one element with no reciprocal.

How many primitive elements there are

Not every element is primitive. In GF(16)GF(16) the element α3\alpha^3 has order five, because (α3)5=α15=1(\alpha^3)^5 = \alpha^{15} = 1, and its powers reach only five of the fifteen.

The count is exactly φ(q1)\varphi(q-1), where φ\varphi is Euler’s totient: gkg^k generates the whole cycle precisely when kk shares no factor with q1q-1, since otherwise gkg^k has smaller order.

The figures compute that count twice. Once by the formula, from the factorisation of q1q-1; and once by brute force, taking each of the q1q-1 elements in turn, listing its powers, and counting how many produce the whole group. In GF(16)GF(16) both give 88 out of 1515; in GF(8)GF(8) both give 66 out of 77; in GF(9)GF(9) both give 44 out of 88.

The non-zero elements of GF(8) as the powers of one of themA ring of the field's non-zero elements in the order the powers of a primitive element produce them, beside a table of exponents.1αα²α+1α²+αα²+α+1α²+1GF(8)*7 elementspowerelementα⁰1α¹αα²α²α³α+1α⁴α²+αα⁵α²+α+1α⁶α²+1every non-zero element of GF(8) is a power of α — the 7 of them, once each, around the wheel6 of the 7 elements generate the whole group, which is φ(7) = 6, and the product rule waschecked on all 49 pairs
Fig. 2 The seven non-zero elements of GF(8) as powers of α. Here φ(7) = 6, so six of the seven elements are primitive — everything except 1 — because 7 is prime and every non-identity element of a group of prime order generates it.
The non-zero elements of GF(9) as the powers of one of themA ring of the field's non-zero elements in the order the powers of a primitive element produce them, beside a table of exponents.1α+12α+122α+2αα+2GF(9)*8 elementspowerelement(α+1)⁰1(α+1)¹α+1(α+1)²(α+1)³2α+1(α+1)⁴2(α+1)⁵2α+2(α+1)⁶α(α+1)⁷α+2every non-zero element of GF(9) is a power of α+1 — the 8 of them, once each, around the wheel4 of the 8 elements generate the whole group, which is φ(8) = 4, and the product rule waschecked on all 64 pairs
Fig. 3 GF(9), where the generator found by search is α + 1 rather than α — because α itself has order 8 only for some choices of modulus, and the figure takes the first element whose powers actually reach everything.

Why it is true

The proof is a counting argument and it uses the field property exactly once, in a place worth watching.

Let m=q1m = q-1 be the size of the group. For each divisor dd of mm, ask how many elements have order exactly dd.

The key step: the equation zd=1z^d = 1 has at most dd solutions, because it is a polynomial equation of degree dd over a field and a polynomial cannot have more roots than its degree. That is the only place the field is used, and it is where the argument would collapse over a ring with zero divisors.

Now suppose some element has order exactly dd. Its dd powers are all distinct and all satisfy zd=1z^d = 1, so they are all the solutions. Among those dd powers, the ones of order exactly dd are the φ(d)\varphi(d) whose exponent is coprime to dd.

So for each dd the number of elements of order dd is either 00 or φ(d)\varphi(d). Summing over divisors:

m=dm(elements of order d)dmφ(d)=m,m = \sum_{d \mid m} (\text{elements of order } d) \le \sum_{d \mid m} \varphi(d) = m,

the last equality being the standard identity that the totients of the divisors of mm add up to mm. Equality throughout forces every term to be φ(d)\varphi(d) rather than 00 — including d=md = m itself.

So there are φ(m)\varphi(m) elements of order mm, and in particular at least one. The group is cyclic.

The identity used at the last step deserves its own look, since it is doing real work. That dmφ(d)=m\sum_{d \mid m}\varphi(d) = m is itself a counting argument of the kind this collection likes: classify the mm fractions 1m,2m,,mm\frac{1}{m}, \frac{2}{m}, \dots, \frac{m}{m} by the denominator each has in lowest terms. A fraction reducing to denominator dd has a numerator coprime to dd, so there are φ(d)\varphi(d) of them, and every fraction is counted once. The same mm objects, sorted two ways.

Every subgroup, and only those

A second consequence is worth stating because it is what makes the structure so rigid.

In a cyclic group of size mm, there is exactly one subgroup of each size dividing mm and none of any other size. The subgroup of size dd is the set of powers gm/d,g2m/d,g^{m/d}, g^{2m/d}, \dots — evenly spaced points around the wheel.

So the subfields and subgroups of a finite field are completely determined by the arithmetic of divisors, with no choices anywhere. GF(16)GF(16) contains GF(4)GF(4) and GF(2)GF(2) and nothing else, because 44 and 22 divide 1616 as powers of two, while GF(8)GF(8) contains GF(2)GF(2) only, since 33 does not divide 44 but 11 divides 33.

That rigidity is the reason a great deal of the theory can be done by counting divisors rather than by construction. Nothing has to be searched for; the divisor lattice already says what is there.

Where it fails, and the failure is instructive

Drop the field and the theorem goes with it.

Take the integers modulo 88 and keep the units — the residues with reciprocals, namely 1,3,5,71, 3, 5, 7. That is a group of order four under multiplication. But

32=91,52=251,72=491,3^2 = 9 \equiv 1,\qquad 5^2 = 25 \equiv 1,\qquad 7^2 = 49 \equiv 1,

so every element squares to 11 and nothing has order four. The group is not a cycle.

The proof above breaks at exactly the point predicted: z2=1z^2 = 1 has four solutions in a ring of degree-two polynomials’ worth of room, because Z/8\mathbb{Z}/8 is not a field and a quadratic may have four roots there.

That is a good test of whether the argument was understood. The conclusion is not about groups of order q1q-1 in general; it is about the multiplicative group of a field, and every step used it.

The arithmetic of GF(8)Addition and multiplication tables of a finite field, optionally beside the table of a ring of the same kind of size.+01αα+1α²α²+1α²+αα²+α+101αα+1α²α²+1α²+αα²+α+101αα+1α²α²+1α²+αα²+α+110α+1αα²+1α²α²+α+1α²+ααα+101α²+αα²+α+1α²α²+1α+1α10α²+α+1α²+αα²+1α²α²α²+1α²+αα²+α+101αα+1α²+1α²α²+α+1α²+α10α+1αα²+αα²+α+1α²α²+1αα+101α²+α+1α²+αα²+1α²α+1α10×01αα+1α²α²+1α²+αα²+α+101αα+1α²α²+1α²+αα²+α+10000000001αα+1α²α²+1α²+αα²+α+10αα²α²+αα+11α²+α+1α²+10α+1α²+αα²+1α²+α+1α²1α0α²α+1α²+α+1α²+ααα²+110α²+11α²αα²+α+1α+1α²+α0α²+αα²+α+11α²+1α+1αα²0α²+α+1α²+1α1α²+αα²α+1the 8 elements of GF(8), built as polynomials in α modulo α+1 + α³ — every product of two non-zero elements is non-zeroassociativity and distributivity were checked over all 512 triples
Fig. 4 The field with eight elements, whose non-zero part is a cycle of length seven — and which is a completely different object from the integers mod 8, whose units form no cycle at all.

The same wheel over the integers

For a prime pp the field is just the integers modulo pp, and the theorem becomes a classical statement: there is a residue whose powers run through all of 1,,p11, \dots, p-1. Such a residue is called a primitive root modulo pp.

The non-zero elements of GF(7) as the powers of one of themA ring of the field's non-zero elements in the order the powers of a primitive element produce them, beside a table of exponents.132645GF(7)*6 elementspowerelement3⁰13263⁴43⁵5every non-zero element of GF(7) is a power of 3 — the 6 of them, once each, around the wheel2 of the 6 elements generate the whole group, which is φ(6) = 2, and the product rule waschecked on all 36 pairs
Fig. 5 Primitive roots modulo 7, drawn. The powers of 3 run 1, 3, 2, 6, 4, 5 and return — all six non-zero residues, once each. Two of the six residues do that, which is φ(6) = 2.

The existence proof is the counting argument above and gives no hint of which residue works. Finding one means testing candidates, and there is no formula: 22 is a primitive root modulo 55 and modulo 1111, and is not modulo 77 or 1717.

Whether a fixed number is a primitive root infinitely often is an open question. Artin conjectured in 1927 that 22 is a primitive root for infinitely many primes — indeed for a definite proportion of them, about 37.4%37.4\% — and it is still unproved for any single specific base. It is known that at least one of 22, 33 and 55 works infinitely often, which is a peculiar state of knowledge to be in: a theorem that one of three statements is true, with no way to say which.

That gap between existence and identification is the same one running through this whole field. The counting argument produces a primitive element without producing it, exactly as the counting argument for large graphs produces a colouring nobody can exhibit. What is proved is that the search will succeed, not where.

Fermat, generalised for nothing

One corollary falls out with no extra work and it is a familiar theorem in unfamiliar clothes.

Since the group has q1q-1 elements, every element’s order divides q1q-1 by Lagrange’s theorem, so

zq1=1for every non-zero z,z^{q-1} = 1 \quad\text{for every non-zero } z,

and therefore zq=zz^q = z for every element including zero.

For qq prime that is Fermat’s little theorem, which this collection has already proved by counting necklaces. Here it arrives as a statement about the size of a group, valid over every finite field rather than only over the integers modulo a prime, and it costs one line.

The two proofs are worth comparing. The necklace argument is combinatorial and shows why the theorem is true in a way that can be looked at. This one shows that the theorem was never about primes — it is about a finite group having a size — and generalises without effort. Neither is better; they answer different questions.

There is a second corollary of the same kind, and it explains a construction from the first anchor of this field. Since zq=zz^q = z holds for every element, the polynomial zqzz^q - z has all qq elements of the field as roots, and it has degree qq, so it factors completely:

zqz=cF(zc).z^q - z = \prod_{c \in F} (z - c).

Every finite field is therefore the complete set of roots of one polynomial, which is a very tidy way for an object to be described and is the starting point of the uniqueness theorem the previous essay quoted. Two fields of the same size are the root sets of the same polynomial, and a relabelling between them is available for that reason.

That identity also gives the fastest test for whether a polynomial is irreducible over GF(p)GF(p), and hence the fastest way to build the fields in the first place, which closes a small loop: the construction needs an irreducible polynomial, and the object built supplies the test for finding one.

The map that is easy one way

There is an asymmetry in the logarithm that has to be mentioned and that this field will not develop.

Computing gig^i from ii is a matter of repeated squaring: about log2i\log_2 i multiplications, and short. Recovering ii from gig^i — the discrete logarithm proper — has no comparably direct formula, and in a large field nobody knows a quick way to do it.

That asymmetry is the foundation of a great deal of cryptography, and it is a question about cost: how much work a procedure takes as the field grows. Cost is not this field’s subject and no essay here states a running time or names a machine; another site in this fleet owns computation read as cost, and the question belongs there.

What belongs here is the structural fact, which is complete on its own terms: the map igii \mapsto g^i is a bijection from the integers modulo q1q-1 onto the non-zero elements of the field, carrying addition to multiplication. That statement is proved above and takes no position on how hard either direction is to compute.

The non-zero elements of GF(4) as the powers of one of themA ring of the field's non-zero elements in the order the powers of a primitive element produce them, beside a table of exponents.1αα+1GF(4)*3 elementspowerelementα⁰1α¹αα²α+1every non-zero element of GF(4) is a power of α — the 3 of them, once each, around the wheel2 of the 3 elements generate the whole group, which is φ(3) = 2, and the product rule waschecked on all 9 pairs
Fig. 6 The smallest case, where everything is visible at once: three non-zero elements, a cycle of length three, and two of the three elements primitive because φ(3) = 2.

What the wheel is a picture of

A word about the figure, because the drawing makes a choice that is worth defending.

The non-zero elements have no natural order. They are not numbers, they do not increase, and any arrangement of them on a page is imposed. The wheel imposes one: the order in which the powers of gg produce them.

That ordering is not arbitrary and it is not a presentational convenience. It is the structure the essay is about — the claim that a single element’s powers exhaust the group is exactly the claim that this arrangement exists — so drawing the elements in that order and closing the loop is drawing the theorem.

What the picture cannot show is that the arrangement is forced. A different primitive element gives a different wheel, with the same elements in a different cyclic order, and both are correct. The invariant content is the length of the cycle and the fact that some element achieves it; the particular sequence is a choice, like the choice of which irreducible polynomial builds the field.

A degree-1 polynomial over GF(7), and the 5 values sentA grid of the finite field with the polynomial's value at each point marked, and the transmitted symbols picked out.01234560123456sentf(0) = 3f(1) = 5f(2) = 0f(3) = 2f(4) = 4the message 3, 2 read as 2x + 3 over GF(7), evaluated at x = 0…4all 10 ways of keeping 2 of the 5 values were interpolated and every one returned themessage
Fig. 7 Where the structure gets used: a code over GF(7), whose encoding evaluates a polynomial at five points and whose decoding divides. Both operations are exponent arithmetic once a primitive element is fixed.

Where this anchor ends

Two essays have established what a finite field is and how it is put together: prime powers only, one field per size, addition a stack of copies of GF(p)GF(p), multiplication a single cycle.

That is the arithmetic the whole of this field’s coding theory was written in, and it is also the arithmetic behind the finite geometries that come next. The projective plane with seven points is built from GF(2)GF(2), the one with thirteen points from GF(3)GF(3), and the pair of orthogonal squares that Euler could not find at order six exists at every prime power for the same reason: a field of that size exists, and a field is enough.

What links here

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

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.

Counting argumentCyclic groupDiscrete logarithmFermats little theoremFinite fieldModular arithmeticPrimitive elementTotient