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

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 order

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)

  1. Each player is dealt a hand of cards, interpreted as residue classes modulo 13, and two cards are placed into the centre.
  2. Racing, a player can either play the sum (a1a22a2—a1a2^2a1^{-1}a_3$, declaring what type of move they have made
  3. 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

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 and

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

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

Lemma 1.5.16

For we have

where the product is over primes dividing .

Lemma 1.5.18 (Totient function identity)

For , we have

where the sum is over the positive divisors of