Definition
Let f(x1,x2,...,xn) be a polynomial in n variables with integer coefficients and f(x1,x2,...,xn)≡0(m). A solution is that f(a1,a2,...,an)≡0(m). Thus fˉ(aˉ1,aˉ2,....,aˉn)=0ˉ.
Proposition 1
For ax≡b(m), consider d>0 and (a,m)=d. ax≡b(m) has solutions and have exactly d solutions iff d∣b.
For a solution x0, then there are other solutions given by x0+m′,x0+2m′,x0+(d−1)m′, where m′=m/d.
Proof:
If d∣b, we shall have ax′−my′=d. So we have my′=d−ax′, times b/d on both side we have my′b/d=b−ax′b/d. Now we have a solution x=x′b/d.
If x0 is a solution, we have my0=b−ax0. Thus b=my0−ax0. That is b∈(a,m)⟹d∣b.
If x0,x1 are two solutions, ax0≡b(m), ax1≡b(m). Therefore, a(x0−x1)≡0(m)⟹m∣a(x0−x1).
By dividing d, we have m′∣a′(x0−x1). And as we know, (m′,a′)=1. So m′∣(x0−x1).
Now we can have a linear combination: x1=x0+km′ where k∈Z.
Corollary 1
If (a,m)=1, then ax≡b(m) has one and only solution.
Proof:
Clearly, the number of solution is (a,m)=1.
Corollary 2
If p is prime and a≡0(p) , there is one and only solution for ax≡b(p).
Proof:
(a,p)=1.
Unit
Proposition 2
As previously discussed, ax≡b(m) is equivalent to aˉx=bˉ over Z/mZ.
So we can define a unit aˉ iff aˉx=1ˉ, that is ax≡1(m) is solvable. Thus iff (a,m)=1, aˉ is a unit.
It follows there are ϕ(m) units in Z/mZ.
So in Z/pZ, every nonzero element is a unit, that makes it a field.
But for a composition number m=m1m2. We have mˉ1=0ˉ,mˉ2=0ˉ , however, m1m2=mˉ=0ˉ. So Z/mZ is not a field.
Corollary 2 (Euler's Theorem)
If (a,m)=1, then aϕ(m)≡1(m)
Proof:
Since (a,m)=1, aˉ is a unit. So aˉϕ(m)=1ˉ.
Corollary 3 (Fermat's Little Theorem)
If p is prime and p∤a, then ap−1≡1(p).
Proof:
Since (a,p)=1, aϕ(p)≡1(p). Thus ϕ(p)=p−1.