So far on this blog we’ve given some introductory notes on a few kinds of algebraic structures in mathematics (most notably groups and rings, but also monoids). Fields are the next natural step in the progression.
If the reader is comfortable with rings, then a field is extremely simple to describe: they’re just commutative rings with 0 and 1, where every nonzero element has a multiplicative inverse. We’ll give a list of all of the properties that go into this “simple” definition in a moment, but an even more simple way to describe a field is as a place where “arithmetic makes sense.” That is, you get operations for which satisfy the expected properties of addition, subtraction, multiplication, and division. So whatever the objects in your field are (and sometimes they are quite weird objects), they behave like usual numbers in a very concrete sense.
So here’s the official definition of a field. We call a set a field if it is endowed with two binary operations addition () and multiplication (, or just symbol juxtaposition) that have the following properties:
- There is an element we call 0 which is the identity for addition.
- Addition is commutative and associative.
- Every element has a corresponding additive inverse (which may equal ) for which .
These three properties are just the axioms of a (commutative) group, so we continue:
- There is an element we call 1 (distinct from 0) which is the identity for multiplication.
- Multiplication is commutative and associative.
- Every nonzero element has a corresponding multiplicative inverse (which may equal ) for which .
- Addition and multiplication distribute across each other as we expect.
If we exclude the existence of multiplicative inverses, these properties make a commutative ring, and so we have the following chain of inclusions that describes it all
The standard examples of fields are the real numbers , the rationals , and the complex numbers . But of course there are many many more. The first natural question to ask about fields is: what can they look like?
For example, can there be any finite fields? A field which as a set has only finitely many elements?
As we saw in our studies of groups and rings, the answer is yes! The simplest example is the set of integers modulo some prime . We call them or sometimes just for short, and let’s rederive what we know about them now.
As a set, consists of the integers . The addition and multiplication operations are easy to define, they’re just usual addition and multiplication followed by a modulus. That is, we add by and multiply with . This thing is clearly a commutative ring (because the integers form a commutative ring), so to show this is a field we need to show that everything has a multiplicative inverse.
There is a nice fact that allows us to do this: an element has an inverse if and only if the only way for it to divide zero is the trivial way . Here’s a proof. For one direction, suppose divides zero nontrivially, that is there is some with . Then if had an inverse , then , but that’s very embarrassing for because it claimed to be nonzero. Now suppose only divides zero in the trivial way. Then look at all possible ways to multiply by other nonzero elements of . No two can give you the same result because if then (without using multiplicative inverses) , but we know that can only divide zero in the trivial way so . In other words, the map “multiplication by ” is injective. Because the set of nonzero elements of is finite you have to hit everything (the map is in fact a bijection), and some will give you .
Now let’s use this fact on in the obvious way. Since is a prime, there are no two smaller numbers so that . But in the number is equivalent to zero (mod )! So has no nontrivial zero divisors, and so every element has an inverse, and so it’s a finite field with elements.
The next question is obvious: can we get finite fields of other sizes? The answer turns out to be yes, but you can get finite fields of any size. Let’s see why.
Characteristics and Vector Spaces
Say you have a finite field (lower-case k is the standard letter for a field, so let’s forget about ). Beacuse the field is finite, if you take 1 and keep adding it to itself you’ll eventually run out of field elements. That is, at some point. How do I know it’s zero and doesn’t keep cycling never hitting zero? Well if at two points , then is a time where you hit zero, contradicting the claim.
Now we define , the characteristic of , to be the smallest (sums of 1 with itself) for which . If there is no such (this can happen if is infinite, but doesn’t always happen for infinite fields), then we say the characteristic is zero. It would probably make more sense to say the characteristic is infinite, but that’s just the way it is. Of course, for finite fields the characteristic is always positive. So what can we say about this number? We have seen lots of example where it’s prime, but is it always prime? It turns out the answer is yes!
For if is composite, then by the minimality of we get , but . This can’t happen by our above observation, because being a zero divisor means you have no inverse! Contradiction, sucker.
But it might happen that there are elements of that can’t be written as for any number of terms. We’ll construct examples in a minute (in fact, we’ll classify all finite fields), but we already have a lot of information about what those fields might look like. Indeed, since every field has 1 in it, we just showed that every finite field contains a smaller field (a subfield) of all the ways to add 1 to itself. Since the characteristic is prime, the subfield is a copy of for . We call this special subfield the prime subfield of .
The relationship between the possible other elements of and the prime subfield is very neat. Because think about it: if is your field and is your prime subfield, then the elements of can interact with just like any other field elements. But if we separate from (make a separate copy of ), and just think of as having addition, then the relationship with is that of a vector space! In fact, whenever you have two fields , the latter has the structure of a vector space over the former.
Back to finite fields, is a vector space over its prime subfield, and now we can impose all the power and might of linear algebra against it. What’s it’s dimension? Finite because is a finite set! Call the dimension , then we get a basis . Then the crucial part: every element of has a unique representation in terms of the basis. So they are expanded in the form
where the come from . But now, since these are all just field operations, every possible choice for the has to give you a different field element. And how many choices are there for the ? Each one has exactly . And so by counting we get that has many elements.
This is getting exciting quickly, but we have to pace ourselves! This is a constraint on the possible size of a finite field, but can we realize it for all choices of ? The answer is again yes, and in the next section we’ll see how. But reader be warned: the formal way to do it requires a little bit of familiarity with ideals in rings to understand the construction. I’ll try to avoid too much technical stuff, but if you don’t know what an ideal is, you should expect to get lost (it’s okay, that’s the nature of learning new math!).
Constructing All Finite Fields
Let’s describe a construction. Take a finite field of characteristic , and say you want to make a field of size . What we need to do is construct a field extension, that is, find a bigger field containing so that the vector space dimension of our new field over is exactly .
What you can do is first form the ring of polynomials with coefficients in . This ring is usually denoted , and it’s easy to check it’s a ring (polynomial addition and multiplication are defined in the usual way). Now if I were speaking to a mathematician I would say, “From here you take an irreducible monic polynomial of degree , and quotient your ring by the principal ideal generated by . The result is the field we want!”
In less compact terms, the idea is exactly the same as modular arithmetic on integers. Instead of doing arithmetic with integers modulo some prime (an irreducible integer), we’re doing arithmetic with polynomials modulo some irreducible polynomial . Now you see the reason I used for a polynomial, to highlight the parallel thought process. What I mean by “modulo a polynomial” is that you divide some element in your ring by as much as you can, until the degree of the remainder is smaller than the degree of , and that’s the element of your quotient. The Euclidean algorithm guarantees that we can do this no matter what is (in the formal parlance, is called a Euclidean domain for this very reason). In still other words, the “quotient structure” tells us that two polynomials are considered to be the same in if and only if is divisible by . This is actually the same definition for , with polynomials replacing numbers, and if you haven’t already you can start to imagine why people decided to study rings in general.
Let’s do a specific example to see what’s going on. Say we’re working with and we want to compute a field of size . First we need to find a monic irreducible polynomial of degree . For now, I just happen to know one: . In fact, we can check it’s irreducible, because to be reducible it would have to have a linear factor and hence a root in . But it’s easy to see that if you compute and take (mod 3) you never get zero.
So I’m calling this new ring
It happens to be a field, and we can argue it with a whole lot of ring theory. First, we know an irreducible element of this ring is also prime (because the ring is a unique factorization domain), and prime elements generate maximal ideals (because it’s a principal ideal domain), and if you quotient by a maximal ideal you get a field (true of all rings).
But if we want to avoid that kind of argument and just focus on this ring, we can explicitly construct inverses. Say you have a polynomial , and for illustration purposes we’ll choose . Now in the quotient ring we could do polynomial long division to find remainders, but another trick is just to notice that the quotient is equivalent to the condition that . So we can reduce by applying this rule to to get
Now what’s the inverse of ? Well we need a polynomial whose product with gives us something which is equivalent to 1, after you reduce by . A few minutes of algebra later and you’ll discover that this is equivalent to the following polynomial being identically 1
In other words, we get a system of linear equations which we need to solve:
And from here you can solve with your favorite linear algebra techniques. This is a good exercise for working in fields, because you get to abuse the prime subfield being characteristic 3 to say terrifying things like and . The end result is that the inverse polynomial is , and if you were really determined you could write a program to compute these linear systems for any input polynomial and ensure they’re all solvable. We prefer the ring theoretic proof.
In any case, it’s clear that taking a polynomial ring like this and quotienting by a monic irreducible polynomial gives you a field. We just control the size of that field by choosing the degree of the irreducible polynomial to our satisfaction. And that’s how we get all finite fields!
One Last Word on Irreducible Polynomials
One thing we’ve avoided is the question of why irreducible monic polynomials exist of all possible degrees over any (and as a consequence we can actually construct finite fields of all possible sizes).
The answer requires a bit of group theory to prove this, but it turns out that the polynomial has all degree monic irreducible polynomials as factors. But perhaps a better question (for computer scientists) is how do we work over a finite field in practice? One way is to work with polynomial arithmetic as we described above, but this has some downsides: it requires us to compute these irreducible monic polynomials (which doesn’t sound so hard, maybe), to do polynomial long division every time we add, subtract, or multiply, and to compute inverses by solving a linear system.
But we can do better for some special finite fields, say where the characteristic is 2 (smells like binary) or we’re only looking at . The benefit there is that we aren’t forced to use polynomials. We can come up with some other kind of structure (say, matrices of a special form) which happens to have the same field structure and makes computing operations relatively painless. We’ll see how this is done in the future, and see it applied to cryptography when we continue with our series on elliptic curve cryptography.