- definitions of congruence
- equivalence classes
- defining operations (+, *, etc.)

Notation:

*a*|*b*is read "*a***divides***b*". By definition,*a*|*b*if there is some*c*such that*c**a*=*b*.Definition: given an integer

*m*, two integers*a*and*b*are**congruent modulo m**if*m*|(*a*−*b*). We write*a*≡*b*(*m**o**d**m*). I will also sometimes say**equivalent modulo**.*m*Notation note: we are using that "mod" symbol in two different ways. The first was defined in a previous lecture:

*a**m**o**d**b*denotes the remainder when we divide*a*by*b*. The "mod m" in*a*≡*b*(*m**o**d**m*) 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*(*m**o**d**m*) if and only if*a**m**o**d**m*=*b**m**o**d**m*.

Definition: if

*a*,*m*∈*Z*then**[**(called the*a*]_{m}**equivalence class of**) is the set of all integers that are congruent to*a*mod*m**a*, mod*m*.Often times

*m*will be clear from context, in which case I will omit it and just write [*a*].Example: If we are working mod 5, then [2]=[7]=[12]=[−3]=[−8]. All of these have a remainder of 2 when divided by 5.

Note:

*a*≡*b*(*m**o**d**m*) if and only if [*a*]=[*b*] (proof straightforward)is the set of all equivalence classes of integers mod*Z*_{m}*m*.Example:

*Z*_{5}= {[0],[1],[2],[3],[4]}. [5] is in*Z*_{5}but I didn't list it because [5] is the same as [0].In general,

*Z*_{m}= {[0],[1],…,[*m*− 1]}. The other equivalence classes are already contained in this list. For example, [*m*]=[0], [*m*+ 1]=[1], and so on.If

*x*∈*Z*_{m}and*n*∈*x*then*n*is called a**representative**of*x*.

We can make equivalence classes behave like numbers by suitably defining operations on them. We just have to make sure that the operations we define make sense.

We can define addition as follows: if *x*, *y* ∈ *Z*_{m}, then to compute *x* + *y*:

- choose representatives
*a*of*x*and*b*of*y* *x*+*y*is then [*a*+*b*].

In other words, [*a*]+[*b*] is defined to be [*a* + *b*]. Example (still working mod 5): [2]+[6]=[8].

We have to check that this definition makes sense. There is freedom to choose different representatives; we must ensure that we get the same result if we make different choices. In other words, we must ensure that **addition is well defined**.

Example (still mod 5): Instead of writing [2]+[6], we might write [7]+[11] and get [18] instead of [8]. But since 8 ≡ 18, [18] and [8] are the same equivalence class.

Theorem: (working mod *m*) If *a* ≡ *a*′ and *b* ≡ *b*′ then *a* + *b* ≡ *a*′+*b*′. In other words, if [*a*]=[*a*′] and [*b*]=[*b*′] then [*a* + *b*]=[*a*′+*b*′].

Proof: Since *a* ≡ *a*′, by definition *m*|*a* − *a*′. Expanding the definition of "divides", this means that *a* − *a*′=*c**m* for some *c*. Similarly, *b* − *b*′=*d**m* for some *d*. Adding these together, we have (*a* − *a*′) + (*b* − *b*′) = *c**m* + *d**m*. Rearranging yields (*a* + *b*)−(*a*′+*b*′) = (*c* + *d*)*m*. In other words, *m*|(*a* + *b*)−(*a*′+*b*′), or *a* + *b* ≡ *a*′+*b*′. This means that [*a* + *b*]=[*a*′+*b*′], as desired.

The definition of addition had a lot of words. We can use function definition notation to make it more concise. Addition is a function that takes a pair of equivalence classes and gives an equivalence class:

+ : *Z*_{m} × *Z*_{m} → *Z*_{m}

It is given by the rule [*a*]+[*b*]=[*a* + *b*]. Using function notation:

+ : ([*a*],[*b*]) → [*a* + *b*]

**Super important**: Whenever defining functions on equivalence classes this way, you **must** check that the function is well defined (as we did for addition). Always check that choosing different representatives gives the same answer.

We can define multiplication:

* : *Z*_{m} × *Z*_{m} → *Z*_{m} is given by * : ([*a*],[*b*]) → [*a**b*].

Example (still mod 5): [3][4]=[12].

Proof that * is well defined is left for the future.

I encourage you to think about other operations and whether they are well defined.