Let𝑚be a fixed positive integer and𝑓a polynomial with integer coefficients. We want to find the solutions of the congruence𝑓(𝑥) ≡ 0 (mod 𝑚).
As with linear congruences, by asolutionwe mean an integer𝑠which substituted for𝑥makes the congruence valid. It is clear also in this general case that if an integer𝑠 is a solution, then every element of the residue class(𝑠)𝑚is a solution as well since𝑠 ≡ 𝑟 (mod 𝑚)implies𝑓(𝑠) ≡ 𝑓(𝑟) (mod 𝑚). Therefore thenumber of solutionsis defined as the number of thepairwise incongruentsolutions, i.e. how manyresidue classesyield the solutions (see Definition 2.5.2).
Obviously, also it is only the residue class of the coefficients of𝑓that matters.
By the above, it is often more convenient and more natural to handle both the coefficients and the solutions as residue classes modulo𝑚(instead of integers). This means that𝑓is considered as a polynomial over the ring𝐙𝑚of these residue classes and the solutions of the congruence𝑓(𝑥) ≡ 0 (mod 𝑚)are the roots of𝑓in𝐙𝑚. We adopt this view also when defining the degree of a polynomial modulo𝑚:
Definition 3.1.1. Thedegreeof a polynomial𝑓 = 𝑎0+ 𝑎1𝑥 + ⋯ + 𝑎𝑛𝑥𝑛modulo𝑚is 𝑘if𝑎𝑘 ≢ 0 (mod 𝑚), but𝑎𝑖 ≡ 0 (mod 𝑚)for every𝑖 > 𝑘. If𝑎𝑖≡ 0 (mod 𝑚)for every 𝑖, so every coefficient of𝑓is0 (mod 𝑚), then𝑓has no degree modulo𝑚. ♣ 73
Example. The polynomial𝑓 = 6 + 12𝑥 + 15𝑥2 + 21𝑥3 has degree3 modulo5, 2 modulo7, and has no degree modulo3.
The rest of this section deals with congruences with prime moduli.
Theorem 3.1.2. If𝑝is a prime and the degree of𝑓modulo𝑝is𝑘, then the congruence
𝑓(𝑥) ≡ 0 (mod 𝑝)has at most𝑘solutions. ♣
Proof. According to the preliminary remarks, we consider𝑓as a polynomial over the ring𝐙𝑝of the residue classes modulo𝑝. Then the number of solutions is the number of roots of𝑓in𝐙𝑝.
Since𝐙𝑝 is a field by Theorem 2.8.4, Theorem 3.1.2 follows immediately from a well-known basic result in classical algebra: If the degree of a polynomial over a field
𝐹is𝑘, then𝑓can have at most𝑘roots in𝐹. □
The statement of Theorem 3.1.2 is false for composite moduli. For example, the linear congruence
10𝑥 − 15 ≡ 0 (mod 25) has5solutions, the congruence
𝑥(𝑥 − 1)(𝑥 − 2)(𝑥 − 3) ≡ 0 (mod 24) of degree4has24solutions, etc.
Using Theorem 3.1.2, we can get a new proof for Wilson’s Theorem (Theorem 2.7.1):
If𝑝is a prime, then(𝑝 − 1)! ≡ −1 (mod 𝑝).
This is obvious for𝑝 = 2. Let𝑝 > 2and consider the polynomial
𝑓 = 𝑥𝑝−1− 1 − (𝑥 − 1)(𝑥 − 2) . . . (𝑥 − (𝑝 − 1)) = 𝑎0+ 𝑎1𝑥 + ⋯ + 𝑎𝑝−2𝑥𝑝−2. By Fermat’s Little Theorem, each of the (pairwise incongruent) numbers𝑥 = 1,2, . . . , 𝑝 − 1satisfies the congruence𝑓(𝑥) ≡ 0 (mod 𝑝), hence the number of solutions is at least𝑝 − 1. If𝑓had a degree modulo𝑝, then this degree could be at most𝑝 − 2contra- dicting Theorem 3.1.2. Therefore𝑓has no degree modulo𝑝, i.e. every coefficient𝑎𝑖is 0 (mod 𝑝). Hence,
𝑎0= −1 − (−1)𝑝−1(𝑝 − 1)! = −1 − (𝑝 − 1)! ≡ 0 (mod 𝑝) ,
thus proving Wilson’s Theorem. □
Since a congruence modulo𝑚can have at most𝑚solutions, the statement of The- orem 3.1.2 becomes empty if the degree of𝑓modulo𝑝is𝑝or larger. In this case, we can reduce the congruence𝑓(𝑥) ≡ 0 (mod 𝑝)to a congruence of degree at most𝑝 − 1, in the following sense:
Theorem 3.1.3. To every prime𝑝and polynomial𝑓with integer coefficients, there exists a polynomial𝑔with integer coefficients such that
(i) the degree of𝑔modulo𝑝is at most𝑝 − 1or every coefficient of𝑔is0 (mod 𝑝)
(ii) 𝑓(𝑐) ≡ 𝑔(𝑐) (mod 𝑝)for every integer𝑐. ♣
Exercises 3.1 75
In other words, Theorem 3.1.3 asserts that to every polynomial over the field𝐙𝑝, we can find a polynomial𝑔of degree at most𝑝 − 1(allowing also the zero polynomial) such that the two polynomials define the samefunction.
The theorem clearly implies that the congruences𝑓(𝑥) ≡ 0 (mod 𝑝)and𝑔(𝑥) ≡ 0 (mod 𝑝)have exactly the same solutions, hence the number of solutions is at most the degree of𝑔modulo𝑝by Theorem 3.1.2.
First proof. Replace𝑥𝑝by𝑥everywhere in𝑓as long as this is possible. We arrive at a polynomial𝑔of degree at most𝑝 − 1modulo𝑝or with all coefficients0 (mod 𝑝). By Fermat’s Little Theorem,𝑐𝑝 ≡ 𝑐 (mod 𝑝)for every𝑐, hence also𝑓(𝑐) ≡ 𝑔(𝑐) (mod 𝑝)
holds. □
Second proof. Divide𝑓by𝑥𝑝− 𝑥. Since the leading coefficient of𝑥𝑝 − 𝑥is1, the quotient and the remainder will have integer coefficients. We show that the remainder serves as𝑔. Indeed,
𝑓 = (𝑥𝑝− 𝑥)ℎ + 𝑔,
where the degree of𝑔is at most𝑝 − 1or𝑔is the zero polynomial. Then 𝑓(𝑐) = (𝑐𝑝− 𝑐)ℎ(𝑐) + 𝑔(𝑐) ≡ 0 + 𝑔(𝑐) = 𝑔(𝑐) (mod 𝑝)
for every integer𝑐. □
Remarks: (1) In the second proof, we can divide the polynomials over the field𝐙𝑝, but this is slightly more complicated.
(2) Both proofs yield also an algorithm to find𝑔(in fact, they are two interpretations of the same procedure).
(3) A third proof is obtained using theinterpolation polynomials, but this is not really suitable for getting𝑔in an explicit form (see Exercise 3.1.9).
(4) Note that the polynomial𝑔meeting the requirements of Theorem 3.1.2 is unique (modulo𝑝, see Exercise 3.1.8).
Exercises 3.1
1. What is the number of solutions of the following congruences?
(a) 𝑥100+ 𝑥 ≡ 0 (mod 101) (b) 𝑥100+ 𝑥 ≡ 0 (mod 100) (c) 21𝑥9+ 18𝑥6+ 15 ≡ 0 (mod 77) (d) 𝑥(𝑥2− 1)(𝑥2− 4) ≡ 0 (mod 60).
2. Prove that𝑐is a solution of the congruence𝑓(𝑥) ≡ 0 (mod 𝑚)if and only if there exists a polynomialℎwith integer coefficients such that every coefficient of the polynomial𝑓 − (𝑥 − 𝑐)ℎis a multiple of𝑚.
3. Let𝑁(𝑓, 𝑚)denote the number of solutions of the congruence𝑓(𝑥) ≡ 0 (mod 𝑚).
True or false?
(a) 𝑁(𝑓𝑔, 𝑚) ≤ 𝑁(𝑓, 𝑚) + 𝑁(𝑔, 𝑚).
(b) 𝑁(𝑓𝑔, 𝑚) ≤ 𝑁(𝑓, 𝑚) + 𝑁(𝑔, 𝑚) + 1000.
(c) 𝑁(𝑓𝑔, 13) ≤ 𝑁(𝑓, 13) + 𝑁(𝑔, 13).
(d) 𝑁(𝑓𝑔, 13) = 𝑁(𝑓, 13) + 𝑁(𝑔, 13).
4. (a) Exhibit a polynomial 𝑓 of degree13modulo 37such that the congruence 𝑓(𝑥) ≡ 0 (mod 37)has12solutions.
(b) How many𝑓satisfy the conditions in (a) if every coefficient is taken from the numbers1,2, . . . ,37?
5. Let𝑝be a prime and denote the number of solutions of𝑓(𝑥) ≡ 0 (mod 𝑝)by𝑟.
Prove
𝑟 ≡ −
𝑝
∑
𝑖=1
𝑓(𝑖)𝑝−1 (mod 𝑝) .
6. Let𝑝 > 2be a prime and1 ≤ 𝑗 ≤ 𝑝 − 2. Show that the sum of all products with𝑗 distinct factors taken from the numbers1,2, . . . ,𝑝 − 1is divisible by𝑝.
7. Let𝑝 > 2be a prime and
𝑓 = 𝑎0+ 𝑎1𝑥 + ⋯ + 𝑎𝑛𝑥𝑛 where 𝑎0≢ 0 (mod 𝑝) .
Prove that𝑓(𝑥) ≡ 0 (mod 𝑝)can be reduced to a congruence of degree at most 𝑝 − 2in the following sense: We can find a polynomialℎof degree at most𝑝 − 2 modulo𝑝or with all coefficients0 (mod 𝑝)satisfying𝑓(𝑐) ≡ ℎ(𝑐) (mod 𝑝)for every(𝑐, 𝑝) = 1.
8. Prove the existence of a polynomial𝑔occurring in Theorem 3.1.3 using the inter- polation polynomials by Lagrange or Newton.
9. Prove that the polynomial𝑔satisfying the requirements of Theorem 3.1.3 is unique over𝐙𝑝, i.e. its coefficients are uniquely determined modulo𝑝.
10. Demonstrate that Theorem 3.1.3 remains valid also for composite moduli.