Using equivalence classes to simplify problems
Definition: [a] = [b] if a ≡ b(modm) which means m∣(a − b) which means there is some k with a − b = km.
Equivalently, [a] = [b] if and only if a = b + km for some k. We'll use this form several times.
Claim: defining [a] + [b] as [a + b] is well-defined. That is, if [a] = [aʹ] and [b] = [bʹ] then [a + b] = [aʹ + bʹ].
Proof: to start, we'll just choose a different representative of a.
Suppose [a] = [aʹ]. Then a = aʹ + km for some k. Thus a + b = aʹ + km + b = (aʹ + b) + km. Thus [a + b] = [aʹ + b].
Now, suppose [a] = [aʹ] and [b] = [bʹ]. Then we can use the above twice to conclude [a + b] = [aʹ + bʹ]:
[a + b] = [aʹ + b] = [b + aʹ] = [bʹ + aʹ] = [aʹ + bʹ]
Claim: defining [a][b] as [ab] is well defined.
Proof: as above, we'll just choose a different representative for [a] and then use commutativity.
Suppose [a] = [aʹ]. Then a = aʹ + km for some k. So
ab = (aʹ + km)b = aʹb + (kb)m
Thus [ab] = [aʹb].
Claim: defining − [a] as [ − a] is well defined.
Proof: suppose [a] = [aʹ]. Then a = aʹ + km. Thus − a = − aʹ + ( − k)m. Thus [ − a] = [ − aʹ].
Claim: if n is an integer, then defining [a]n as [an] is well defined.
Proof: use induction on n and the fact that multiplication is well defined.
Compute 11734 mod 10. Use the fact that  = . Answer: 
Compute 9735 mod 10. Use the fact that  = [ − 1]. Answer: 
Compute 7735 mod 10. Use the fact that 7735 = 72 ⋅ 367 + 1 = 49367 ⋅ 7 and  = [ − 1]. Answer: .
a ring is a set of things that you can add and multiply, and addition and multiplication obey the usual rules (e.g. commutativity, distributivity, etc.)
in a ring, a unit is an element with a multiplicative inverse. That is, x is a unit of R if there exists a y ∈ R with xy = 1.
You proved in homework that units of Zm are [a] where a and m are relatively prime.
Defining n[a] as [na] doesn't work. Counterexample: let m = 5, n = 2, a = 2. Then [a] =  = , but  =  and  =  =  ≠ .
The totient of m, written ϕ(m) (pronounced "phi" of m, LaTeX
\phi) is the number of units of Zm.
Examples: ϕ(7) = 6, ϕ(4) = 2.
We'll use totient in next lecture to define exponentiation.