<<

The

a It’s a little inconvenient that the Legendre symbol is only defined when the bottom is an odd  p  prime. You can extend the definition to allow an odd positive number on the bottom using the Jacobi symbol. Most of the properties of Legendre symbols go through for Jacobi symbols, which makes Jacobi symbols very convenient for computation. We’ll see, however, that there is a price to pay for the greater generality: Euler’s formula no longer works, and we lose part of the connection between the value of a symbol and the solvability of the corresponding quadratic congruence. Definition. Let p, q ∈ Z, where (p, q) = 1 and q is a product of odd primes:

q = q1q2 ··· qn.

p (The qi need not be distinct.) The Jacobi symbol is defined by  q    p p p p = ··· . q  q1  q2  qn          Note that the Jacobi symbol and the Legendre symbol coincide in the case where q is a single odd prime. p That is why the same notation is used for both. It’s clear from the definition that = ±1.  q     a Lemma. If q is a product of odd primes and a is a mod q, then = 1.  q    Proof. Write q = q1q2 ··· qn, where each qi is an odd prime. Suppose a is a quadratic residue mod q. Then (a, q) = 1 and x2 = a (mod q) has solutions. 2 a Since qi | q, it follows that (a, qi) = 1 and x = a (mod qi) for i = 1,...n. Hence, = 1 for qi  i =1,...n. Therefore,   a a a a = ··· =1 · 1 ··· 1=1.  q  q1  q2  qn             p     p However, the converse is false: If is a Jacobi symbol and = 1, it does not follow that p is a  q   q  quadratic reside mod q.    

2 Example. Show that = 1, but 2 is not a quadratic residue mod 15. 15   Since 2 is not a square  mod 3 or mod 5,

2 2 = = −1. 3 5     Therefore, 2 2 2 = = (−1)(−1)=1. 15 3 5       However, here is a table of squares  mod 15:  

x 0 1 2 3 4 5 6 7 x2 (mod 15) 0 1 4 9 1 10 6 4

1 x 8 9 10 11 12 13 14 x2 (mod 15) 4 6 10 1 9 4 1

The table shows that 2 is not a square mod 15. The quadratic residues mod 15 are 1 and 4, as those are the squares that are relatively prime to 15.

The results that follow amount to saying that the algebraic properties of Legendre symbols hold for Jacobi symbols — and indeed, the proofs of these properties typically use those properties for Legendre symbols. Theorem. Let q and q′ be odd positive numbers, and suppose (pp′, qq′) = 1. Then: p p p (a) ′ = ′ .  q  q  qq     ′   ′ p p pp (b) = .  q   q   q        p2  p   (c) = = 1.  q  q2       p2p′ p′ (d) = .  q2q′  q′          p p′ (e) If p = p′ (mod q), then = . q   q    ′     Proof. (a) Write q and q as products of odd primes: ′ ′ ′ ′ q = q1q2 ··· qm and q = q1q2 ··· qn. Then p p p p p p p p p ′ = ··· ′ ′ ··· ′ = ′ . q  q  q1  q2  qm  q1  q2  qn  qq                    (b) Write q as a product of odd primes:       q = q1q2 ··· qm. Then p p′ p p p p′ p′ p′ = ··· ··· =  q   q  q1  q2  qm  q1  q2  qm                  p p′   p p′   p  p′  pp′ pp′  pp′ pp′ ··· = ··· = . q1  q1  q2  q2  qm  qm   q1   q2   qm   q                      (c) Write q as a product  of odd  primes:             q = q1q2 ··· qm. p2 If qk is an odd prime, then = 1 (as a Legendre symbol). Hence,  qk    p2  p2 p2 p2 = ··· =1 · 1 ··· 1=1.  q   q1   q2  qm                  Next, observe that if qk is an odd prime, then p p = (±1)2 =1. qk  qk      2 So p p p p p p p . 2 = ··· =1 · 1 ··· 1=1 q  q1  q1  q2  q2  qm  qm                (d)               p2p′ p2 p′ = (by (b))  q2q′  q2q′  q2q′     p′    =     (by (c)) q2q′  p′ p′ =   (by (a)) q2   q′   p′  =     (by (c))  q′    (e) Write q as a product of odd primes:   q = q1q2 ··· qm. ′ ′ ′ p p Since p = p (mod q), I have p = p (mod qk) for k = 1,...m. Consequently, = (as qk  qk    Lengendre symbols). Therefore,     p p p p p′ p′ p′ p′ = ··· = ··· = .  q  q1  q2  qm  q1  q2  qm   q                         

Example. Show that if (a, q) = 1 and q is odd and positive, it does not follow that

a − = a(q 1)/2 (mod q) .  q    (Thus, the analog of Euler’s lemma does not hold for Jacobi symbols.) Note that 7 7 7 1 2 = = = (1)(−1) = −1. 15 3 5 3 5           But           − 7(15 1)/2 =77 = 13 (mod 15) .

−1 2 The next lemma will be used in the proofs of the formulas for and , as well as in the proof  q   q  that holds for Jacobi symbols.     Lemma. If m and n are odd, then

m − 1 n − 1 mn − 1 + = (mod 2) . 2 2 2 Proof. Since m and n are odd, I may write

m =2a +1 andn=2b+1 for a,b ∈ Z.

Then m − 1 n − 1 2a +1 − 1 2b +1 − 1 + = + = a + b. 2 2 2 2 3 On the other hand, mn − 1=(2a + 1)(2b + 1) − 1 mn − 1=4ab +2a +2b +1 − 1 mn − 1=4ab +2a +2b mn − 1 =2ab + a + b 2 mn − 1 m − 1 n − 1 =2ab + + 2 2 2 mn − 1 m − 1 n − 1 = + (mod 2) 2 2 2

Corollary. If m1,m2,...mn are odd, then m − 1 m − 1 m − 1 m m ··· m − 1 1 + 2 + ··· + n = 1 2 n (mod 2) . 2 2 2 2 Proof. Use the previous lemma and induction. The way this corollary will be used in the following proof is the simple observation that if s = t (mod 2), then (−1)2 = (−1)t. Theorem. Let q be an odd positive number. Then

−1 − = (−1)(q 1)/2.  q    Proof. Write q as a product of odd primes:

q = q1q2 ··· qm.

Then −1 −1 −1 −1 = ··· .  q   q1   q2   qn          The terms on the right are Legendre  symbols,  for which I know 

−1 − = (−1)(qk 1)/2 for k =1, . . . n.  qk    Thus,

n −1 − − − q − 1 = (−1)(q1 1)/2(−1)(q2 1)/2 ··· (−1)(qn 1)/2 = (−1)S, where S = k . q 2   kX=1   Using the preceding corollary,

n q − 1 n q − 1 q − 1 S = k = k=1 k = (mod 2) . 2 Q 2 2 Xk=1 Therefore, −1 − = (−1)(q 1)/2.  q    Theorem. (Quadratic Reciprocity) Suppose p and q are odd positive integers and (p, q) =1. Then

p q − − = (−1)[(p 1)/2][(q 1)/2]. q  p     4 Proof. I’ll prove the equivalent statement

p q − − = · (−1)[(p 1)/2][(q 1)/2]. q  p     q (To get from either this statement to the original one or vice versa, multiply both sides by and p q 2   note that = 1.)   p Writep and q as products of odd primes:

p = p1p2 · pm and q = q1q2 ··· qn.

Then p m p m n p = i = i .  q   q  qj  iY=1 iY=1 jY=1         Here’s what the last double product looks like, multiplied out: p p p 1 2 ··· m ·  q1   q1   q1  p1  p2  pm  ··· ·  q2   q2   q2     .   . p p p 1 2 ··· m qn  qn   qn        By Quadratic Reciprocity for Legendre symbols,

p q − − i = j (−1)[(pi 1)/2][(qj 1)/2]. qj   pi        Taking the product over i and j on both sides, I get

m n m n m n p p q − − q − − = i = j (−1)[(pi 1)/2][(qj 1)/2] = · (−1)[(pi 1)/2][(qj 1)/2]. q  qj   pi  p iY=1 jY=1   iY=1 jY=1 iY=1 jY=1         Taking the product of powers of −1 causes the powers to add. So

n m n − − p − 1 q − 1 (−1)[(pi 1)/2][(qj 1)/2] = (−1)S, where S = i · j . 2 2 jY=1 Xi=1 Xj=1

By the preceding corollary,

n m n p − 1 q − 1 p − 1 q − 1 i · j = i · j 2 2 2 2 Xj=1 Xi=1 Xj=1 p p ··· p − 1 q q ··· q − 1 = 1 2 m · 1 2 n 2 2 p − 1 q − 1 = · (mod 2) 2 2 That is, − − (−1)S = (−1)[(p 1)/2][(q 1)/2].

5 Hence, p q − − = · (−1)[(p 1)/2][(q 1)/2].  q  p     Remark. In computational terms, this version of reciprocity is like the one for Legendre symbols. Thus, suppose p and q are odd and relatively prime. If either p or q equals 1 mod 4, then p q = .  q  p     If both p and q equal 3 mod 4, then p q = − . q  p     2     Next, I’ll derive a formula for , where q is an odd prime. The proof is similar to the proof of the  q  −1   formula for , except that I have  slightly different preliminary lemmas.  q    Lemma. Ifm andn are odd, then m2 − 1 n2 − 1 m2n2 − 1 + = (mod 2) . 8 8 8 Proof. Since m and n are odd, I may write

m =2a +1 andn=2b+1 for a,b ∈ Z.

Then m2 =4a2 +4a + 1 and n2 =4b2 +4b +1 m2 − 1=4a2 +4a and n2 − 1=4b2 +4b So m2 − 1 n2 − 1 4a2 +4a 4b2 +4b a2 + a b2 + b + = + = + . 8 8 8 8 2 2 a2 + a (Note that a2 + a is even because it’s the sum of two odd numbers, so is an integer. Likewise, 2 b2 + b is an integer.) 2 Now m2n2 = (4a2 +4a + 1)(4b2 +4b + 1) m2n2 = 16a2b2 + 16a2b + 16ab2 + 16ab +4a2 +4b2 +4a +4b +1 m2n2 − 1=16a2b2 + 16a2b + 16ab2 + 16ab +4a2 +4b2 +4a +4b m2n2 − 1 16a2b2 + 16a2b + 16ab2 + 16ab +4a2 +4b2 +4a +4b = 8 8 m2n2 − 1 a2 + a b2 + b =2a2b2 +2a2b +2ab2 +2ab + + 8 2 2 m2n2 − 1 a2 + a b2 + b = + (mod 2) 8 2 2 m2n2 − 1 m2 − 1 n2 − 1 = + (mod 2) 8 8 8

Corollary. If m1,m2,...mn are odd, then m2 − 1 m2 − 1 m2 − 1 m2m2 ··· m2 − 1 1 + 2 + ··· + n = 1 2 n (mod 2) . 8 8 8 8 6 Proof. Use the previous lemma and induction. Theorem. Let q be an odd positive number. Then

2 2− = (−1)(q 1)/8.  q    Proof. Write q as a product of odd primes:

q = q1q2 ··· qm.

Then 2 2 2 2 = ··· .  q  q1  q2  qn          The terms on the right are Legendre  symbols,  for which I know

2 2 − = (−1)(qk 1)/8 for k =1, . . . n. qk    Thus,

n 2 2 2− 2− 2 − q − 1 = (−1)(q1 1)/8(−1)(q2 1)/8 ··· (−1)(qn 1)/8 = (−1)S, where S = k . q 8   kX=1   Using the preceding corollary,

n q2 − 1 n q2 − 1 q2 − 1 S = k = k=1 k = (mod 2) . 8 Q 8 8 Xk=1

Therefore, 2 2− = (−1)(q 1)/8. q   

71 Example. Compute the Jacobi symbol . 375   71 71 71 71 71 2 1 = = = = = (−1)(1) = −1. 375 3 · 53  3 · 5  3   5  3 5              

91 Example. Compute the Legendre symbol . 103   Jacobi symbols can often be used to simplify  the computation of Legendre symbols.

91 103 12 4 · 3 3 3 = − = − = − = − = − = 103  91  91  91  91 7 · 13             3 3 7 13 1 1 − = −(−1) = =1 · 1=1. 7 13 3  3  3 3            

c 2019 by Bruce Ikenaga 7