Week 4 - Day 1: Congruence and Congruence Classes
§2.1 Congruence and Congruence Classes
Definition
Fix some \( n \in \mathbb{N} \) (called the modulus). For \( a, b \in \mathbb{Z} \), we say that \( a \) is congruent to \( b \) modulo \( n \) and write \( a \equiv b \pmod{n} \) provided that:
(Their difference is a multiple of \( n \))
True/False Examples
We calculate:
So, \( 12 \mid (11 - 23) \). True (military time example).
We calculate:
So, \( 7 \mid (365 - 1) \). True (day of the week example).
Another Point of View
Two numbers are congruent modulo \( n \) if you can get from one to the other by adding or subtracting multiples of \( n \).
Important Special Case
Which integers are congruent to \( 0 \) modulo \( n \)?
Intuition
Mod \( n \) arithmetic is like normal arithmetic, except as if \( n \) were treated like 0.
Example
(Clock arithmetic)
Theorem (HW)
Congruence modulo \( n \) is an equivalence relation.
For example, it's transitive...
If \( a \equiv b \pmod{n} \) and \( b \equiv c \pmod{n} \), then \( a \equiv c \pmod{n} \).
Theorem
Recall that \( a \) and \( b \) leave the same remainder modulo \( n \) if and only if:
Theorem (Equivalent Condition for Congruence)
So, modular arithmetic glues together integers that leave the same remainder.
Corollary
Every integer \( a \) is congruent to its remainder mod \( n \).
Example
Proof
Let \( a \in \mathbb{Z} \). By the Division Algorithm (DA), \( a = nq + r \) for some \( q, r \in \mathbb{Z} \), where \( r \) is the remainder when \( a \) is divided by \( n \). Thus, \( a - r = nq \), hence \( n \mid (a - r) \), and therefore \( a \equiv r \pmod{n} \). \(\square\)
Question
Using modulus \( N = 3 \), what are the first 4 natural numbers that are congruent to 1?
Congruence Classes
Recall: Given an equivalence relation, the set of elements that are equivalent to a given element \( a \) is called the equivalence class of \( a \), denoted \([a]\).
When the relation is congruence, we call them Congruence Classes.
In general:
Example (Using Modulus \( n = 3 \))
Visualization of Equivalence Classes
The mapping \( \pi(x) = [x] \) represents the equivalence classes.
Definition
The number \( a \) is called a representation of the class \( [a] \).
Note
For \( n = 3 \), since \( [1] = [4] \), the same class can have different representations.
Recall
In general, \( a \equiv b \iff [a] = [b] \).
Theorem 2.3
Two integers are congruent if and only if they represent the same class:
Definition
The set \( \mathbb{Z}_n \) is the set of congruence classes of integers modulo \( n \). That is:
Note
A priori, \( \mathbb{Z}_n \) appears to be infinite, containing one class per integer. But it isn’t!
Example
Consider the case \( n = 3 \):
This simplifies to:
Theorem
Example (Where \( n = 3 \))
The mapping \( \pi \) is always surjective and never injective.