 Welcome back. We have proved this theorem in the last lecture it took the whole of our lecture that if you have two reduced forms which are equivalent then those two reduced forms have to be one and the same. And I also told you that while proving that we actually computed the set of all possible transformations which will take one reduced form to itself. Depending on of course the conditions that you have on the coefficients a, b and c. We are now going towards proving the we are now going towards determining the set of integers which is sums of two squares. And for that we will require a small criterion of a number represented by some form in the terms of the discriminant of the form. So, the statement is here in front of you that an integer n, so of course this is in natural numbers it is properly represented by some form f of discriminant d if and only if we have that x square congruent to d mod 4n has a solution. Let us make sure that we understand the statement clearly. There is one condition which says that d is a square modulo 4n. This is something that we understand quite well by now. We have understood the theory of congruences very well. We also know how to compute squares modulo given integer using Chinese remainder theorem and then using the quadratic reciprocity laws. So, we will understand this thing quite well when a certain d is a square modulo 4n. This is equivalent to sum form of discriminant d representing n properly. So, we have some pair of integers m, n which are coprime or since you have taken n already we will take some pair of integers p, r which are coprime and f of p, r is equal to n. This is the statement that we have that this integer n is properly represented by some form. We will begin with some form f of discriminant d representing n and we will show that x square congruent to d mod 4n has a solution. And in the other direction we will assume that x square congruent to d mod 4n has a solution and we will construct some form. The form is not fixed. The statement therefore is very liberal. We are allowed to choose any form of a given discriminant which represents the number n properly. So, let us assume first of all that x square congruent to d mod 4n has a solution. b square is congruent to d modulo 4n for sum b in integers then b square minus d is 4nc once again for sum c in integers. Or this also implies that d is b square minus 4nc which reads something like our formula of the discriminant b square minus 4ac. n is taking the role of a then the form where I will just put n instead of a nx square plus bxy plus cy square represents plus minus 1 comma 0. Of course plus minus 1 comma 0 is a co-prime pair of integers and therefore we have that n is properly represented by some form f of discriminant equal to d. This is the formula for the discriminant. So, we have proved one way of this statement. We started with assuming that x square congruent to d mod 4n has a solution and we have constructed a form which has discriminant d and it represents n properly. Now, we will prove the other direction which is where we will start with assuming that f represents n properly and we will need to prove that the discriminant f which is d has to be a square modulo 4n. Now, represent properly then p comma r is n with the GCD of p and r is 1. But whenever we have GCD to be 1 remember that the GCD is a linear combination of your two integers with integer coefficients. So, then there are these q and s coming from integers such that pq minus rs is equal to the GCD which is 1. Then f prime be the form by changing the variables by x going to px plus qy, y going to rx plus sy. So, let prime be given by a prime x square plus b prime xy plus c prime y square then we know that f a prime has to be the value of the original form taken at p comma r but we had assumed this to be equal to n. We had assumed that f of p comma r is n. So, the new a prime is equal to n we also have that the d remains the same that means the discriminant of f and the discriminant of f prime are the same and from this formula we can compute the value for the discriminant of f prime which is b prime square minus 4 a prime c prime which is b prime square minus 4 n c prime and it shows that x square congruent to d modulo 4n has a solution our b prime is going to give you that solution. So, we proved that whenever our form f represents an integer n properly then modulo 4n the discriminant of the form f has to be a square. This is a very important and very useful criterion. Note that here we do not have a control on the form f but we can we have that the there is some form of discriminant d which is going to represent our integer n and by using the equivalence we can show that there is a reduced form of the given discriminant d which represents n. Now if you happen to have that h of d is 1 then there would be a unique form unique reduced form of the given discriminant and that would mean that any form of the discriminant d represents n properly. We will soon see an application of this result but before that we have to think about the form x square plus y square. We are going to study all integers represented by x square plus y square but this form in particular x square plus y square has a very peculiar condition. It has a very nice property and we are going to see this property in the next slide that the form x square plus y square is multiplicative. What do I mean by this? I mean that if I take a square plus b square and multiply to that by c square plus d square then this is again a sum of 2 squares. This is a very remarkable property it says that the form is multiplicative that means if I take 2 numbers which are represented by the form take the product of those 2 numbers that product is also represented by the form. This need not be true for all forms but for this form this is true and the proof is very simple. All you have to do is observe that this is nothing but a plus i b modulus square. a and b are integers you construct the complex number a plus i b. I said in the beginning of the lecture course that I am not going to use any advanced techniques but I believe that the notion of complex numbers is a very basic concept and therefore everyone would know that I will assume this and we also have that c square plus d square is mod c plus i d whole square and we know that if I take 2 complex numbers take their modulus and take the product this is same as taking the complex numbers taking their product and then taking the modulus. So this is nothing but a plus i b into c plus i d mod square and I will write this inside complex number as the complex number alpha plus i beta whole square and then we are done. So any 2 numbers which are represented by x square plus y square their product is also represented by x square plus y square. This is a very useful fact because if we could determine all the primes which are represented by x square plus y square then we are essentially done. It will tell us a big set of numbers which are represented by x square plus y square. And before going to do that we will also need this important result that if you have n which is a square plus b square and p is a prime factor of n with p congruent to 3 mod 4 then p square should divide n. In the introduction I had listed out some primes which are not sums of 2 squares and I had listed them out as 3, 7, 11 and so on. These are all the primes which are congruent to 3 mod 4 and if you should have so assuming this result we see that whenever prime congruent to 3 mod 4 divides a sum of 2 squares then the square of that number should divide. It would then follow that such a prime p congruent to 3 mod 4 cannot be a sum of 2 squares. Let us go on and try to prove this result. So let n be a square plus b square let p congruent to 3 mod 4 divide n then a square plus b square is congruent to 0 modulo p because p divides n p divides a square plus b square. So a square plus b square is 0 mod p. If p does not divide a then p does not divide b that is quite clear because if p divides b then a square plus b square is 0 mod p therefore b square is 0 mod p would tell you that a square is 0 mod p and therefore p will have to divide a. So whenever p does not divide any of the a's a and b it will divide none of them. Then a square congruent to minus b square mod p gives a solution x square congruent to minus 1 mod p. This is because since b is not divisible by p you can simply cancel out b square and write this namely x equal to a b inverse the b inverse being computed modulo p. So we have that x square congruent to minus 1 mod p has a solution but this would imply that p is then congruent to 1 modulo 4. We have computed precisely when minus 1 is a square modulo p. It would then imply that p is congruent to 1 modulo 4 which is contradiction because we have started with p congruent to 3 mod 4. So this contradiction says that something that we have assumed on the way has to be false and the thing that we have assumed is this that p does not divide a. This was the assumption that we started with it then said that p does not divide b and then it gave us a solution to x square congruent to minus 1 mod p. So this assumption has to be false which would mean that p divides a. So p divides b and then we have a by p which is an integer its square plus b by p square is n by p square. This is an integer and clearly a natural number which implies that p square divides n. We had that a square plus b square is n and we proved that if p divides n then p should divide a and p should divide b. So a by p is an integer a by p square plus b by p square is a square plus b square upon p square but a square plus b square is n. So you get that n upon p square is an integer has to be a natural number then p square divides n. So what we have proved is that whenever we had a prime p congruent to 3 mod 4 dividing a sum of 2 squares then square of that prime should divide the integer n. After that we have one very small cute result which is that the prime 2 is represented by x square plus y square. I believe that all of you can prove this we have that 2 is nothing but 1 square plus 1 square. So we have dealt with p congruent to 3 modulo 4 we have dealt with the oddest of the primes which is the prime 2. Now the only class of the primes which remains is the prime is the set of primes p congruent to 1 modulo 4. We will prove that every such prime is a sum of 2 squares. Every such prime is represented by x square plus y square. This is our next result. Na prime p congruent to 1 modulo 4 is represented by x square plus y square. Recall the criterion which we did in the beginning of this lecture that is represented by some form of discriminant if and only if. Here we have the criterion for proper representation x square congruent to D mod 4n has a solution. We are looking at the form x square plus y square. Our form is and its discriminant if you remember is minus of 4 discriminant if you remember is minus 4. So we want to see where we have this congruence where n is now our prime p congruent to 1 modulo 4 x square congruent to minus 4 mod 4p has a solution. Observe that 4p so then here 4p must divide this solution x square plus 4 which implies that x has to be even say x equal to 2 alpha. Any solution if there is a solution we will actually we are actually going towards constructing the solution. So we have to see what properties the possible solution should have and that will help us constructing the solution. So we observe that such an x has to be twice of an integer because 4 divides the number 4p which divides x square plus 4 and therefore 4 divides x square. If 4 divides a square then by unique factorization of integers the fundamental theorem of arithmetic which gives unique factorization into prime of any integer will tell you that x also has to be an even integer. So then you have the solution to be 4 alpha and then 4p reads 4 alpha square plus 4 4p divides 4 alpha square plus 4 which implies that p divides alpha square plus 1. Now I hope you see the thing that we are coming to which implies that y square congruent to minus 1 mod p has a solution. We started with minus 4 being a square mod 4p and we have reached minus 1 being a square modulo p. Our p is congruent to 1 modulo 4 so we do have such a solution. We do have that minus 1 is a square modulo p and once we have this solution since p is congruent to 1 mod 4 we do get alpha in integers such that alpha square is congruent to minus 1 mod p. This gives a solution x square congruent to minus 4 mod 4p namely x equal to 2 alpha. So by the criterion there is a reduced form discriminant minus 4 that represents p it represents p properly but certainly it represents p and I would now like to recall this to you that we have computed h of minus 4. h of d for any integer d was the number of in equivalent reduced forms of discriminant d which we also proved to be the number of reduced forms of discriminant d. We proved that h of minus 4 was 1. There is only one form which is reduced and is of discriminant minus 4 and that form is nothing else but x square plus y square. Here we have proved that there is a reduced form of discriminant minus 1 which represents p that implies that x square plus y square represents our integer p our prime number p. So let me just recall this to you once again that any p congruent to 1 mod 4 is represented by x square plus y square 2 is represented by x square plus y square p congruent to 3 mod 4 is not represented by x square plus y square but the square of these numbers should divide the integer x square plus y square whenever p divides it and using this in the next lecture we are going to determine the set of all integers which can be written as sums of 2 squares. So very interesting thing to see I will see you then. Thank you very much.