# Lecture 19: Modular numbers

• Two equivalent definitions of congruence mod m
• introduced equivalence classes

# Congruence mod m

• Notation: ab is read "a divides b". By definition, ab if there is some c such that ca = b.

• Definition: given an integer m, two integers a and b are congruent modulo m if m∣(a − b). We write a ≡ b (modm).

• Notation note: we are using that "mod" symbol in two different ways. The first was defined in a previous lecture: amodb denotes the remainder when we divide a by b. The "mod m" in a ≡ b (modm) is a note on the side of the equation indicating what we mean when we say " ≡ "

• Fact: These two uses of "mod" are quite related: a ≡ b (modm) if and only if amodm = bmodm.

• Fact: for any m, congruence mod m is an equivalence relation.

# Equivalence classes

Given any equivalence relation  ∼  on a set A, can break A up into several groups of interrelated elements.

Definition: if x ∈ A, then the equivalence class of x (written [x] ∼ ) is the set of all elements of A that are related to x. If  ∼  is clear from context I will often omit it and just write [x].

The set of all equivalence classes of elements of A is written A /  ∼  and is pronounced "A mod  ∼ ".

Examples:

• If A is the set of people, and  ∼  is the "is a (full) sibling of" relation, then A /  ∼  could be thought of as the set of (nuclear) families.

• If A is the set of finite sets, and  ∼  is the "has the same cardinality as" relation, then A /  ∼  has an element for each n ∈ N.

# Modular numbers

We used the notion of equivalence classes to define the "modular numbers". The set of integers mod m (written Zm) is the set of all integers modulo the "congruent mod m" relation.

Example: - Z5 = {[0], [1], [2], [3], [4]} - Z3 = {[0], [1], [2]} = {{…, 6,  − 3, 0, 3, 6, 9, …}, {…,  − 5,  − 2, 1, 4, 7, …}, {…,  − 4,  − 1, 2, 5, 8, …}}

In general, Zm has m elements.

In future lectures, we will discuss how to add, multiply, exponentiate and divide equivalence classes.