 Welcome back, we are looking at the structure of un in general the group of units modulo any given natural number n and we saw that we can use the Chinese remainder theorem to understand it. So, let us recall quickly we have here the slide which writes a statement that we have and we observed in the last lecture that this is equivalent to the Chinese remainder. So, the statement says that whenever you have m and n to be a pair of natural numbers which are co-prime to each other then there is an isomorphism actually a ring isomorphism from the residue classes modulo mn to the products of the residue classes modulo m with the residue classes modulo n and this ring isomorphism is the natural map that we can think about which is that you start with a residue class of some natural number a modulo mn and we send it to the residue class modulo m residue class modulo n of the same a. This is the map which gives you an isomorphism. Now, this is a ring isomorphism. So, as we have observed it will take sums to sums and products to products. So, there is one more thing about the isomorphisms which is that if it will take the identity element to the identity element note that in the ring homomorphism identity the multiplicative identity need not always go to the multiplicative identity but let us not worry about that right now. Here this is an isomorphism and so it should take the multiplicative identity 1 to the multiplicative identity to the product of those two rings which will then have to be 1 comma 1. Whenever you have two rings r1 and r2 then in the product r1 cross r2 the 1 of r1 cross 1 of r2 that or 1 comma 1 of r1 comma 1 of r2 that element is the multiplicative identity for r1 cross r2. So, the element 1 should go to 1 comma 1 and that is also true for as the by the way we have defined our map. We will take the element 1 in Z mn which is the residue class of 1 and that goes to the residue class of 1 modulo m comma residue class of 1 modulo n. So, identity goes to identity and then one can prove that if something is invertible its image is also invertible because if I have an element u here it will say go to u1 comma u2 and u has inverse v which goes to v1 comma v2 then because uv is 1 it will tell you that u1 v1 is 1 and u2 v2 is 1. So, the ring isomorphism has this nice property that it will take the units which are the invertible elements modulo in with respect to the multiplication to the units and we just observe this to get our next result. So, what we have is that ua is basically the group of units in Z a for any natural number a and a ring isomorphism preserves units. So, this very simple fact that a unit has to go to units under a ring isomorphism we get that when you restrict the map theta to the group of units you get a group isomorphism of course now the group of units is not preserved under the addition. We know that one is always a unit minus one is always a unit and if you take the sum of these two you get 0 and 0 is never a unit. So, this is not preserved under addition but there is the multiplication structure defined on u and the set u, m is actually a group with respect to this multiplication coming from the finite ring Zm and when we have that theta from Zmn to Zm cross Zn is a ring isomorphism we simply restrict it. So, the to give you a flavor of some advanced mathematics or the way these advanced mathematics is done is done by looking at these commutative diagrams. So, we have the this is the map theta we have umn sitting here we have um cross un sitting here we observe that if you take an element a in umn then you will look at a in Zmn. So, theta a is an element in the right hand side Zm cross Zn but since a is invertible theta a is also invertible. So, it is in the product of the invertible elements in the corresponding rings and therefore we have defined the map theta having restricted the theta to umn. So, we have a map a group homomorphism. So, this is a group harm and we need to just observe now that it is a 1 to 1 onto map but that is clear because the original theta is 1 to 1 onto. So, since theta is 1 to 1 onto so is theta restricted to umn. So, whenever I have any n any natural number n the un can be understood if you can decompose n as product of elements which are co-prime to each other pair wise co-prime to each other. But we know better such factorization than the prime factorization. So, what we do is that we decompose n as product of primes collect all the same primes together. So, we get one very nice decomposition for n. Here we have this decomposition for n where the primes are of course arranged in the increasing order. So, we have p 1 less than p 2 less than dot dot dot p k. So, they are not just that they are distinct but they are put in some nice order. Then the map theta actually is an isomorphism of groups. And this is a corollary we simply use the previous result. So, once we have understood upi power ni for all primes pi then we have understood using this result the structure of all un. It is a good thing to have done it as a result but we should also do the examples with respect to this. So, let us see some examples. Let us try to compute the structure of u 60 as a product of cyclic groups. This is something more than writing u 60 as product of u pi power ni because we need to also identify when each of those pi power ni are cyclic or whether they are themselves further product of cyclic groups. That is something that we have to observe. So, we write 60 in terms of its prime factorization. We will have 2 into 30. You can take one more 2 from 30 to write it as 2 square into 15 and 15 is 3 into 5. So, we have that u 60 is isomorphic to u 2 square into u 3 into u 5. We observed already that u 4 is a cyclic group of order 2. So, this is c 2. u 3 is already cyclic. Its order is phi 3 which is 2 and u 5 is also cyclic its order being phi 5 which is 4. So, we have a complete description of u 60 as product of cyclic groups. One will have to be careful when the power of 2 dividing the number n is more than 4. So, let us do one more example. Here we want to understand the structure of u 720 as a product of cyclic groups. So, we will need to write 720 as prime powers, product of prime powers. So, clearly 720 is 72 into 10 and 72 is 8 into 9. So, 8 is the highest power of 2 which divides 72 and therefore 16 is the highest power of 2 which divides 720. So, remember we had got 10 as 2 into 5 and then we had 9 here. So, this is 16 into 45 which gives us 2 power 4 into now 45 has 9 dividing it. So, we have 3 square and then we have 5. This is the prime factorization of 720 and therefore u 720 is isomorphic to u 2 power 4 cross u 3 square cross u 5. But u 2 powers 4 the u 16 remember this is the product of 2 cyclic groups. One of them being C 2 and then the other is of order 4 because the cardinality of this group the cardinality here is 8, the cardinality here is 6 and the cardinality here is 4. So, for 8 once we know that it has to be a product of C 2 with some another cyclic group we know that it has to be C 2 cross C 4. This is the prime power where P is odd. So, this is already cyclic and this is also cyclic. So, this is the complete description of u 720 and what we have done so far is that we have understood all un modulo some basic results in group theory and this is how we come to the end of our second theme. Remember we are looking at some special themes in this basic course on number theory. Our very first theme was on primes where we understood how primes were defined, how we could get a unique factorization of any natural number in terms of primes and we looked at some very basic properties of primes. Second theme is this theme on congruences where we looked at we defined what we mean by congruence and so we looked at the ring Z n Z modulo n Z and we have tried to understand this ring as much as possible the structure of this ring not just by understanding the addition but also the product and we have just now completed the understanding of all units in these rings. So, this completes our study of congruences although we are going to study congruences further you will often see that the themes that we have studied earlier will continue to be useful in higher themes. So, the thing that we have done earlier is not going to be forgotten we are going to use lots of things about congruences and some may even argue that you are going to do congruences for what you are going to do later but it is going to be with some special focus on quadratic equations and therefore this is the theme which we call quadratic residues. This is the next theme that we are going to now do. So, quadratic residues comes with quadratic residues say that this has to be something to do with congruences because we are looking at residue classes and so on. So, that will tell you that residues have something to do with congruences but let us study the notion quadratic first. Whenever you hear the word quadratic the thing that comes to your mind first is the quadratic equation which is A x square plus B x plus C equal to 0. This is the equation that we all think about we also know how to solve this equation. Let me just quickly recall the solution of this. This is the formula that we have all been studying since school. So, this is given by minus B plus or minus under root B square minus 4 AC upon 2A. This equation I have not told you where ABC come from. So, we may take the coefficients ABC to come from complex numbers for instance. And then we know that our solutions will also belong to complex numbers. Then the solutions X given by the above formula are also complex numbers. You may take ABC coming from integers, rationals or even reals but that does not guarantee that the solutions will always be in those particular sets. However, we know that whenever ABC are taken from complex numbers then the solutions can always be found in complex numbers. If you wanted to do this for the sets Z n then what should we do? First of all we note that this formula is a somewhat symbolic formula. You know we do not really use where ABC come from as long as you have a product for the ABC and X defined putting this value back here you will get a solution. But when you are applying this for some particular sets then you have to be careful because if you are dividing by 2A then you should say that my 2A is an invertible element. This is something that we will have to begin with. So, if we want to repeat this same method for solving the given quadratic remember the quadratic that was given to us the quadratic is ax square plus bx plus c equal to 0. This is the quadratic equation that we want to solve over Z n then we must have that 2A is an invertible element. If you want to use the same method, the same formula then we should first of all have that 2A is invertible in modulo n which means in the language of the GCDs which is something we have developed in our very first theme that the GCD of 2A comma n has to be 1 then n cannot be even. n will have to be an odd element and further the element a has to be co-prime with n. So, these are the standing assumptions that we have. So, let us assume this what we are assuming is that 2A is an invertible element modulo n. If 2A is invertible we have just now seen that 2 has to be invertible and a has to be invertible. So, what we then get is that 4A is also invertible because 4A can be written as this is 2 into 2A and this already implies that 2 belongs to Un, A belongs to Un. If 2 is there in Un then we get that 4A belongs to Un and then our equation is equivalent to the following equation 4A square x square plus 4ABx plus 4AC equal to 0. This is because this is simply 4A into the equation that we started with. Whenever you have a solution to this equation you have a solution to this equation. Whenever this is 0, whenever this is 0, this has to be 0 because these two are identified by multiplying by an inverse, by an invertible element. So, this is 0 implies that this is 0. On the other hand if this is 0 you will simply multiply by 4A to get that this is 0. So, our equation is indeed equivalent to the equation that we have written down and now we know how to deal with these things. If you remember the proof of your quadratic formula then you know that you have to separate the squares. So, the squares need to be separated and once you separate the squares we get our formula. Let us just check that the squares on this side are 4A square x square plus 4AxB plus B square and on this side you have 4B square minus 4AC. We will cancel the B square on both sides and bring this minus 4AC to this side to get the equation that we have. So, the equation 4A square x square plus 4ABx plus 4AC equal to 0 is equivalent to the equation that we have found here and therefore what we then have to do is to find the square root of this element. Because once you find the square root you would have found values for this you can subtract B to get the value for 2Ax but 2A is invertible that is something that we have already assumed. So, once you have the value for 2Ax you can compute the value of x. This is precisely what we have done in the quadratic formula. We would compute the square root of this number B square minus 4AC subtract B of course the square root comes with 2 signs because there is no unique square root there can be a plus minus and then you divide by 2A. This is the same method that we are going to apply but this whole method hinges on the possibility of finding square roots of given elements in Zn. So, what we need to do is to find square roots of elements in Zn. Is it so easy to find the square roots of elements are all elements there which have square roots or do we have to make some cases about them. So, let us do one example. Let us compute squares in Z8. So, to find square roots of elements we need to find what elements have square roots and this can be done by simply computing the squares. So, if you write the elements of Z8 and then we compute the squares 1 square is 1 2 square is 4 3 square is also 1 because 3 square is 9 modulo 8 it is 1 4 square is 16 which is 0 5 square is 1 25 is 1 6 square is 36 but modulo 8 it is again 4 7 square is 1 and 8 square is 0. So, these are the only squares in Z8. Thus the remaining elements 3 5 6 7 do not have square roots in Z8. So, actually our elements 3, 5 and 7 these are units even for units we do not have square roots. The elements which are non-units 2 and 6 we can understand them not having square roots in some way but we would try to we would like to at least understand which of the units have square roots. So, this is something that we would now like to do we would like to find elements which have square roots in Un and our task is to find squares in Zn or squares in Un. So, we call that set to be Qn. So, Qn denotes our set of quadratic residues modulo n. These are the squares of elements in Un. We would like to compute these Qn see whether there are methods for computing the elements which are squares in Un. Of course, our experience tells us that you should look at UP's first or UP power E first perhaps deal with the case U2 power E separately and then you try to get the hang of the set Qn in general. But let us see whether we can do some simple calculations and try to find the squares in Q7. So, what are the squares in Q7? We need to find U7 first. U7 is simply all elements which are co-prime to 7. So, these are the 3 elements and then Q7 is going to be the product of these elements. So, 1 square is 1, 2 square is 4 and 3 square is 9 which is 2 modulo 7. So, thus we have that these are the only squares. This is square of 1, this is square of 2, this is square of 3. All the 3 other remaining elements are negative of these 3. So, 4 for instance is minus 3, 5 is minus 2 and 6 is minus 1. So, the squares of these 3 elements will coincide with the squares that we have. This is the complete answer for Q7. We have already computed Q8 and let me just tell you that when you were looking at U8, we had all odd elements here but Q8 had only one element. So, indeed the case for n equal to 2 power e needs to be done with separately, dealt with separately and the remaining cases can perhaps be dealt separately hopefully and in a simpler way we will look more for this formally and these computations in the coming lectures. So, see you in those lectures. Thank you.