Let We say that form a complete set of residues module , because they have exactly one representative from each congruence class. The ring is equipped with addition and multiplication modulo . It is easy to check that this ring is commutative.
Example 1.5.1 (Associativity)
Let . We write
with . Then
hence
Notation We will denote the multiplicative group of units (invertible elements) modulo by (
Lemma 1.5.2
Let and Then is invertible modulo if and only if .
Example 1.5.3
We have
Proof
The integer is invertible module if and only if there exist such that . By Bezout’s lemma, such integers exist if , and conversely if such integers exist then must be coprime.
Hence comprises the coprime residue classes modulo . The Euler totient function counts the number of coprime residue classes:
Therefore
Example 1.5.4
We have
Lemma 1.5.5
If is prime, then is a field, and
has orderProof
It is a commutative ring, and any non-zero element is invertible (being coprime to the modulus)
We also denote this by . Note that if is composite then isn’t a field since any prime divisor of is non-invertible.
Example 1.5.6
We have
Mod 13 (Card Game)
- Each player is dealt a hand of cards, interpreted as residue classes modulo 13, and two cards are placed into the centre.
- Racing, a player can either play the sum (a1a22a2—a1a2^2a1^{-1}a_3$, declaring what type of move they have made
- Play continues with cards and in place of and and so on, until somebody finishes and wins
Example 1.5.7
Geometric progression: 7, J, and..? We have
so the next card is
Lemma 1.5.8 (Solving a linear congruence)
Let and . Then: #
(a) There exists solving if and only if
(b) If and is a solution to , then all solutions are given by
Proof
Put
so that
(a) if and then . Conversely, if then, writing , our congruence becomes . This has a solution because . It’s given by times the inverse of module .
(b) If and then . It remains to show that there are no other solutions. If solves the congruence then , so divides by the general Euclid lemma. Therefore for some .
Theorem 1.5.10 (Classical Chinese Remainder Theorem)
Let be pairwise coprime, and let . Then there exists , unique modulo such that
This is given by , where andProof we have For uniqueness, observe that if are solutions then is divisible by . As the are pairwise coprime, it follows from the fundamental theorem of arithmetic that divides
For existence, observe that for each
Theorem 1.5.14 (Algebraic Chinese Remainder Theorem)
Let be pairwise coprime, and put . Then
is a ring isomorphism. Moreover, it restricts to a group isomorphism
Proof
Well-defined: If then
We saw that modular arithmetic respects addition and multiplication, so is a ring homomorphism. The classical Chinese remainder theorem defines an inverse function, so is bijective and therefore an isomorphism.
For the second part, note that is coprime to if and only if it’s coprime to each . Therefore restricts to a bijection
This is a group homomorphism because is a ring homomorphism. Hence, it’s a group isomorphism.
Recall that an arithmetic function is a function and than an arithmetic function is multiplicative if holds for any coprime positive integers and .
Corollary 1.5.15
Euler’s totient function is multiplicative
Proof
Apply the algebraic Chinese remainder theorem with
Lemma 1.5.16
For we have
where the product is over primes dividing .Proof
Observe that . Next, suppose for some prime and some . then is he number of residue classes that aren’t divisible by , which is
Finally, suppose , where the are pairwise distinct primes and the are positive integers. Then
Lemma 1.5.18 (Totient function identity)
For , we have
where the sum is over the positive divisors ofProof
There are 2 steps to this proof:
First, we show that the arithmetic function
is multiplicative. Let and be coprime positive integers. Then the positive divisors of are the numbers of the form , where are positive divisors of respectively, and . This
So is multiplicative.
It remains to prove that for any prime power . We compute: