- Euler's theorem
- statement
- proof

Here are several different ways of stating Euler's theorem. The first is how I remember it.

**version 1**: exponentiation mod m is well defined if the base is a unit and the exponent is an equivalence class mod *ϕ*(*m*). In other words, if [*a*] ∈ Z_{m} and [*b*] ∈ Z_{ϕ(m)} then [*a*]^{[b]} = [*a*^{b}] is well defined.

**version 2**: if [*a*] ∈ Z_{m} and *b* ≡ *b*ʹ mod *ϕ*(*m*) then [*a*]^{b} = [*a*]^{bʹ}.

**version 3**: [*a*]^{b + kϕ(m)} = [*a*]

**version 4**: [*a*]^{ϕ(m)} = [1]

Write the set of units of Z_{m}. Consider what happens when you multiply all of the units by [*a*]. We drew a picture with an arrow from [*b*] to [*c*] if [*a*][*b*] = [*c*].

- no two arrows go into the same unit
- the arrows form loops
- the length of all of the loops is the same
- the total number of elements
*ϕ*(*m*) is thus the length of the loop (ℓ) times the number of loops (*n*) - To compute [
*a*]^{k}we start at [1] and follow*k*arrows. To compute [*a*]^{ϕ(m)}we start at [1] and traverse*ϕ*(*m*) =*n*ℓ arrows. This goes around the loop*n*times, so ends up at [1].

You proved on the homework that [*a*] is a unit mod *m* if and only if *g**c**d*(*a*, *m*) = 1.

*ϕ*(*m*) is the number of units. If *m* is prime, then everything except [0] is relatively prime to *m* so *ϕ*(*m*) = *m* − 1.

If *m* = *p**q* with *p* and *q* prime then *ϕ*(*m*) = (*p* − 1)(*q* − 1). Proof: start with *p**q* total elements of Z_{pq}. Subtract off *p* multiples of *q* and *q* multiples of *p*. You double counted 0. Use algebra to get (*p* − 1)(*q* − 1).