 To fight a field with p to the power k elements, we introduce the following idea. Let r be a ring, then rx is the ring of polynomials in x. The elements of rx are polynomials in x with coefficients from r, and multiplication and addition of polynomials follows the usual rules. We're just to say we'll add and multiply the coefficients according to how the ring defines addition and multiplication. And so our first important theorem, the ring of polynomials, is a ring. This might seem to be self-evident because we're calling it a ring of polynomials, but remember, if you call a tail a leg, how many legs does a dog have? And the answer is, four. Calling a tail a leg doesn't make it a leg. And just because we call this the ring of polynomials doesn't mean it's a ring. And so this statement actually requires a proof. And so maybe we're lucky and this ring is actually a field. Well, we're not that lucky. The ring of polynomials is not generally a field. Now let's make the polynomial connection. Polynomials with integer coefficients are analogous to the whole numbers. So 423 can be viewed as an analog to the polynomial 4x squared plus 2x plus 3. The difference is that when we write a whole number, we only use the digits 0 through 9, whereas our coefficients of a polynomial could be anything. But if we require our coefficients to be integers mod n, we'll get something even more similar to the whole numbers, because then our coefficients will be integers between 0 and n. So suppose we use zp, the integers mod p. If our ring is zp, the integers mod p, there will be a finite number of polynomials of any given degree. So if we work with z2, but we don't have to, we have 2 polynomials of degrees 0 or less, namely 0 and 1, 4 polynomials of degree 1 or less, 0, 1, x, and x plus 1, 8 polynomials of degree 2 or less, and in general 2 to k polynomials of degree k plus 1 or less. But this still gives us an infinite number of polynomials. So how can we limit ourselves to polynomials of degree k or less? So remember that working mod n means you only have to deal with numbers up to n, to work with integers mod n, divide by n, and record the remainder. This suggests we can work with a ring of polynomials zp, x, where we divide by some polynomial and record the remainder. Since the remainder will be divided by k plus first degree polynomial, will always be a polynomial of degree k or less, let's use a k plus first degree modulus. But which one? So let's summarize what we've done so far. And so we found the ring of polynomials zp, x could be used to make a ring with p to the n elements, provided we mod out the higher degree polynomials. Because we want to have a field, we need to make sure that every nonzero element has an inverse. Now you might recall that when working mod n, every nonzero element had an inverse whenever n was prime. So let's work with polynomials mod f of x, where f of x is prime. So, for example, let's find f2 squared, the field with 2 to the second 4 elements. We'll start with zp, x, the ring of polynomials whose coefficients are the integers mod p. Since the coefficients could be any of 0, 1, 2, and so on up to p minus 1, then there are p to the n polynomials with degree less than n. If you want these polynomials to be elements of a field with 4 elements, we need to find p and n, where p to the n equals 4. And we see that p equals 2, n equals 2 works. And so we start with polynomials z2x, which are 0, 1, x, and x plus 1. Now, since we want to limit ourselves to polynomials of degree 1 or less, we'll need to mod out by a degree 2 polynomial. But which one? We want one that is prime with respect to the field elements. Now, determining if something is prime is very difficult, but we can approach it another way. A polynomial is prime if it can't be the product of field elements. And we know what the field elements are, so we can take a look at the possible products. We know what the products that give us degree 2 polynomials are. Multiplying these out gives. So these degree 2 polynomials are composite. Well, there's only one other second degree polynomial in z2x, x squared plus x plus 1. And so we'll work mod x squared plus x plus 1. And now we can work mod x squared plus x plus 1 and compute the addition tables directly. Again, since 0 is our additive identity, we know the first row and first column of our addition table. And we can compute the others directly. 1 plus 1 is 2, but since we're working with polynomials in z2x, our coefficients can be reduced to mod 2. So we get 0. x plus 1 is just x plus 1. And finally, x plus 1 plus 1. Well, that's x plus 2, but we can reduce mod 2 to get x. In the next row, x plus x is 2x, which reduces to 0. x plus x plus 1 is 2x plus 1, which reduces to. And finally, x plus 1 plus x plus 1 is... and that gives us our addition table. How about multiplication? So again, 0 is the additive identity and 1 is the multiplicative identity. So this gives us the first and second rows and first and second columns of our multiplication table. So we find x times x, which is x squared, but we need to work mod x squared plus x plus 1. Now, we could divide by x squared plus x plus 1 and find the remainder, but an important rule in life, avoid division if at all possible. And here the useful thing to remember is the modulus is equivalent to 0, so we can add it without changing the value of the congruence. So why would we do that? Well, suppose I added x squared plus x plus 1. Well, I'd get 2x squared plus x plus 1, but remember our coefficients are coming from z2. So 2 is equivalent to 0, and so our x squared term drops out and so our product is just going to be x plus 1. Similarly, x times x plus 1, we can multiply that out using our ordinary polynomial multiplication, add the modulus, reduce our coefficients mod 2, and similarly for x plus 1 times x plus 1. This gives us the finite field with four elements, designated gf2 squared, the Galois field with 2 squared 4 elements. This may seem to be a lot of work, but remember finding the sums and products could be done using ordinary algebra instead of the exhaustive logical analysis we had to do before. And this makes it much easier to find finite fields with very large numbers of elements. And, well, we'll talk about that next.