]> Number Theory - Roots of Polynomials

Roots of Polynomials

Example: What are the roots of x 2 1 modulo some prime p?

Clearly, x=±1 works, but are there any other solutions?

Suppose (x+1 )(x1 )=0 (modp). As p is prime, we see p divides (x+1 ) or p divides (x1 ). These cases correspond to the solutions we already have, so there are no more solutions.

More generally, we have the following:

Theorem: Let f(x) be a polynomial over p of degree n. Then f(x) has at most n roots.

Proof: We induct. For degree 1 polynomials ax+b, we have the unique root x=ba 1 .

Suppose f(x) is a degree n with at least one root a. Then write f(x)=(xa)g(x) where g(x) has degree n1 . Now f(x)=0 (modp) means (xa)g(x) is a multiple of p.

Since p is prime, p divides (xa), or p divides g(x). In the former case, we have the root a, and the latter case is equivalent to saying g(x)=0 (modp), which by induction has at most n1 solutions.

Composite Moduli

Let n be a product of distinct primes: n=p 1 ...p k. The Chinese Remainder Theorem implies we can solve a polynomial f(x) over each p i and then combine the roots together to find the solutions modulo n. This is because a root a of f(x) in n corresponds to

(a 1 ,...,a k) p 1 ×...× p k

where each a i is a root of f(x) in p i.

Example: Solve x 2 1 (mod77 ).

x 2 1 has the solutions ±1 (mod7 ) and ±1 (mod11 ) (since they are both prime), thus the solutions modulo 77 are the ones corresponding to:

  • x=1 (mod7 ),x=1 (mod11 ): this is x=1 (mod77 )

  • x=1 (mod7 ),x=1 (mod11 ): this is x=43 (mod77 )

  • x=1 (mod7 ),x=1 (mod11 ): this is x=34 (mod77 )

  • x=1 (mod7 ),x=1 (mod11 ): this is x=1 (=76 )(mod77 )

Generalizing the last example, whenever N is the product of two distinct odd primes we always have four square roots of unity. (When one of the primes is 2 we have a degenerate case because 1 =1 (mod2 ).) An interesting fact is that if we are told one of the non-trivial square roots, we can easily factorize N (how?).

In order to describe the solutions of a polynomial f(x) over n for any n, we need to find the roots of f(x) over p k for prime powers p k. We shall leave this for later.

Wilson’s Theorem

Since the only square roots of 1 modulo p are ±1 for a prime p, for any element a p *, we have aa 1 unless a=±1 . Thus in the list 2 ,3 ,...,p2 we have each element and its inverse exactly once, hence (p1 )!=1 (modp). On the other hand when p is composite, (p1 )! is divisible by all the proper factors of p so we have:

Theorem: For an integer p>1 we have (p1 )!=1 (modp) if and only if p is prime.

At first glance, this seems like a good way to tell if a given number is prime but unfortunately there is no known fast way to compute (p1 )!.

Wilson’s Theorem can be used to derive similar conditions:

Theorem: For an odd integer p>1 , let r=(p1 )/2 . Then

(1 ) r(r!) 2 =1 (modp)

if and only if p is prime.

Proof:

(p1 )! = 1 (p1 )2 (p2 )...((p1 )/2 )((p+1 )/2 ) = (1 ) 2 (2 ) 2 ...(r) 2 = (1 ) r(r!) 2

and the result follows from Wilson’s Theorem.