 This lecture is part of Berkeley Math 115, an introductory undergraduate course on number theory, and will be mostly about fields in number theory. So we first quickly just recall that a field is just a ring. So you remember a ring is something with addition, subtraction, and multiplication, and a zero and a one satisfying the usual rules of high school algebra. The difference between a ring and a field is that a field also has division, so we can define a divided by b if b is not equal to zero. So we record typically examples of fields of the rationals or the reals or the complex numbers. And in this course, perhaps the most important example of a field is the ring of integers modulo pz for p prime. And what we're going to do is to generalize several of the theorems we've proved about this field here, the integers modulo p, to more general fields or sometimes just more general finite fields. So we recall that over any field, if we've got a polynomial f x with coefficients in field k, then f has at most n roots where n is equal to the degree of f. So we proved this earlier when f is the field of integers modulo p, and the only property we used was that this was a field, so this works fine for any other field. Now let's go through a few theorems that we had about number theory and see how they generalize. The first thing we had is that p has a primitive root, this is for p prime. What this means is a primitive root g is an element such that g has order exactly p minus one in z modulo pz star. So every element, every nonzero element modulo p is a power of this primitive root g. And another way of saying this is that this group here is cyclic. So a cyclic group is just one such that there's some fixed element which could be called a primitive root or a generator such that every element is a power of it. And now we want a generalization of this to field. So suppose k is a field and g a finite subgroup of k star, this means the nonzero elements under multiplication. So for example, if k is a finite field, we could take g to be all nonzero elements because that is a finite subgroup. Then g is a cyclic group. So this generalizes the theorem about a primitive root to all fields. It just says that any finite subgroup of the multiplicative group of a field is always cyclic. And the proof is much the same as we gave that p has a primitive root. The key point is that any polynomial x to d minus one equals zero has at most d roots. Here we're using the property that we're working over a field because if you're working over something that isn't a field, this could have more than d roots. So any element g has at most d elements of order d for any integer d greater than one. And this was the property that we used to show that the integer's modulo p had a primitive root. And exactly the same argument shows that g is cyclic. So you remember that the key point is we used the fact that the sum of the divisors of n of Euler's phi function of d is equal to n, and then did a careful counting argument of the number of elements of each given order in g and found there must be some elements whose order was equal to the order of g. So for example, if k is finite, this implies the multiplicative group of nonzero elements of k is a cyclic group. Of course, if k is infinite, an infinite field, the group of nonzero elements is usually not a cyclic group. In fact, it's never a cyclic group for k infinite. Another example might be you take the complex numbers, and then you notice that there are several subgroups of complex numbers. For instance, we could take the fifth roots of one, and the fifth roots of one form a cyclic group of order five, and the same thing happens if you change five to any other number. In fact, this is sort of where the name primitive root comes from for finite fields, because a primitive root in the complex number is a root of one so a primitive nth root is a root of one of order exactly n, and this is exactly the same for finite fields, because a primitive root is a root of one of order p minus one. So next there's a very close analogy between the integers and the polynomials over a field. So you remember the integers form a unique factorization domain where every number can be written as a product of primes, and we saw last lecture that the ring of polynomials over a field is also a unique factorization domain, and every polynomial is a product of irreducible polynomials. That's a polynomial that can't be written. It's not a zero or a unit and can't be written as a product of other polynomials, so primes and irreducible polynomials are really almost the same thing. And now for the integers, if we took the integers modulo prime, this was a field, and if we take the ring of polynomials over a field and take kx over f times k of x, where f is an irreducible polynomial, then this is also a field, and proof of this is much the same as for the integers. You can just sort of use Euclid's algorithm to find inverses. And an awful lot of stuff we've talked about about the integers modulo p in number theory. A lot of it generalizes to these fields here. Well, so let's have some examples of this. We can in fact take k to be one of these fields here. So I suppose we take k to be z over 2z. Then we found some irreducible polynomials last lecture, so we had some irreducible polynomials like x squared plus x plus one, x cubed plus x plus one, and there's even x to the four plus x plus one, or x to the four plus x cubed plus one, x cubed plus x squared plus one are several examples. So we can take one of these polynomials and we can form a new field. For instance, we can take the polynomial z over 2z, take polynomials over this and quotient out by all multiples of the polynomial x squared plus x plus one. And the elements of this will be things of the form a plus b times x with a, b in z modulo 2z. So there are four elements of this field. We've constructed a little field of order four. You notice this is very analogous to the construction of the complex numbers. The complex numbers we just take r of x modulo x squared plus one. And this is also a field of complex numbers whose elements commuted as a plus b x for x squared minus one. Here, x squared is not minus one, it's equal to x plus one. So this is an example of something called a finite field. So let's say a bit more about these. So finite fields turn up a lot in number theory. This is of course just a field of finite order. And we have some examples of them. First of all, z modulo pz is obviously an example. And then we also have z modulo pz. Then we take polynomials over this, modulo some irreducible polynomial f. So we've seen some examples of order four or eight or 16. You notice the number of elements is just equal to p to the power of the degree of f because the elements are just things of the form a naught plus a one x all the way up to plus a n minus one x to the n minus one where n is the degree of f. That's because any polynomial is a multiple of f plus a polynomial of degree less than f. And the number of these is just p times p times p and so on, which is p to the power of the degree of f. So whenever you can find an irreducible polynomial over a finite field of order p of degree n, we've constructed a finite field of order p to the n. Conversely, any finite field has order p to the n for some prime p and some n greater than or equal to one. And the reason for this as follows. If f is a finite field, we look at the multiples zero one two and so on of one. And since the field is finite, one of these must be equal to zero. So we must have n equals zero for some n. And the minimum value of n with this property with with n equals zero in the field is a prime. Because other if it was a factor of two numbers a and b, which was smaller than n, then one of these would have to be zero. So we see that the finite fields must actually contain the field z modulo p z for some p. And then we forget that f we now forget that f is a field and just think of f as being an abelian group. And you know it's an abelian group, but you can also multiply by elements of this field. So f is a vector space over the field z modulo p z. And it must be a finite dimension. So I suppose the dimension is n. That means you can pick a basis and all its elements can be written in the form a one up to a n for a i in c modulo p z as usual for a vector space. So the order is p to the n. So any finite field is ordered p to the n. And conversely, we can find finite fields of order p to the n by taking a suitable irreducible polynomial. In fact, all finite fields come like this. We can see this by looking at the structure of a finite field. So f is going to be a finite field. And then we recall we showed that the multiplicative group, that's all none zero elements under multiplication, is cyclic. So it has a generator g. And if f is the minimal polynomial with g as a root, then f, it's not difficult to see that f must then be equal to z modulo p z, quoted it out by all multiples of f. So any finite field is generated by a root of some irreducible polynomial because we can just pick a generator and find a polynomial that is a root. So all finite fields arise from irreducible polynomials over the finite field of order p. The additive group, so let's look at the group of f under addition, is usually not cyclic unless f is equal to z modulo p z. It seems to be quite a common mistake to assume that it's just the cyclic group z to the modulo p to the n z, but that's simply false. In fact, it's sort of obviously false because this is actually a vector space. So it must actually be isomorphic to some of copies of the additive group z modulo p z. And in particular, all elements have order p under addition. So don't go around making the standard mistake about finite fields that multiplicative groups are cyclic. The additive groups are usually not cyclic. Then we have Fermat's theorem. So Fermat's theorem for z modulo p z just says that x to the p is congruent to x mod p. And the same is true that we can do something similar for all finite fields. So you know the order of the finite field is p to the n. And we have the x to the p to the n is equal to x for all x in the finite field f. And the reason for this is that if x equals zero, this is obvious. And if x is not equal to zero, then x is in the multiplicative group of f star. So x to the power of x to the order of the multiplicative group is equal to one by Lagrange's theorem, which just says x to the p minus p to the n minus one is equal to one. And putting these together shows that this is always true. So so Fermat's theorem works for finite fields, except you've got to put in the order of the finite field in the exponent here. Now we saw earlier that if we work with the integer's modulo p, then x to the p minus x factorizes as x times x minus one times x minus two times x minus p minus one. That's mod p. We can do something similar over any finite field. We find x to the p to the n minus x factorizes as the product over all alpha in the finite field of x minus alpha. And the proof is much the same. We notice that all these all elements alpha of the finite field are roots of this polynomial by the generalization of Fermat's theorem. So this polynomial must be divisible by this polynomial. And then we notice they both have the same degree and they have the same leading coefficients. They must actually be the same. So this always holds in the ring of polynomials over any finite field. And then you remember we had several applications of this identity for finite fields. You can do something similar. We had several applications of this modulo p and these applications all have analogs for any finite field. For an example, we used this polynomial to find all roots of a polynomial modulo p. And by fiddling around with it a little bit, we could even factorize all polynomials with coefficients in modulo p. And if we use this polynomial instead, we can find roots of a polynomial over any finite field and factorize polynomials over a finite field. You remember there was an analog between the integers and polynomials modulo p. They were both unique factorization domains and so on. And we can also have analogs of theorems about z become theorems about this ring here. For example, we've already had Fermat's theorem. In z modulo pz, we have x to the p is congruent to x. And we notice that if we take this ring here, z modulo pz of x modulo f irreducible, then x to the p to the n is congruent to x, where n is equal to the degree of f. Now, so that's Fermat's theorem. We also had Euler's theorem, which says that in z over mz, we have x to the phi of x is congruent to 1, provided x is co-prime to m. So what would the analog of this be for polynomials over a finite field? Well, this time, we would take polynomials z modulo pz of x. So we take polynomials with coefficients in z and we modulo over any polynomial f, which need not be irreducible. And what can we say about this? Well, we can still say that x to the order of the non-zero elements is equal to 1 in this ring here. And now you remember, we had a Chinese remainder theorem which says that z modulo mnz is isomorphic to z over mz times z over nz. So that's just the Chinese remainder theorem. And the Chinese remainder theorem works also for polynomials over a finite field, or for that matter for polynomials over any field. If we take z modulo pz x over f times g, then this is isomorphic to z over pz of x modulo multiples of f times z over pz of x modulo g, provided f and g are co-prime. And the proof of this is actually just a special case of the Chinese remainder theorem for arbitrary rings that we had earlier. Then we had Wilson's theorem, which said that p minus 1 factorial is congruent to minus 1 mod p. And this is the field z modulo pz, and it just says the product over all alpha not equal to 0, alpha in z modulo pz is equal to minus 1 in z modulo pz. And the same works for all finite fields. So the analog for finite fields says that if f is a finite field, we can take the product of all elements of the finite field to non-zero, and this is again equal to minus 1 in the finite field f. And we sort of already proved this because this is true for groups where minus 1 is the only element of order 2. And for any finite field, minus 1 is again the only element of order 2, because that would be a square root of 1 and a field only has 2 square roots of 1, which are 1 and minus 1. If the finite field is of characteristic 2, in other words, 2 is equal to 0, you need to be slightly more careful about this, but in that case, minus 1 is actually equal to plus 1, so this is still true. So I'll just mention some more results. We said that any finite field is of the form z modulo pz of x modulo an irreducible polynomial f. And at first sight, there seem to be lots of different finite fields of a given order. For instance, there are two polynomials of irreducible polynomials of degree 3 over the field of order 2, which are x cubed plus x plus 1 and x cubed plus x squared plus 1. So we seem to have two different fields of order 8, but in fact these fields are really isomorphic. In general, there is exactly one finite field of order p to the n for any prime p and any n greater than or equal to 1. The proof of this uses a bit more field theory than I really want to cover in this course. I'll just mention the key point. The finite field of order p to the n is something called a splitting field of the polynomial x to the p to the n minus x. So to find out what a splitting field is, you need to go to a course on algebra, and then there's a theorem in algebra that says splitting fields exist and are unique, and that gives you existence and uniqueness of finite fields of order p to the n. That's all I want to say about fields in number theory. Next lecture will be on quadratic reciprocity, which tells you whether or not a number is a square modulo p.