]> Number Theory - Quadratic Reciprocity

Number Theory

Quadratic Reciprocity

The law of quadratic reciprocity, noticed by Euler and Legendre and proved by Gauss, helps greatly in the computation of the Legendre symbol.

Theorem: Let p,q be distinct odd primes. If p=q=1 (mod4 ), then (pq)=(qp) otherwise (pq)=(qp). which we can state as (pq)(qp)=(1 ) p1 2 q1 2

Proof: TODO

Example: (31 103 )=(103 31 )=(10 31 )=(2 31 )(5 31 )=(1 )(5 31 ) since 2 =5 (mod8 ). Next, (5 31 )=(31 5 )=(1 5 )=1 . Hence 31 is a quadratic nonresidue modulo 103 .

Note we had to factor a number during this computation, so for large numbers this method is not efficient without a fast factoring algorithm. Of course, to compute the Legendre symbol, we can simply perform a modular exponentiation, but it turns out by extending the Legendre symbol we can salvage the above method.

The Jacobi Symbol

The Jacobi symbol (ab) is defined for all odd positive integers b and all integers a. When b is prime, it is equivalent to the Legendre symbol (which is why we reuse the notation). If b=1 , define (a1 )=1 . Lastly, for other values of b, factor b into primes: b=p 1 k 1 ...p n k n and define (ab)=(ap 1 ) k 1 ...(ap n) k n

Thus for odd positive integers b,b 1 ,b 2 we have (ab 1 b 2 )=(ab 1 )(ab 2 ) Other properties of the Legendre symbol carry over. By inducting on the number of primes in the factorization of b, one can show: (2 b)=(1 ) (b1 )/2 (1 b)=(1 ) (b 2 1 )/8 (ab)(ba)=(1 ) a1 2 b1 2

The last property allows us to compute the Jacobi symbol without factoring.

Example: (31 103 )=(103 31 )=(21 31 )=(1 31 )(21 31 ) =(31 21 )=(11 21 )=(1 21 )(11 21 )=(21 11 )=(1 11 )=1 . Hence 31 is a quadratic nonresidue modulo 103 .