MATH 242: Algebraic number theory Matthew Morrow ([email protected]) Contents 1 A review of some algebra 2 2 Quadratic residues and quadratic reciprocity 4 3 Algebraic numbers and algebraic integers 12 4 Algebraic number fields 18 4.1 First example: Gaussian integers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4.2 Second example: Z[ω] where ω =e2πi/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 √ 4.3 Third example: Z[ −5] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.4 Introductory tools for studying number fields: Norm, Trace, Discriminant, and Integral bases . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.4.1 Norm and Trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.4.2 Discriminant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 4.4.3 Integral bases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 4.4.4 Applications of integral bases to number fields . . . . . . . . . . . . . . . . . . . . . . 26 5 Main theoretic properties of D 27 F 5.1 The class group, its finiteness, and cancellation of ideals . . . . . . . . . . . . . . . . . . . . . 28 5.2 Dedekind domains and Unique factorisation of ideals . . . . . . . . . . . . . . . . . . . . . . . 31 5.3 Norms of ideals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 6 Explicitly constructing ideals in D and generators of Cl 37 F F 7 Calculations of class groups of quadratic extensions, and applications 42 7.1 d=−5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 7.2 d=−6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 7.3 d=−7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 7.4 d=−10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 7.5 d=−13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 7.6 d=−14 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 7.7 d=−15 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 7.8 d=−17,−19 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 7.9 d=−23 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 7.10 d=−30 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 7.11 d=2,3,5,6,7,11,13,17,21,29,33,37,41 . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 8 Cyclotomic extensions and Fermat’s Last Theorem 50 8.1 Q(ζ) and its ring of integers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 8.2 Fermat’s Last Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 9 Ramification theory 56 9.1 Ramification in quadratic extensions and quadratic reciprocity . . . . . . . . . . . . . . . . . 58 9.2 Ramification in cyclotomic extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 10 A new proof of quadratic reciprocity 62 1 2 MATH 242 Algebraic Number Theory 1 A review of some algebra InthiscourseallringsRarecommutativewithunity. Algebraicnumbertheoryhistoricallybeganasastudy of factorization, and so we begin by reviewing properties of factorization in general commutative rings. You are expected to be familiar with this material, which may be found in any standard algebra textbook, since it will gradually be needed in the course. Definition 1.1. Let R be a ring (commutative with unity!). (i) R is an integral domain if and only if whenever a,b∈R satisfy ab=0, then a=0 or b=0. (ii) We write a|b to mean that a divides b, i.e. that there exists c∈R such that ac=b. (iii) An integral domain R is a principal ideal domain (PID) if and only if every ideal I of R is principal, i.e. I =(cid:104)a(cid:105) for some a∈R, where (cid:104)a(cid:105)=aR is the principal ideal generated by a; this notation will be used throughout. (iv) An element u of R is called a unit if and only if it has a multiplicative inverse. R× denotes the group of units. An element p of R is called irreducible if and only if it is not a unit and whenever p = ab for some a,b∈R then a or b is a unit. Two elements a,b∈R are called associates if and only if there is a unit u∈R such that a=bu. An integral domain R is a unique factorization domain (UFD) if and only if every non-unit of R is a finite product of irreducible elements and whenever two such products p ...p , q ...q are equal, 1 r 1 s then r =s and, up to reordering, p and q are associates. i i (v) An integral domain R is a Euclidean domain (ED) if and only if there is a map ν :R\{0}→Z ≥0 with the following two properties: • For all a,b∈R with b(cid:54)=0, there exist q,r ∈R such that a=bq+r, where either ν(r)<ν(b) or r =0. • For all non-zero a,b∈R, ν(a)≤ν(ab). The map ν is then called a Euclidean norm on R. (vi) R is a ED =⇒ R is a PID =⇒ R is a UFD. Example 1.2. The following examples will frequently appear and should be familiar to you: (i) The ring of integers Z is a ED, with Euclidean norm ν(n)=|n|. Hence it is also a PID and a UFD. (ii) IfF isafieldthenthepolynomialalgebraF[X]isaEDwithEuclideannormν(f(X))=degf(X)=d, if f(X)=a +a X+···+a Xd with a (cid:54)=0. Hence it is also a PID and a UFD. 0 1 d d Next we review the rings Z/nZ, which also occur frequently in algebraic number theory: Definition 1.3. Given n∈Z, the ring Z/nZ is the quotient of Z by the principal ideal nZ. Given x,y ∈Z, wesayxiscongruent to y mod n,andwritex≡y mod nifandonlyifn|x−y,whichisequivalenttosaying that x+nZ=y+nZ, or that x and y have the same class in Z/nZ. We may write “x mod n” to mean the class of x in Z/nZ, when it is not likely to cause confusion. Note: I will never use the notation Z for Z/nZ. n If x ∈ Z, then x mod n is a unit in the ring Z/nZ if and only if x is coprime to n. In particular, if p ∈ N is a prime number, then (Z/pZ)× is a group of order p−1: any element is equal to exactly one of 1,2,...,p−1 mod p. The following results will be used: 2 MATH 242 Algebraic Number Theory 3 Theorem 1.4. Let p∈N be a prime number. (i) (“Fermat’s little theorem”) If a∈Z is coprime to p, then ap−1 ≡1 mod p. (ii) (Z/pZ)× is a cyclic group. Proof. (i): [20.1, FRA]. (ii): [23.6, FRA]; more generally, any finite subgroup of the multiplicative group of a field is cyclic. Corollary 1.5. Let p∈N be a prime number. Then there exists g ∈Z with the following properties: (i) If a∈Z is coprime to p, then a≡gr mod p for some r ≥0. (ii) If r ∈Z is such that gr ≡1 mod p, then p−1|r. Proof. Letg ∈Zbesuchthatg mod pgeneratesthecyclicgroup(Z/pZ)×;then(i)and(ii)arerestatements of that fact that (Z/pZ)× is cyclic of order p−1. Theclassicalnameforanintegergwiththepropertiesofthefollowingcorollaryisaprimitiverootmodulo p, but we will use this notation very little. 3 4 MATH 242 Algebraic Number Theory 2 Quadratic residues and quadratic reciprocity In this section we study so-called quadratic residues modulo an odd prime number p, which is essentially an analysis of when the equation X2 ≡ a mod p has an integer solution, for a fixed value of a ∈ Z. These results and ideas will frequently reappear during the course when we study explicit examples, while the key theorem, namely the Law of Quadratic Reciprocity, will play a key role in describing the arithmetic of quadratic number fields in section 9.1. Definition 2.1. Let p ≥ 3 be a prime number, and suppose that a ∈ Z is coprime to p. Then a is said to be a quadratic residue modulo p if and only if there exists x∈Z satisfying x2 ≡a mod p. (Note: The condition that a is coprime to p is important; 0 is not a quadratic residue modulo p, even though 02 ≡0 mod p.) Example 2.2. Here are basic examples: (i) 3 is a quadratic residue modulo 13, since 42 =16≡3 mod 13. (ii) 02 ≡0mod3,12 ≡1mod3,and22 ≡1mod3. Soifxisanintegerthenx2 ≡0or1mod3. Therefore 2 is not a quadratic residue mod 3. The following characterisation of quadratic residues is needed for later proofs: Lemma 2.3. Let p ≥ 3 be a prime number and suppose that a ∈ Z is coprime to p. Then a is a quadratic residue modulo p if and only if ap−21 ≡1 mod p. Proof. ⇒: Suppose first that a is a quadratic residue modulo p; then a≡x2 mod p for some x∈Z. Then x is also coprime to p, and so xp−1 ≡1 mod p by Fermat’s little theorem. Therefore ap−21 ≡(x2)p−21 =xp−1 ≡1 mod p. ⇐: Conversely, assume that ap−21 ≡1 mod p. Let g be a primitive root modulo p (see the end of section 1); then a≡gr for some r ≥0. Our assumption implies that (gr)p−21 ≡1 mod p. As g mod p generates the cyclic group (Z/pZ)× of order p−1, this implies that p−1|rp−1. That is, r/2 is 2 an integer, and so a≡(gr/2)2 mod p; i.e. a is a quadratic residue modulo p. Inordertodevelopawayofmanipulatingquadraticresidues,andtoclarifytheirproperties,thefollowing piece of notation is absolutely fundamental: Definition 2.4. The Legendre symbol, for p≥3 a prime number and a∈Z, is defined by 1 if p(cid:45)a and a is a quadratic residue modulo p, (cid:18)a(cid:19) = −1 if p(cid:45)a and a is not a quadratic residue modulo p, p 0 if p|a. Example 2.5. To clarify the definition we offer the following examples: (i) 3 is a quadratic residue modulo 13, by the previous example, so (cid:0) 3 (cid:1)=1. 13 (ii) 5 is not a quadratic residue modulo 7 (since 12 ≡ 62 ≡ 1, 22 ≡ 52 ≡ 2, 32 ≡ 42 ≡ 4 mod 7), so (cid:0) 5 (cid:1)=−1. 13 (iii) (cid:0)−6(cid:1)=0 since 3 divides −6. 3 4 MATH 242 Algebraic Number Theory 5 TheLegendresymbolisaconvenienttoolfordiscussingandmanipulatingquadraticresidues; thefollow- ing are some of its key properties: Lemma 2.6. Let p≥3 be a prime number and let a,b∈Z. Then (cid:16) (cid:17) (i) a ≡ap−21 mod p (“Euler’s lemma”); p (cid:16) (cid:17) (cid:16) (cid:17)(cid:16) (cid:17) (ii) ab = a b ; p p p (cid:16) (cid:17) (cid:16) (cid:17) (iii) If a≡b mod p then a = b . p p Proof. If p divides a or b then these identities are all trivial; so assume that p does not divide a or b. (i) By Fermat’s little theorem, ap−1 ≡1 mod p. So p divides ap−1−1=(ap−21 −1)(ap−21 +1), whence p divides ap−21 −1 or ap−21 +1, i.e. ap−21 ≡ ±1 mod p. But according to lemma 2.3, a is a quadratic residue modulo p if and only if ap−21 ≡1 mod p. (cid:16) (cid:17) (cid:16) (cid:17)(cid:16) (cid:17) (ii) Since (ab)p−21 = ap−21bp−21, part (i) implies that ab ≡ a b mod p. As all these terms are ±1, p p p (cid:16) (cid:17) (cid:16) (cid:17)(cid:16) (cid:17) and since p is odd, it follows that ab = a b . p p p (iii) This is quite clear: the definition of a quadratic residue only depends on a mod p. From the proposition we obtain an important and useful corollary: Proposition 2.7 (Legendre symbol of −1). Let p≥3 be a prime number. Then (cid:16) (cid:17) (i) −1 =(−1)p−21; p (ii) −1 is a quadratic residue modulo p if and only if p is congruent to 1 modulo 4. Proof. For(i),applypart(i)ofthepreviouspropositiontoa=−1,andthen,asinthepreviousproposition, use the fact that a congruence mod p when both sides are either 1 or −1 is actually an equality. For (ii), note that if p ≡ 1 mod 4 then (−1)p−21 = 1 ≡ 1, whereas if p (cid:54)≡ 1 mod 4 then p ≡ 3 mod 4 and so (−1)p−21 =−1. Here is an interesting application of the results so far: Corollary 2.8. There are infinitely many positive prime numbers which are congruent to 1 mod 4. Proof. Supposenot,andlet{p ,...,p }bethefinitesetofallpositiveprimenumberswhichare≡1 mod 4. 1 n Put M =(2p ...p )2+1; then M >1, so M is divisible by some positive prime number p. Since M is odd, 1 n p(cid:54)=2. (cid:16) (cid:17) Nowobservethat−1≡(2p ...p )2 mod p,so −1 =1;thepreviouspropositionthereforeimpliesthat 1 n p p≡1 mod 4. So p=p for some i, whence M ≡1 mod p; this contradicts p|M. i Remark 2.9. A deep result, beyond this course, is the following theorem of Dirichlet: if a,n are coprime integers, then there are infintely many prime numbers which are congruent to a modulo n. As we develop more tools during the course, we will see other special cases of this result. 5 6 MATH 242 Algebraic Number Theory Theaimofthissectionistoprovethenexttwotheorems(duetoGauss,Legendre,andEisenstein),which allowustoeasilycalculateanyLegendresymbolandthereforedetermineexactlywhenaisaquadraticresidue modulo p. Their more theoretic importance will become clear in section 9.1. The proofs will be postponed until the end of the section. Theorem 2.10 (Legendre symbol of 2). p≥3 a prime number. Then (cid:18) (cid:19) (cid:40) 2 1 p≡±1 mod 8 = . p −1 p≡±3 mod 8 Exercise 2.1 (Restatement of the Leg. sym. of 2 theorem). Suppose that b is an odd integer; show that b2−1 is divisible by 8, and that b2−1 is even if b≡±1 mod 8 and is odd if b≡±3 mod 8. 8 Deduce that the Legendre symbol of 2 theorem can be rewritten as the statement that (cid:18) (cid:19) 2 =(−1)(p2−1)/8. p This is sometimes a useful formulation. Example 2.11. 61≡−3 mod 8 and so 2is not aquadratic residue modulo 61; checking this any other way but by using the theorem would be extremely time consuming. 73 ≡ 1 mod 8 and so 2 is a quadratic residue mod 73; notice that we have proved this without actually finding any integer x satisfying x2 ≡2 mod 73. The following is the second main theorem. Despite its simple statement, it is an extraordinary result, telling us that if p,q ≥ 3 are prime numbers then there is a mysterious relationship between the Legendre (cid:16) (cid:17) (cid:16) (cid:17) symbols q and p . A priori, there is absolutely no reason that these should be related: although both p q symbols encode the solubility of an equation, the first is really an equation in Z/pZ and the second is in Z/qZ. These two equations should have nothing to do with one another! Theorem 2.12 (Law of Quadratic Reciprocity). Let p,q ≥3 be distinct primes. Then (cid:18) (cid:19)(cid:18) (cid:19) p q p−1q−1 =(−1) 2 2 . q p Exercise 2.2 (Restatement of the LQR). Show that the Law of Quadratic Reciprocity can be restated in the follow way: If p,q ≥3 are prime numbers (not necessarily distinct), then (cid:18) (cid:19) (cid:18) (cid:19) (cid:40) p q 1 if p or q is ≡1 mod 4 =ε , where ε= q p −1 if both p and q are ≡3 mod 4 It is almost always in this form that one uses the Law of Quadratic Reciprocity. Example 2.13. We now demonstrate the power of the previous two theorems by effortlessly calculating some Legendre symbols: (i) (cid:18) (cid:19) (cid:18) (cid:19) (cid:18) (cid:19) (cid:18) (cid:19)(cid:18) (cid:19) (cid:18) (cid:19) (cid:18) (cid:19) (cid:18) (cid:19) (cid:18) (cid:19) 61 89 28 4 7 61 5 7 2 = = = = = = = =−1 89 61 61 61 61 7 7 5 5 (ii) (cid:18) (cid:19) (cid:18) (cid:19)(cid:18) (cid:19) (cid:18) (cid:19) (cid:18) (cid:19) (cid:18) (cid:19)(cid:18) (cid:19) 33 3 11 59 59 −1 4 = =− ·− = =(−1)(3−1)/2 =−1 59 59 59 3 11 3 11 6 MATH 242 Algebraic Number Theory 7 (iii) (cid:18) (cid:19) (cid:18) (cid:19) (cid:18) (cid:19) (cid:18) (cid:19)(cid:18) (cid:19) (cid:18) (cid:19) (cid:18) (cid:19) 67 89 22 2 11 67 1 = = = =−1·− = =1 89 67 67 67 67 11 11 Before proving the two main theorems, we provide some sample applications to demonstrate their use- fullness in questions of number theory; this week’s homework includes modifications of all these results: Proposition 2.14. p an odd prime. Then −2 is a quadratic residue modulo p if and only if p is congruent to 1 or 3 modulo 8. Proof. We have (cid:18) (cid:19) (cid:18) (cid:19)(cid:18) (cid:19) −2 −1 2 = =(−1)(p−1)/2(−1)(p2−1)/8 =(−1)(p−1)/2+(p2−1)/8, p p p and p−1 p2−1 p2+4p−5 (p−1)(p+5) + = = . 2 8 8 8 One now checks that 1 0 3 (p−1)(p+5) 0 p≡ mod 8⇒ ≡ mod 2. −−31 8 11 (e.g. p≡−3 mod 8⇒p=8m−3⇒ (p−1)(p+5) =8m+1≡1 mod 2). Therefore 8 1 1 3 (cid:18)−2(cid:19) 1 p≡ mod 8⇒ = . −−31 p −−11 Proposition 2.15. There are infinitely many positive primes in Z which are congruent to −1 modulo 8. Proof. Asusual,weprovethisbycontradiction,assumingthatthesetofallsuchprimesisfinite: {p ,...,p }. 1 m Let M = 8(p ...p )2−1, and let M = qr1...qrt be the prime factorization of M. If q ≡ 1 mod 8 for all 1 m 1 t i i, then M =qr1...qrt ≡1r1...1rt ≡1 mod 8, 1 t which is false. Therefore there is i such that q (cid:54)≡1 mod 8. i Notice that q is odd since M is odd. Moreover, we have i (4p ...p )2 =2(M +1)≡2 mod q , 1 m i so 2 is a quadratic residue modulo q . The “Legendre symbol of 2” theorem now implies q ≡ ±1 mod 8, i i and so q ≡−1 mod 8. i Thereforeq =p forsomej,whencewegettheusualcontradiction: q|p ...p andq|M impliesq|2. i j 1 m Proposition 2.16. Let p > 3 be a Fermat prime (this means p = 2n +1 for some n ≥ 1). Then 3 is a primitive root modulo p. 7 8 MATH 242 Algebraic Number Theory Proof. Since the group Z/pZ× has p−1=2n elements, any element g of the group which satisfies g2n−1 (cid:54)=1 is a generator. Therefore it is enough to prove that 32n−1 (cid:54)≡1 mod p. (cid:16) (cid:17) (cid:16) (cid:17) But 2n−1 = (p−1)/2 and 3(p−1)/2 = 3 ; therefore we must show that 3 (cid:54)= 1; i.e. that 3 is not a p p quadratic residue mod p. Since p ≡ 1 mod 4, the Law of Quadratic Reciprocity implies (cid:16)3(cid:17) = (cid:0)p(cid:1); since 2 ≡ −1 mod 3, we see p 3 that p ≡ (−1)n +1 mod 3, which is 0 or 2 modulo 3. But p is prime, so not divisible by 3. Therefore (cid:16) (cid:17) (cid:16) (cid:17) p ≡ 2 mod 3; 2 is not a quadratic residue modulo 3, so now we know 3 = −1. Therefore 3 = −1, p p completing the proof. We now begin the proofs of the two main theorems: “Legendre symbol of 2” and “Law of Quadratic Reciprocity”. Although Ireland and Rosen follows Gauss’ methods, we will follow a proof due to Eisenstein (there are at least 233 different proofs in existence today1). The following technical lemma is essential: Lemma 2.17 (Eisenstein’s lemma). Let p be an odd prime, and a∈Z not divisible by p; then (cid:18) (cid:19) a =(−1)s, p where (p−1)/2(cid:22) (cid:23) (cid:88) 2ka s= . p k=1 Proof. For any integer k, we will write r(k) to denote the unique integer in the range 0,...,p−1 which is congruent to k modulo p; in other words, r(k) is the remainder when k is divided by p. The proof is a little tricky so we will label the steps: (1). Firstly, if 1 ≤ l ≤ p−1 then r((−1)ll) is even and non-zero. Indeed, if l is even then r((−1)ll) = r(l) = l (which is even); if l is odd, then r((−1)ll) = r(−l) = p−l (which is even); and it is non-zero since r((−1)ll)≡(−1)ll(cid:54)≡0 mod p. (2). So, if k ∈ {1,2,...,(p−1)/2} then 2ka is coprime to p and therefore r(2ka) ∈ {1,...,p−1}; so paragraph (1), with l = r(2ka), shows r((−1)r(2ka)r(2ka)) ∈ {2,4,...,p−1}. Thus there is a well-defined map R:{1,...,(p−1)/2}→{2,4,...,p−1}, k (cid:55)→r((−1)r(2ka)r(2ka)), which we next prove is injective. So suppose that 1≤k,k(cid:48) ≤(p−1)/2 and R(k)=R(k(cid:48)); this implies (−1)r(2ka)r(2ka)≡(−1)r(2k(cid:48)a)r(2k(cid:48)a) mod p. Therefore(−1)r(2ka)2ka≡(−1)r(2k(cid:48)a)2k(cid:48)a mod p;since2aisaunitmodulop,wemaydividebyittodeduce that (−1)r(2ka)k ≡ (−1)r(2k(cid:48)a)k(cid:48) mod p. So k ≡ εk(cid:48) mod p, where ε = (−1)r(2k(cid:48)a)−r(2ka) ∈ {0,1}. But k,k(cid:48) are both in the range 1 ≤ k,k(cid:48) ≤ (p−1)/2, so k ≡ −k(cid:48) is impossible, and k ≡ k(cid:48) happens if and only if k =k(cid:48). This proves that R is injective. (3). Since the codomain and domain of R both have cardinality (p−1)/2, we see that R is actually a bijection: in other words, as k runs over the integers 1,2,...,(p−1)/2, then r((−1)r(2ka)r(2ka)) runs over the integers 2,4,...,(p−1). Therefore (p−1)/2 (p−1)/2 (cid:89) (cid:89) r((−1)r(2ka)r(2ka))= 2l, k=1 l=1 1http://www.rzuser.uni-heidelberg.de/~hb3/fchrono.html 8 MATH 242 Algebraic Number Theory 9 and so (p−1)/2 (p−1)/2 (cid:89) (cid:89) 2l≡ (−1)r(2ka)r(2ka) mod p. (†) l=1 k=1 (4). With identity (†) established, we may now complete the proof: (p−1)/2 (p−1)/2 (cid:89) (cid:89) a(p−1)/2 2k = 2ka k=1 k=1 (p−1)/2 (cid:89) ≡ r(2ka) mod p k=1 (p−1)/2 ≡(−1)(cid:80)kr(2ka) (cid:89) (−1)r(2ka)r(2ka) mod p k=1 (p−1)/2 ≡(−1)(cid:80)kr(2ka) (cid:89) 2k mod p k=1 Since (cid:81)k(p=−11)/22k is coprime to p, it follows that a(p−1)/2 ≡ (−1)(cid:80)kr(2ka) mod p. But Euler’s lemma says (cid:16) (cid:17) (cid:16) (cid:17) a(p−1)/2 ≡ a , so a ≡ (−1)(cid:80)kr(2ka) mod p. Since two powers of (−1) are congruent modulo p if and p p (cid:16) (cid:17) only if they are equal, we deduce a = (−1)(cid:80)kr(2ka). Finally, the definition of the floor function and r p function mean that (cid:22) (cid:23) 2ka 2ka= p+r(2ka), p which implies (cid:106)2ka(cid:107)≡r(2ka) mod 2. Therefore (cid:16)a(cid:17)=(−1)(cid:80)k(cid:98)2kpa(cid:99), as required. p p Now we may prove the first of the main theorems: Theorem 2.18 (Proof of “Legendre symbol of 2”). p an odd prime. Then (cid:18) (cid:19) (cid:40) 2 1 p≡±1 mod 8 = p −1 p≡±3 mod 8 Proof. If k is an integer in the range 1 ≤ k ≤ (cid:98)p/4(cid:99) then 1 ≤ 4k ≤ p, so actually 1 ≤ 4k < p (since p is (cid:106) (cid:107) prime) and so 0≤4k/p<1; therefore 4k =0. If instead k is the in the range (cid:98)p/4(cid:99)<k <(p−1)/2 then p (cid:106) (cid:107) (cid:16) (cid:17) a similar argument shows 4k =1. So 2 =(−1)s (by Eisenstein’s lemma) where p p (p(cid:88)−1)/2(cid:22)2k2(cid:23) (cid:88) p−1 (cid:106)p(cid:107) (cid:106)p(cid:107) (cid:106)p(cid:107) s= = 1= − = − . p 2 4 2 4 k=1 k s.t. (cid:98)p/4(cid:99)<k≤(p−1)/2 Therefore we must show that (cid:40) (cid:106)p(cid:107) (cid:106)p(cid:107) even p≡±1 mod 8 − is 2 4 odd p≡±3 mod 8 So, write p=8c+ε for some c∈Z and some ε∈{−3,−1,1,3}. 9 10 MATH 242 Algebraic Number Theory If ε=±1 then (cid:106)p(cid:107) (cid:106)p(cid:107) − =(cid:98)4m±1/2(cid:99)−(cid:98)2m±1/4(cid:99) 2 4 (cid:40) (4m−1)−(2m−1) ε=−1 = 4m−2m ε=1 =2m ≡0 mod 2 Secondly, if ε=±3 then (cid:106)p(cid:107) (cid:106)p(cid:107) − =(cid:98)4m±3/2(cid:99)−(cid:98)2m±3/4(cid:99) 2 4 (cid:40) (4m−2)−(2m−1) ε=−3 = (4m+1)−2m ε=3 (cid:40) 2m−3 ε=−3 = 2m+1 ε=3 ≡1 mod 2 And now we prove the second main theorem: Theorem 2.19 (Proof of the Law of Quadratic Reciprocity). Let p,q be distinct odd primes. Then (cid:18) (cid:19)(cid:18) (cid:19) p q p−1q−1 =(−1) 2 2 . q p Proof. We will study the following diagram in the (x,y)-plane: Let Λ be the set of lattice points, i.e. points with integer coordinates, which are strictly inside the rectangle ACHF, i.e. Λ={(x,y)∈Z2 : 0<x<p, 0<y <q}. 10