 Welcome back. We are talking about congruence relation and we saw that you can do addition, subtraction and multiplication while remaining while keeping the congruence relation intact. Then we asked whether you can divide by things, you can divide by numbers and it was not possible to do it. We saw the example that 4 into 2 is equal to 10 into 2 if you are looking at modulo 12. It is congruent, sometimes I may just say equal. So, 4 into 2 which is 8 is congruent to 10 into 2 which is 20 modulo 12 but 4 and 10 are not congruent to each other. So, the lesson that we learn is that it is not always possible to divide by a number modulo n. And I also told you in the last lecture that now there are two ways to get around this problem. You can either restrict these set of elements by which you can divide. We will put one more condition and then we will have that if your a satisfies some small condition then you can always divide by a modulo n or we will reconcile with the fact that sometimes you may divide a number by another number modulo n and you may get multiple answers which happens when you divide 8 by 2 and you want to be in the arithmetic of the clock. If you want to be in the congruence relation modulo 12 then your answer can be 4 or it can be 10 and you will then need some extra information to determine which answer you should consider. So, I will first go to the restriction of the set by which we can divide. So, here is one small condition that we have whenever you have a relatively prime to n whenever you have a coprime to n whenever the GCD of a and a is 1 then we can divide by a. So, now let us put this statement in a precise form. So, the precise form is this if you have a b congruent to ac modulo n and the number a which appears on both sides of the congruence sign if that a is coprime to n if the GCD of a and n is 1 then b is congruent to c modulo n you can cancel a from both sides this is what it means if a n is 1 then a can be cancelled on both these sides this is what it means which is quite good of course then the next question will come as to how many numbers are there which are coprime to n can you give some formula for the numbers which are coprime to n and so on we will deal with these questions later but let us now try to prove this statement. So, the statement is if you have a b congruent to ac modulo n and a is coprime to n then b is congruent to c mod n ideally I should give you a minute to think about this prove but this is slightly very slightly not too much but very slightly on that level of the difficulty side compared to the other 2 problems which I had given you in the last lecture for thinking for about a minute you can of course pause this video and think about this problem but otherwise let us see the proof. So, let us write down all the things which are given to us. So, we are given that a b is congruent to ac mod n this is something which is given to us you may be tempted to write it as a b minus ac is n alpha for some alpha but let us not do that for the moment we are also given that a is coprime to n. Let us write it down that 1 can be written as a combination of linear combination of a and n over integers. We have a b congruent to ac mod n and we also have that 1 is a alpha plus n beta for some alpha beta in integers this is because the GCD of a and n is 1. Now, what we do is the following thing we start with b and we multiply by b to 1 since 1 is equal to this we have that b is equal to b a alpha plus b n beta. So, expanding this out we get a b alpha plus b n beta. Now, we also have c and we multiply by c to 1 to give us the same thing. So, we get these two equations we got b is equal to a b alpha plus b n beta and we got c equal to so you know I should just write this also c equal to ac alpha plus n c beta. Now, what we know is that a b is congruent to ac mod n. So, when you look at mod n these two are congruent because a b alpha is congruent to ac alpha modulo n the only thing would be to worry about are these things. But here observe that n divides both these terms we write b is congruent to a b alpha plus n b beta mod n this is because they were simply equal we had that b is equal to a b alpha plus b n beta. So, b is going to be congruent to a b alpha plus n b beta or b n beta and observe that this already gives us that this is congruent to a b alpha mod n this is because n b beta is 0 modulo n this further gives us congruent to ac alpha mod n because a b and ac are congruent to each other modulo n you can multiply by alpha. So, we get that a b alpha is congruent to ac alpha mod n which is further congruent to ac alpha plus n c beta modulo n and therefore this is congruent to c modulo n. So, what we have obtained is indeed if you have thus if a b is congruent to ac mod n a comma n is 1 then b is congruent to c modulo n. So, quite a nice thing because in integers we were not always able to divide by something but here you can divide by elements which are coprime to n. So, if you wanted to divide 8 by 2 modulo 12 that would not be possible or you may have to accept that you may get multiple solutions but if you were to divide 8 by 5 that would still be possible. So, think about divided by 5 modulo for the moment we go to our next small construction which is that whenever we have fixed this integer n modulo which we are looking at all the congruence relations now if I fix any other a I can look at all other elements which are congruent to this given a modulo n. So, I will denote it by this symbol to construct this set b. So, this is again coming from n you are looking at all other natural numbers which are congruent to a mod n. This is actually a very big set that we have. This is the set of all elements of n which are congruent to a modulo n and in fact a very simple observation will tell you that this is clearly an infinite set because your set a will consist of elements which are coming from the left hand side of a possibly and then you have a a plus n a plus 2 n and so on. So, you clearly have an infinite set. So, the class of a is an infinite set what we have done is that we have collected an infinite set and we are going to be treating this infinite set as same as the element a this is what we are going to do what does it mean further. So, we had seen earlier that our triple horizontal lines the congruence relation is an equivalence relation. Remember what it means let us recall it together equivalence relation has three properties it should be reflexive which means that a is congruent to a modulo n for every a. Second property is the symmetry which says that a congruent to b mod n should imply that b is congruent to a mod n. So, reflexivity is symmetry and the third property is the transitivity which says that when a is congruent to b mod n and b is congruent to c mod n then a has to be congruent to c mod n. So, this congruence relation is an equivalence relation we have proved this fact two lectures back. Therefore, we have that if we take the classes a and b then you will either get that a is equal to b the class of a is equal to the class of b the sets that you get the sets of natural numbers which are congruent to a mod n is the same set of natural numbers which are congruent to b mod n you will either have this possibility or you have that the intersection of these two classes is empty. We are talking about various such subsets of natural numbers or you may also think about these subsets of integers if you were to think about the congruence relation being put on integers instead of natural numbers you may consider integers all over the whole integers positive as well as negative and throw in the 0 also there. So, we have looked at some certain infinite subsets of integers or natural numbers whichever you are taking. Then we say that our method of construction gives us the sets which are either equal or that they have no element in common. So, whenever you have two such classes if there is a single element in common they should be the same this is what we are saying. So, to prove this statement that either the class of a is equal to class of b or the intersection of class a and class b is empty. If we want to prove this statement what we should prove is the following. If you take an element in the intersection of the two then you should prove that the class a is equal to class b. We are saying that there are only two possibilities that can occur about the classes possibility one classes are same possibility two no element in common. So, if there is an element in common which is to say that the possibility two is not occurring then we should show that the only possibility that occurs is possibility one that will prove the statement. So, let us go about proving it. If you have any element in common if you have a c which is in a intersection b then we use transitivity. We will also use symmetry and other properties but mainly it is the transitivity which is used which will tell you that a is congruent to b mod n. Let us see how this is done. If c belongs to the intersection of these two then a is congruent to c mod n and I will write it as c congruent to b mod n. Okay. We actually have that c is congruent to b mod n and a is congruent to c mod n and then the transitivity will tell you that a is congruent to b mod n. This is what we wanted to have. So, whenever there is a common element in the classes of a and b then we get that the classes which are given by a and b have the property that a is congruent to b mod n. Now with this we want to prove that the classes themselves are the same. So, then we again go to transitivity to see that the class a is equal to class b. How does this once again happen? So, this thing and using the transitivity. So, if you have an element say d in class a then d congruent to a and this fact gives d congruent to b modulo n of course. And so we have that d belongs to the class of b. We started with the class of a and we proved that any such element goes and sits in class b. So, we have proved then that class a is contained in class b. But there is nothing important about a b if I had taken the order in the reverse way I would be able to prove in the same way that class b is contained in class a. And that will tell me that the both these classes are one and the same. So, this is a very striking fact. We have used the congruence relation we divided the whole set of integers or the natural numbers into subsets which are themselves infinite. In such a way that these subsets are disjoint or they are the same. So, this is what is called partitioning a set into subsets. So, we have therefore been able to partition the natural numbers into these classes. Of course, you will also use the reflexivity to show that every element of n is contained in one of these classes. But if you take the element to be a then it is clearly contained in the class of a. So, every element of n is contained in one of these classes. So, n is contained in the union of these classes. And since each class is a subset of n, you have the other way equality also other way containment also. So, n is union of the classes, but the classes are either same or disjoint. So, it is a disjoint union, which is what we call as partition. So, if you were to think about this in some set theoretic diagrams, it will give you that if you have this as your set n, then we have divided this set n into several of these partitions with respect to the congruence relation modulo n. Further, we are now saying that you do not have to look at infinitely many classes. Each class is equal to a class of one of these finitely many elements. So, earlier we saw that n is union of these classes. Here we had that n is disjoint union of the classes. But here we are saying that n is class 0 disjoint union class 1, disjoint union class 2, disjoint union dot, dot, dot, disjoint union class n minus 1. And this is quite simple because what we do is that given any a, we will keep dividing by n. And then there has to be a remainder, this is what our division algorithm tells us. Division algorithm tells us that when you have any a and you want to divide by n, then you have n equal to nq plus r, a equal to nq plus r, where q was a natural number. r is also a natural number or it can be 0, but r has the property that it cannot be equal to a, it will be n. It will be less than n. So, r can go from 0 to n minus 1. So, that is what we have. So, given a, use the division algorithm to get a equal to nq plus r with 0 less than r less than or equal to n minus 1, then a is congruent to r mod n and r is in this set 0 to n minus 1. This is the proof that every a in n is congruent to one of these elements 0, 1, 2 up to n minus 1. So, this is one good thing because we had an infinite set n. We divided it into union of some subsets each of which was infinite. And now it turns out that there are only finitely many such partitions that you have. So, we have divided n into only small n many partitions. So, n is a union of these classes and in fact one can go further that it is the, it is a disjoint union. It is a disjoint union of the classes 0, 1, 2 all the way up to n minus 1. So, these are what are called the residue classes modulo n. And when we talk about arithmetic, we have that the addition, subtraction and multiplication preserve congruences modulo n. So, the congruence relation modulo n is preserved by these operations. Therefore, the set of residue classes modulo n admits addition, subtraction and multiplication. So, the set the finite set that we had the class of 0, class of 1, class of 2, class of up to n minus 1 that set admits all these operations. And what do I mean by this? What one means is that you may take one class corresponding to a, take another take some class which might be the same class or maybe a different class corresponding to b. We can define addition of these two and this addition is going to be defined to be the class of a plus b. Similarly, if you take the class of a and take class of b, the product of these two is defined to be the class of the product a b. These statements need a proof to say that these are well defined operations should be that needs to be proved, but I will leave it to you or you may go back and check some of the basic books on this theory that these operations are well defined. Let me just tell you now what it means to say that these are well defined. You see here we are adding two classes the class of a and class of b and we say that this addition is equal to the class of a plus b. When you write it as class of a plus b you are really using the elements a and b. Now, it may happen that the class of a is also equal to class of c somebody else may see it as a class of c and somebody else may see the class of b as class of d. So, when you are adding two classes you have the addition of class a class b which is the same as class c class d you are adding the class of c and class of d. But if you are giving the definition of the addition as look at the element which is giving you the class take the sum of these two elements and take the corresponding class. Then there are several ways I can either take a plus b take its class I can take c plus b take that class I can take a plus d take that class or c plus d take the corresponding class. So, we will need to prove that all these four classes are actually the same. So, the confusion here or the thing which needs to be proved is that if class a is class c class b is class b then the class a plus b is the same as the class c plus b which is same as the class c plus b which is also same as the class b plus b. So, here we are replacing a by c here we are replacing b by d and here we are again replacing. So, this should be a plus d. So, the four ways by which you can add should give you the same set that is what it means similarly about the product. So, similarly about the product. But these are the things which can be checked quite easily and these are things which we have actually checked. So, I will not go over these but I will make one final remark before we stop this lecture which is that the arithmetic modulo n this is what we are going to do. The arithmetic modulo n is an arithmetic with these n numbers. So, we are going to add 0, 1, 2, 3 all the way up to n minus 1 with each other or we will subtract one from another or we will multiply these but the addition, subtraction and multiplication is to be taken with respect to the congruence relation modulo n. That is the only thing that we will be doing in this theme of our course which is the congruence and we will explore this further. So, I hope to see you again in the next lecture. Thank you.