 Welcome back we are proving the quadratic reciprocity law and we started with the proof of Gauss lemma in the very first place. After that we saw a rectangle starting where the x coordinate went from 0 to q by 2, y coordinate went from 0 to p by 2, we called the rectangle to be r and we divided the rectangle into 4 parts and here are those 4 parts in front of you on the screen where r1 was given by this particular equation. This is r1, this is r2, this is r3 and then we have r4. So these 4 parts together give you r. So r is disjoint union of ri as far as the lattice points are concerned. Of course if you are looking at the satheurotic structure of the rectangle r then it is not quite the union of r1, r2, r3, r4 because the lines have been omitted. But without counting without worrying about the lines if you are looking at the lattice points then for lattice points this union is valid. What we have also seen in the previous lecture itself that the number of lattice points in r1 is equal to the number of lattice points in r4. So there is a bijection between the sets of lattice points in these 2 parts. Therefore, if you are counting the number of lattice points in r2, the number of lattice points in r3 then to get the number of lattice points in r, we will need to add twice the number of lattice points in r1 because the number of lattice points in r1 is the same as the number of lattice points in r4. So a multiple of 2 needs to be added. So when you take power of minus 1, the power of minus 1 is not going to change whether you keep the power to be only the number of lattice points in r2 and r3 or whether you keep it to be the whole rectangle r. We also noticed that the number of lattice points in the whole rectangle r is q minus 1 by 2 into p minus 1 by 2. This is the number of total lattice points in the rectangle r. Now we go to the rectangle the part r2. Note it carefully it is px minus qi to be bigger than minus q by 2 and less than 0. This is the part of the rectangle that we are looking at and we know connected with the quadratic residue symbol p by q. This is the second step where we say that p by q is minus 1 power m where m is the number of lattice points in the region r2 and there are no prices for guessing that we are going to use Gauss-Lemma. This is going to be used. So we have to look at numerically least residues of multiples of p and see how many of those are negative. That is the number which is m and we are also saying here that m is the number of lattice points in the region r2. So we have to say we prove m is equal to the number of negative numerically least residues of pa where a goes from 1 to up to q minus 1 by 2 because remember we are taking the quadratic residue symbol modulo q and it is taken for the element p. So we have to take multiples of p. So these are the multiples of p that we will look at. So we will look at p, 2p, 3p and so on up to q minus 1 by 2 into p. These are the numbers that we look at. Take their numerically least residues modulo q, see how many of these are negative. So numerically least residues are the residues from minus q by 2 to q by 2 and this is why we had a minus q by 2 in the equation for the region r2. So these are the points which are going from minus q by 2 to q by 2 and the negative ones will be from minus 1 q by 2 to 0. So we prove that there is a bijection between the number of lattice points in r2 and the negative numerically least residues of multiples of p. We are going to give you a bijection. So if x, y is a lattice point then of course we know the equation of the region r2 we get that minus q by 2 is less than px minus qy less than 0. So this is your numerically least residue of px and of course x is going from 0 to q by 2. So x can be an integer from 1 to q minus 1 by 2. So the pair x, y gives you a multiple of p which has negative numerically least residue namely the multiple px. This is the multiple px of p with x less than q by 2 but positive such that the numerically least residue modulo q is a negative quantity. So we have a very simple map from the number of lattice points in the region r2 to the negative numerically least residues of multiples of p sending the pair x, y to the multiple px. So we have this way map. Now ideally if some multiple pa of p for a between 1 and q minus 1 by 2 has negative numerically least residue we should get a lattice point a comma something in the region r2. Why are we getting it to be a comma something? Because the map going from r2 to the numerically least residues is going to give you the first coordinate. So the first coordinate has to tell you what multiple you are taking. So on in the reverse direction if you are taking a multiple a of p by some number say a which has negative numerically least residue then the corresponding point in the region r2 has to have first coordinate a. That is the lesson we learn from this slide and we go on to try that. So if so I will write it in this way minus q by 2 is less than the numerically least residue of p a is less than 0. Then what we must get is that this numerically least residue has to be given it is congruent to p a modulo q. So the difference between the numerically least residue and the quantity p a is a multiple of q. But we should also notice one thing that p a is a positive number remember p is a prime. So we are taking p to be a natural number a is going from 1 to q minus 1 by 2. So a is positive therefore p a is positive q is positive. So you cannot add a positive multiple of q to p a to get this negative numerically least residue. So what we do here is that we modify this and get here negative for b positive. So we are actually subtracting a multiple of q from p a of course p a is positive and you want the residue to be less than 0. So you will keep subtracting multiples of q from this. The multiple has to be also unique because the length of this interval is less than q minus q by 2 to 0 the length is simply q by 2. So you will have exactly one numerically least residue which is of course from minus q by 2 to q by 2 the length is q. So you are going to get one you are going to get a unique numerically least residue. So this b that we are going to get is going to be a unique quantity. So starting from this numerically least residue of the multiple p a which is negative we obtained a positive b and remember on the last page our equation looked very similar we had p x minus q y to be between minus q by 2 and 0. So here if we are getting it to be p a minus q by 2 q b we should rather prove we should prove a comma b belongs to R 2. We should prove that it belongs to the region you may think that indeed this is the equation for the region R 2 minus q by 2 less than p a minus q b less than 0. But we should also prove it amounts to proving that our b is less than p by 2 the y coordinate should not go beyond p by 2 that is the thing that we should prove that is quite easy actually because we have minus q by 2 less than p a minus q b we use this side of the inequality to get the result that we want of course with the proper condition on a. So this will imply that minus q by 2 minus p a is less than minus q b and now you multiply by minus 1 everywhere to get the other side of the inequality so which gives you and you also cancel out q. So it gives you that 1 by 2 plus p by q a is bigger than b and then we notice that since a was less than q by 2 this part is less than 1 by 2 plus p by 2 and therefore b which is an integer less than p plus 1 by 2 should have the property that b is actually less than p by 2. So what we have proved is the following thing let me just say that in words once again that we took the negative numerically least residues of multiples of p by the numbers 1 to q minus 1 by 2. This number when put to the power of minus 1 gives you the Lausanne symbol p by q but we also proved that this number is the same as the number of elements in R 2. So therefore the Lausanne symbol p by q is minus 1 power m where m is the number of elements in the part R 2 the number of lattice points in the region R 2. There is a similar step that we will have to do to tell that q by p this is the other part of the reciprocity now you are taking the Lausanne symbol of q with respect to p this is given by minus 1 power n where n is the number of lattice points in the region R 3 and this proof is similar to the earlier proof. So I am not going to do it let us just set up one notation that let Z be the number of lattice points in the region in the part R 1 and we have seen that R 1 and R 4 have the same number of lattice points so Z is also the number of lattice points in the part R 4. Now with all this we can prove the final part of the quadratic reciprocity law as follows we want to prove this now that p by q into q by p is minus 1 to the power p minus 1 by 2 q minus 1 by 2 LHS if you remember is minus 1 to the power m into minus 1 to the power n given by the previous two steps which gives you minus 1 to the power m plus n. But if you add an even number to this power then you do not get anything different so you get m plus n plus 2 Z. But this is now the number of lattice points in the region R which is equal to the product of these two let me draw a big rectangle here because this was indeed a very long proof. But now this is proved so to quickly recall the proof what we did was that we constructed a rectangle having the number of lattice points to be equal to p minus 1 by 2 q minus 1 by 2 we divided it into four parts the two middle parts gave you the number of lattice points were was giving you the Legendre symbols p by q and q by p respectively and the remaining two parts had the same number of lattice points. So, when you counted the number of lattice points up to parity the number of lattice points in the whole region which is p minus 1 by 2 into q minus 1 by 2 turned out to be the same as the number of lattice points in these mid to middle regions which gave you the product of the Legendre symbols. So, this is the third and the main part of the quadratic reciprocity laws there are three parts let me recall these three for you once again. So, these are the three results that we have in one place the first one tells you how to compute the Legendre symbol for minus 1. So, the Legendre symbol for minus 1 is obtained by this formula which is simply the Euler's criterion for any number a but you can see easily from this part when minus 1 is a square mod p and when it is not a square mod p. This is all for odd primes for p equal to 2 all the nonzero numbers are odd numbers and they are all congruent to 1 mod 2 and therefore they are all squares. So, we are only looking at odd primes this tells you when 2 is a square mod p and then this is the final part of the quadratic reciprocity law. Let me tell you how we are going to use these three laws to do the computation. The computation would typically be a by p where you have a prime p in the denominator and a to be some number you will go modulo p and get a residue for p for a by modulo p this residue will lie between 0 to p. Now, even if you start with a to be a prime or whatever you have it is possible that the a that you have obtained the residue for a that you have obtained may not be a prime in that case you will be able to decompose it and we also know that Legendre symbol is multiplicative further if there are already some squares in the factorization of a you can ignore the squares because a square into something is a square if and only that something is a square. We are going modulo p which is a prime and you are looking at things which are coprime to p. So, you can divide by the numbers which are coprime to p. So, that will tell you that you can cancel the squares you can ignore the squares while computing the residue symbols the Legendre symbols. So, we have a by p which we have written as product of various distinct primes now because once the prime comes with higher multiplicity you can cancel the even numbers from the multiplicities and so you will be left with only those primes which come with odd powers. So, you have p1 by p, p2 by p up to say pr by p if any of these p1, p2, pr is equal to 2 we will use the second law to compute the Legendre symbol 2 by p and for odd ones you are going to reduce the case one by one as we have explained in the last lecture to be able to finally compute the Legendre symbol. Let us do an example and since we are in 2020 now let us try to answer this question whether 2020 is a square modulo the prime 21. So, ideally you should reduce 2020 modulo 31 and see what is the residue you get but here we first of all observe that 2020 has a nice factorization 20 divides 2020 and 20 is nothing but 2 square into 5 into 101. So, when we are computing the Legendre symbol 2020 by 31 this Legendre symbol is 2 square by 31 into 5 by 31 into 101 by 31 this one because this is already a square. So, this Legendre symbol is 1 therefore we can ignore this and do the remaining computation here 5 by 31 we are going to look at 5 and 31 are both primes now but 5 is congruent to 1 modulo 4. So, we can switch their order without having to change the sign. So, we get it to be 31 by 5 the Legendre symbol 31 by 5 into 101 modulo 31 now we go modulo 31. So, 31 into 3 is 93 once you take away 93 from 101 you get 8 by 31. So, our 2020 by 31 the Legendre symbol is the product of these 2 Legendre symbols further modulo 5 31 is a square because it is same as 1 modulo 5. So, this Legendre symbol is 1 here 8 is equal to 4 into 2. So, this Legendre symbol is simply 2 by 31 the 4 that you have in the factorization of 8 can be ignored because it is a square. So, the final computation that we need to do is this 2 by 31 we use the second law in the quadratic reciprocity law to get this to be minus 1 to the power p minus p square minus 1 by 8. So, you will have to look at 31 square minus 1 by 8 but this is 1 because 31 is minus 1 modulo 8. So, whenever p is congruent to plus or minus 1 mod 8 2 is a square modulo p 31 congruent to minus 1 mod 8. So, this tells you that indeed 2020 is a square modulo 31. Now, what is its square root that you may be able to compute by reducing modulo 31 and see where 2020 goes. So, this is how we are going to use the 3 parts of the quadratic reciprocity law which will tell you whether a given number is a square modulo the given odd prime or not. We can use this in even better way. We can actually compute all primes p such that 2020 is a square modulo that prime p that can also be done because for instance if I wanted to know what are the odd primes such that 2 is a square modulo p. Then the second law will tell me that p congruent to plus or minus 1 modulo 8 are the primes where 2 is a square. For the other odd primes 2 is a non square. So, if you can do it for 2 why not do it for 3. So, let us use the quadratic reciprocity laws and try to find all the odd primes p such that 3 is a quadratic residue modulo p. So, what we are going to do is to compute. So, find p such that this Legendre symbol is 1. This is what we have to do. So, of course if your p is 2 3 is a square. So, we are not going to consider the prime p equal to 2 we are looking at odd primes anyway. So, here we have to switch the orders because 3 by p is not very useful whereas p by 3 would be useful because modulo 3 we know what are the squares mod 3. Modulo 3 there are only 2 non-zero numbers 1 and 2 and out of these 2 1 is a square 2 is a non square. So, we are going to use using the third part of the quadratic reciprocity law we get 3 by p is p by 3 into minus 1 to the power 3 minus 1 by 2 which is just 1 and p minus 1 by 2. So, this is what we have. Now this so here p by 3 is equal to 1 or minus 1 depending on whether p is congruent to 1 mod 3 or whether p is congruent to 2 mod 3 and minus 1 to the power p minus 1 by 2 this quantity is 1 when p is congruent to 1 mod 4 and this is minus 1 when p is congruent to 3 mod 4. So, when is this product going to be equal to 1 we want this whole thing to be 1 then this can be 1 when you have this equal to 1 and this equal to 1. So, there are 2 conditions on p that p has to be 1 mod 3 and p has to be 1 mod 4 and we use the Chinese remainder theorem. If you remember the result that we have proved from some earlier parts of our lectures that if you have this congruence modulo 3 modulo 4 3 and 4 are both co-prime therefore modulo 12 there is a unique congruence class residue class that is actually the congruence class 1 mod 12. So, when p is congruent to 1 mod 12 both the numbers p by 3 and minus 1 to the power p minus 1 by 2 are both 1. So, their product is 1 and therefore we get that 3 by 2 so 3 by p equal to 1 for p congruent to 1 modulo 12. This is one case in the second case you can have both equal to minus 1 and even then we will get the product to be 1. So, we have to take this case and this case but here we observe that this is 2 mod 3 here it is 3 mod 4 so modulo 12 we have a unique class which is given by 11 mod 12. For 11 when you go modulo 4 you get 3 and when you go modulo 3 you get 2. Another way to see this is that both these congruence classes are given by p congruent to minus 1 mod 3 and p congruent to minus 1 mod 4. So, we have in the next line that p congruent to minus 1 mod 12 will also give us the same thing that it is 1 modulo the Lajandra symbol is 1 and the Lajandra symbol happens to be minus 1 in all the remaining cases which are p congruent to 5 mod 12 and p congruent to 7 mod 12. There are these other two odd numbers modulo 12 which are 3 and 9 but a prime cannot be congruent to 3 or 9 modulo 12 because any such prime will then have to be divisible by 3 but we are looking at the residue behavior of 3. So, we are not going to take the prime equal to 3. So, we are looking at all odd primes not equal to 3 such that 3 is a square modulo the prime and the answer is that such a prime has to be 1 or minus 1 modulo 12. So, we actually get a congruence class we get the solution in an arithmetic progression. It can be 1 mod 12 or minus 1 mod 12. So, there are two arithmetic progressions 12 k plus 1 12 k minus 1 in these whatever prime you have will have the property that 3 is a quadratic residue modulo this prime. Similar computations can be done for 5 then you can do them for 30 because 30 is 2 into 3 into 5 2 will give you some residue restrictions on p 3 will give you some residue restrictions 5 will give you some residue restrictions and then you have to take the LCM of these restrictions to get the answer for 30 60 and indeed for any number a. We will try to see whether we can do any of these either in the next lecture or in the tutorial problems. So, with that we will stop at this point and see you in the next lecture. Thank you.