The group Zn: This group has as
elements the equivalence classes [0]n,
[1]n, ..., [n-1]n;
note that there are n many such classes.
Its identity element is the class [0]n, which is
a two-sided identity for the addition of classes, defined as
[x]n + [y]n =def [x+y]n.
Exercise: Compute the class [11]13 +
[5]13.
In the exercises, you will show that this definition actually makes
sense. Note that this addition is associate, that
[0]n is a two-sided identity for this
addition and that each class [x]n has an
additive inverse, namely the class
[-x]n. Thus,
(Zn,+,[0]n) is an example of a
finite, commutative group.
Exercise: Compute the class [11]13 +
[5]13 - [8]13.
The group Zn*:
- First, we define a multiplication on the elements of
Zn:
[x]n * [y]n =def [x*y]n.
In the exercises, you will show that this definition actually makes
sense.
- We call a class [x]n invertible iff
there is some class [y]n such that
[x]n * [y]n equals
[1]n. We will also say that x is invertible
modulo n.
- The elements of Zn* are exactly
the invertible elements of Zn.
- Fact: a class [x]n is invertible iff
x has no common factor with n.
- Consequence: if n is prime, then Zn*
has n-1 elements, the classes [1]n,
[2]n, ..., [n-1]n.
- Example: if n equals 6, then there are only two invertible classes,
namely [1]6 and [5]6.
All other classes have a common factor with 6. (Question:
What is the inverse of [5]6?)
- Euler's totient function: For a natural number n, we define Phi(n) to be
the number of elements in Zn*.
For example, we saw that Phi(6)=2 and Phi(p)=p-1 for all primes p.
- Exercise #11(a) on page 56:
Let p and q be prime. Then Phi(p*q)=(p-1)*(q-1).
Fermat's Theorem: If p is prime and if a is an element of
{1,2,...,p-1}, then ap-1 mod p = 1.
Since p is prime, a does not have a
common factor with p. Therefore, a is
invertible modulo p, so it suffices to show that
ap mod p = a, for we can then "divide" both sides
of the equation by a. We show
ap mod p = a by mathematical induction on
a:
- Base case: If a equals 1, then ap mod p
equals 1 as well, but this is just a.
- Inductive step: Assume that ap mod p = a holds. We need to show that (a+1)p mod p = a+1 holds
as well. For that, we use the binomial theorem, noting that choose(p,k)
contains p as a factor if 1 < k < p. Thus, we get
(a+1)p mod p = ap mod p + 1p mod p
= ap mod p + 1 = a + 1 by our induction hypothesis.