Lecture 18: Quadratic Reciprocity Overview 1 Quadratic

CS681
Computational Number Theory
Lecture 18: Quadratic Reciprocity
Instructor: Piyush P Kurur
Scribe: Ramprasad Saptharishi
Overview
Polynomial factorization and randomized primality testing were one of the
first examples of the power of randomization. Two standard algorithms for
primality testing (randomized) are the Miller-Rabin test and the SolovayStrassen test.
We shall build some theory on quadratic reciprocity laws before we get
into the Solovay Strassen test.
1
Quadratic Reciprocity
The reciprocity laws are closely related to how primes split over number
fields. Let us first understand what these number fields are.
Definition 1. An algebraic integer over Q is an element ζ such
that it is a root
√
3
1
of a monic polynomial in Z[X]. For example, the number 2 + i 2 is an algebraic
integer as it is a root of x2 − x + 1.
A number field is a finite extension of Q. One could think of this as just adjoining an algebraic number to Q.
Note that number fields are strange objects. √They may not even be
UFDs. We saw the example
√ when we
√ consider Q( −5), the number 6 factors as both 3×2 and (1+ −5)(1− −5). However, if one were to consider
factorization over ideals, they form unique factorizations.
1.1
The Legendre Symbol
Fix an odd prime p. We want to study equations of the form X 2 − a over
Fp . What does it mean to say that this has a solution in Fp ? It means that a
has a square-root in Fp or a is a square in Fp . The legendre symbol captures
that.
1
Definition 2. For a ∈ Fp , the legendre symbol

0

a
= −1

p

1
a
p
is defined as follows:
if p | a
if a is not a square modulo p
if a is a square modulo p
Proposition 1.
ab
p
a
b
=
p
p
The proof is fairly straight forward; just consider them case by case
when they are −1, 0, 1.
Thus, the above proposition tells us that the p· is a homomorphism
from Z/pZ to {−1, 0, 1} .
Another observation is that since F?p is cyclic, there is a generator b. Then
we can write a = bt . We then have,


if p | a
0
a = −1 if a is not a square modulo p


1
if a is a square modulo p
and therefore
a
p
=a
p−1
2
.
Note that x2 = y 2 =⇒ x = y or x = −y and therefore, the number of
squares in F?p is exactly p−1
2 . And if the generator of the group is a quadratic
non-residue (not a square), then any odd power of the generator is also a
non-residue.
2
Quadratic Reciprocity Theorem
Theorem 2. Let p and q be odd primes (not equal to each other). Then
p2 −1
2
= (−1) 8
p
p−1 q−1
p
q
= (−1) 2 2
q
p
2
Proof. We shall prove the part of p2 in this class and do the other in the
next. The idea is to go to a field extension (if necessary) and evaluate
certain
elements in two ways to get what we want. In the case of p2 we shall go
to the extension Fp (i) where i is a square root of −1.
Firstly note that this needn’t be a proper extension at all. For example,
in F5 , we already have a root of −1 which is 2. Infact, for every prime of the
form 1 mod 4, we have a square root of −1. So we will go to an extension if
necessary.
Now set τ = 1 + i. We know that τ 2 = 1 − 1 + 2i = 2i and τ p = 1 + ip
p−1
in Fp . We could also evaluate τ p as τ · (τ 2 ) 2 . Also (1 + i)−1 = 1−i
2 .
1 + ip = τ p
= τ (2i)
p−1
2
= (1 + i)2
(1 + ip )(1 − i)
2
1 + ip − i − ip+1
=⇒
2
=⇒
p−1
p−1
2
p−1
= 2 2 i 2
2 p−1
=
i 2
p
Case 1: When p = 1 mod 4
Then i ∈ Fp and the above equation reduces to
p−1
2
1+i−i+1
=
(−1) 4
2
p
p−1
2
=⇒
= (−1) 4
p
Case 2: When p = 3 mod 4
1−i−i−1
2
2 p−1
=
i 2
p
2 p−1
=
i 2
p
=⇒ i3
8−(1+p)
1−p
2
=⇒
= i 2 +3 = i 4
p
= (−1)
Therefore,
p−1
(
(−1) 4
2
=
p+1
p
(−1) 4
3
p+1
4
p = 1 mod 4
p = 3 mod 4
i
p−1
2
and combining the two, we get
p2 −1
2
= (−1) 8
p
The proof of the other part is very similar. We consider a similar τ and
evaluate τ p in two different ways to get to our answer. We shall do this in
the next class.
4