Finite Fields
Finite Fields
S. R. DOTY
People say that a, b are relatively prime if their gcd is 1. This means
that they have no prime factors in common, since if p | a and p | b then
(a, b) ≥ p is surely larger than 1.
One way to compute the gcd of two given positive integers is to make
a list of the divisors for each given number, and then the gcd is simply
the largest number common to both lists. Of course, this is virtually
impossible if the two numbers are large, but it works well enough for
small numbers. For instance, let us compute the gcd of the pair 51, 33
using this idea. The divisors of 49 are 1, 7, 49 and the divisors of 210
are 1, 2, 3, 5, 6, 7, 10, 14, 15, 21, 30, 42, 70, etc. The largest number
that is common to both lists is 7, so 7 = gcd(49, 210).
Another method is to factor each given number into its prime factor-
ization. Although this is virtually impossible for very large numbers,
it is pretty easy to do for small numbers. For instance, let us compute
the gcd of the pair 209, 1368 using this idea. You can check with your
calculator or by pen and paper that 209 = 11 · 19 and 1368 = 23 · 32 · 19.
Thus it follows immediately that gcd(209, 1368) = 19. Note that this
method, while better than the first method, still falls apart if we can-
not find the prime factors of the numbers. (Please tell me the prime
factors of 1273932017264838292093 if you doubt that this is a serious
obstacle.)
A third way to compute the gcd is to use the Euclidean algorithm.
It turns out that for large numbers this third way is far and away
the best, in terms of efficiency. For instance, to compute the gcd of
two random 100 digit numbers by a digital computer using the first or
second method would require so many divisions that even the fastest
computer would not compute an answer in a reasonable time. (It would
take many years, even for the fastest supercomputer.) However, even
a desktop PC could obtain an answer to the same problem using the
Euclidean algorithm in a second or so, because only a few hundred
divisions would be required! Now that you are convinced the Euclidean
algorithm is a great thing for mankind, let’s examine how it works.
r1 = r 2 q 3 + r 3 (0 ≤ r3 < r2)
..
.
and putting that linear combination into the gcd equation above and
grouping terms gives us
Modular Arithmetic
Next we come to the study of modular arithmetic and congruences.
This is an important application of our brief study of number theory.
Before giving the technical theory, it is perhaps worthwhile to make
some comments on the intuition behind modular arithmetic.
The basic idea in modular arithmetic is embodied in the ordinary
12 hour clock. We all know that if it is currently 11 o’clock, then two
hours from now will be 1 o’clock, because at 12 o’clock we start over
again at zero. We can symbolize this situation by writing the equation
11 + 2 = 1 (mod 12), or 11 + 2 ≡ 1 (mod 12). (Either notation is
common.)
To do modular arithmetic (that is, addition, subtraction, and mul-
tiplication) mod 12 we just compute as usual in Z taking into account
that all multiples of 12 are the same as zero. Thus we have 10 + 5 ≡ 3
(mod 12), 10 · 5 ≡ 2 (mod 12), and 5 − 10 ≡ −5 ≡ 7 (mod 12). Note
that the preferred answer for any modular arithmetic calculation is a
natural number between 0 and 11 (inclusive). These are the same as
the numbers on the face of the clock, except that 12 has been replaced
by zero.
6 S. R. DOTY
EXAMPLE. You can check that 7919 is prime. Let’s compute the
inverse of a = 210 in the finite field Z7919. The gcd of 210 and 7919
is 1, of course, and using the Euclidean algorithm we can find integers
s and t such that 1 = 210s + 7919t. In fact, s = 1169 and t = −31
as you can check. Thus x = 1169 is a solution to the congruence
210x ≡ 1 (mod 7919), so the inverse of 210 in Z7919 is the element
210−1 = 1169 = 1169. You can check this by computing the residue of
210 · 1169 (mod 7919), which should be 1.
In any field, we can define division by any nonzero element b, by
setting a/b = ab−1 . Intuitively, a field is a structure in which we have
all the ordinary operations of arithmetic: addition, subtraction, mul-
tiplication, and division, such that these operations satisfy the usual
properties of algebra. In addition to the familiar number fields Q, R,
C we have the novel finite fields Fp = Zp of p elements, for every prime
number p.
Exercises
(1) (a) Use the Euclidean algorithm to compute gcd(48157656, 541541).
(Use your calculator.)
(b) Find integers s, t such that
gcd(48157656, 541541) = 48157656s + 541541t.
(2) Show that if gcd(a, n) 6= 1 then a is not invertible modulo n.
(3) Compute the following:
(a) 2−1 (mod 7).
(b) 4−1 (mod 15).
(c) 23−1 (mod 275).
(d) 909−1 (mod 81799). (Use Euclidean algorithm.)
(4) Use your answers to the preceding exercise to solve the congruences:
(a) 2x ≡ 4 (mod 7).
(b) 4x ≡ 13 (mod 15).
(c) 23x ≡ 200 (mod 275).
(d) 909x ≡ 8910 (mod 81799).
Hint: Simply multiply by the inverse.
(5) Let R be a commutative ring. Prove, using only the axioms listed
in the definition of commutative ring, that for any elements a, b, c of
R we have:
(a) a0 = 0.
(b) a(−b) = −(ab) = (−a)b.
(c) (−a)(−b) = ab.
(d) a(b − c) = ab − ac.
(e) (−1)a = −a.
Note: b − c = b + (−c) (definition).
12 S. R. DOTY
(6) Show that the number of invertible elements in the ring Zn is ϕ(n),
for any n. Here ϕ(n) is the number of integers in the range 1, 2, . . . , n
which are relatively prime to n. The function ϕ is called Euler’s phi
function.
(7) Prove that congruence mod n is an equivalence relation on Z (The-
orem A.12).
(8) Prove Theorem A.13.
(9) Show that a congruence ax ≡ b (mod n) is solvable if and only if
gcd(a, n) divides b.
(10) Explain the contradiction at the end of the proof of A.21. In other
words, what is contradicted if you have elements a 6= 0, b 6= 0, and
c in a ring such that ac = 1 and ab = 0?
(11) Prove Theorem A.10.