 sets A and B. What is the function from A to B? So, the notation used is a function A arrow B, F colon A arrow B. So, a function is a rule that associates every element of A with a unique element of B. So, this is a rule that associates every element of A with a unique element. So, there are two key words here every and unique. So, when you take an element of A for every element of A there is a unique element of B associated with it. So, if you take an element X in A then there is a unique element of B F of X that is associated with it. So, they cannot be more than one right this unique element also this every element of A right which means that you cannot leave out anything everything in A must have a corresponding element here. So, that is the definition of a function. So, in this notation. So, the terminology used is that this point here F of X is the image of this element X under this function. And you say that X is the pre image of this element under this function these are terminologies that are commonly used. Also the set A is called what domain. So, the set A is called the domain and set B is called the co-domain. So, there is some difference in terminology here some people call it the range. There is some inconsistencies in terminology, but we will call the set B the co-domain and we will reserve the term range for a related but slightly different concept. So, remember I told you that for a rule associates every element of A with a unique element of B, but you could have elements in B which are not covered which may not be images of any particular element here. See you cannot afford to miss out anything here right because even every element of A has to be mapped, but some elements here may not be may not be images of anything here right. So, it is possible for example that only some of these guys are mapped and some of these guys may not be mapped right. So, the word range is used to describe only those values sorry not values the elements of B which are actually taken as functional which the function actually takes as values. So, we will define the range R of the function as the set. So, the set of all y in B such that there exists x in A for which f of x equal to y. So, we do not call set B the range we call set B the co-domain and range is the subset of the co-domain consisting of those elements which are actually taken by the function right. So, the co-domain may have certain elements which are not in the range and those elements are never taken by the function right. So, essentially they are left out by the function. So, you cannot leave out anything here, but you can leave out some elements here is this clear that is just a matter of terminology. Some people say in the context where it does not really matter some people call this the range right. So, the whole thing the co-domain is call the range, but I think in this situation I think it is useful to distinguish the co-domain and the range. So, that is any questions on this. So, that is a function they may to be and remember that you cannot have. So, you can have multiple elements mapping to the same thing that is allowed, but you cannot have one element mapping to multiple things that is not allowed alright. Now, there are few more specific kinds of functions which will also be of interest to us. So, remember I told you they could be multiple elements you are mapping to the same element here for a function. So, a function for which that does not happen which. So, a function for which for every point in the range there is a unique pre image is called a 1 to 1 function or a injective function right. So, we will say the injective function injective function I think you know all this. So, every element in r has a unique pre image function a and similarly a surjective function a surjective function is or a non to function is a function for which the domain the co-domain and the range are the same. In other words a surjective function does not leave out anything in here right. So, no function can leave out anything here, but you can leave out elements here. So, a function that does not leave out elements in the co-domain is called a surjective function. So, a surjective function of r equals b that is all there is to it right that is a surjective function and function which is both injective and surjective is called a bijective function. So, if it is both bijective function is a function which is both which is both surjective and injective. So, for a bijective function you will have. So, every the co-domain coincides with the range and every element in the range has a unique pre image. And you can argue very easily that a bijective function the inverse map is also a valid function right. Because you do not leave out for the inverse map you do not leave out anything here because it is surjective right and you do not have the problem of multiple values right going back. So, it turns out that the inverse mapping is also a function sometimes bijective functions are called invertible functions. Now, the reason I am beginning with an introduction to these is because it plays a very important role in the topic of today's study which is cardinality. So, in plain English cardinality of a set simply refers to the size of the set the number of elements in the set. So, if you are given a finite set it is simply enumerates the number of elements in the set right if this the classroom is the set the cardinality will be the number of students in it. Now, so this topic of cardinality we are interested in comparing sizes of different sets. So, if you are given two finite sets let us say this class and some other class and if you are interested in determining if these two sets are of the same size or if one is bigger than the other what would you do it simply say this class is 35 students another class is 30 students. So, this is bigger or they are equal or whatever right you can simply count it out and say one class is bigger than the other or they are equal in size. Now, the problem here so this is fine as long as the sets are finite alright. So, if you go on to infinite sets this kind this approach breaks down. So, if I give you two infinite sets with sets with infinitely many elements in them they are both infinite right how do you say one is bigger than the other right. So, this approach breaks down right. So, if I give you for example the natural numbers which is obviously infinite set and let us say rational numbers which is also an infinite set then you cannot easily say that you cannot mean they are both infinite how do you say one is they are same size or one is bigger than the other I do cannot right with this particular approach. So, to find a way out of this a mathematician by name Cantor decided that using the concept of bijective functions you can actually compare the sizes of infinite sets also. So, let me explain very simply. So, if you were to find let us say this is this class is another class with same number of students right then I can find a bijection between the two classes right. So, with every person here I can associate unique element there and vice versa even right. So, even for finite sets you are able to understand that two sets are equal in cardinality if there is a bijection between the two sets right that is it is like a one to one and on to map correct. Now, this concept extends to infinite sets also. So, what Cantor defined is two sets not necessarily finite finite or infinite two sets a and b have the same cardinality if you can find a bijection between the sets a and b. So, that is a definition. So, let us get into this cardinality definition sets a and b are set to be equicardinal equicardinal means same cardinality equicardinal notation if there exists a bijection a to b if some bijection exists between a and b they are set to be equicardinal this is the definition of the term equicardinal is it clear this is the definition and related definitions I will just put down two related definitions. So, b has a cardinality set of a there exists an injective function from a to b. So, if you can put the elements of a to a and b in a one to one and on to map then they are set to be equicardinal. So, if it so happens that you can find an injective function from a to b. So, remember what does an injective function. So, you do not have multiple things mapping to the same value in the range. So, in that case this means that the set b has at least as many elements as a more or equal at least as many. So, this is a similar one this is for injective function here the notation is cardinality of b bigger than or equal to. So, if I put two vertical lines it is called cardinality remember I did not tell you what the cardinality itself is when I am only comparing cardinality. I am not saying that the cardinality is this as in the case of finite sets. But, I am just saying that one is bigger than the other in this sense cardinality greater than or equal to yes. So, greater than or equal to correct and finally, so finally I want to define what the case where b has a cardinality strictly bigger than a. So, when you say one element to one set has strictly more elements than another you can find an injective function, but there is no objective function. So, you can find an injective function. So, this is true, but they are not equicardinal. So, you say so you say so in here the notation is. So, you can write this in words in just like above. So, you say cardinality b is strictly bigger than the cardinality a of a if there exists an injection or injective function injective function f from a to b, but a and b not equicardinal. So, the exist of injective function from a to b, but there is no objective function which means they are not equicardinal. So, this is how you compare sets for cardinality even infinite sets. This gives you a frame work to compare the sizes of even infinite sets with infinitely many elements. So, now you will see that just as I mentioned now sets that have infinite elements can also be of different sizes in this sense. So, in some sense all not all infinities are born equal there are bigger infinities and smaller infinities in terms of cardinality. It sounds a bit strange to begin with, but that is actually true as you will see according to these definitions. So, in fact we can see there are examples of infinite sets where one infinity is strictly bigger than the other infinity. For example, we will see that both natural numbers and real numbers are both infinite sets, but the infinity of the real numbers is actually a bigger infinity than the infinity of natural numbers. And there are sets which are even bigger infinities than real numbers. So, this is little hard to digest to begin with, but we will understand it very soon. Once you have these definitions clear it is actually fairly easy to understand these concepts. So, now I want to define countability the concept of countability. They still need not be equal right. No, that is by definition they are considered equicardinal. So, if you find a bijection between two sets the sets are defined to be equicardinal. That is the definition. Then I am not saying that the sets are equal. Obviously, the a and b need not be the same set. See what I mean. I am just saying that the cardinalities are equal. So, by definition the sets are equicardinal if there exist a bijection between them. Even if you find one bijection it is enough. So, definition of countability a set E is set to be countably infinite. If it is equicardinal with m the set of natural numbers. So, as I just said there are bigger infinities and smaller infinities right. So, the infinite. So, if your set is as big as the set of natural numbers meaning that there exists a bijection between the set you are considering E and the natural numbers then the set E is set to be countably infinite. The definition clear. So, we just mean. So, if you want to establish that some set E given to you is countable. What will you do? Go and find a bijection between E and m right. If you succeed it is even if you find one bijection it is definitely countably infinite right. And a relative related definition a set is countable if it is either finite or countably infinite. So, if a set is either finite we all understand finite sets. Either finite set or a countably infinite set we just pick of it as a countable set. So, there is a bijection from E to n. So, if the elements of E can be written as E 1 E 2 dot dot dot correct. So, the moment you give me a natural number n I can identify the element E n uniquely and you give me an element I can identify the index n and this is true for real even numbers right. So, for example, you can show that. So, it is clear. So, if the moment you can put this in a list right it is the countable countably infinite set. So, I do not see I want to make this very clear this has. So, the fact that I think the confusion is because the even numbers are a subset of the natural numbers. But, still they are equicardinal because there is a bijection you see the bijection. So, I mean if you take the even numbers which is 2 4 6 8 and so on right. So, this is like 2 n right where n is running over the natural numbers and clearly that is a bijection right. So, even numbers. So, this is even numbers are equicardinal with n and therefore, they are a countably infinite correct this is clear never mind that this is contained in n. But, they are equal in size because there is a bijection similarly odd numbers are also in bijection with natural numbers. What you can also show is all prime numbers are countably infinite because you can identify the ith prime number. If I tell you what the 27th prime number is you go and find out right. So, in prime numbers are a countably infinite set correct. So, they can be put into a list which is means that with natural numbers right if you can what is the bijection after all. So, you have the natural numbers 1 2 3 blah blah blah and you write the set in a list and all elements get covered there is a unique association between every natural number and that element and vice versa right correct. So, in that case it is a countably infinite set ok. So, if you take the set of all integers for example, let us say you take this z right z which is 0 plus 1 minus 1 plus 2 minus 2 plus 3 minus 3 and so on right this is also countable right. So, countably infinite set you may now argue that well this z seems to have twice as many elements as natural numbers right because for every natural number there is a minus right. So, you may it seems tempting to say that this has twice as many elements as the natural numbers no not true it only has as many elements as the natural numbers because there is a bijection right you convince that this is a bijection every integer is contained here you come up with an integer that is contained here and it is present in that unique spot unique index. So, for every integer I can assign the natural number index right. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. . . . simply infinite set is defined like this. It is equivalent for example, you can equivalently define it with z also. There is nothing wrong in doing that, but this is the standard definition. You can say equate you can say equicordinate with z also there is nothing wrong with that, but you will stick to n that is the standard notation. Any other questions? So, far now what is this stuff will be very apparent to you. Now, what is not apparent at all and lot of people find very surprising is that the set of rationals is also a countable infinity. The set of all rational numbers q the fractions p over q is not 0 the set of all rational numbers is also countable. So, that seems very surprising in the beginning, because if I give you any two integers let us say 21 and 22. There seems to be so many rational just between these two integers that it seems to be a hopelessly large number this there is so many more rational it looks like. See after all all integers are rationals all natural numbers are in fact, rationals and there are so many more rationals an infinite number of rationals between any two integers. So, it seems like that the set of its rational numbers must be a much larger infinity than this n, but no it is not there are only as many rational numbers as there are natural numbers or integers which is quite surprising. Now, how do you prove this how do you prove anything is countable find a bijection. So, if you find a bijection from somebody manage to find a bijection. So, we are asserting that q is countable q is countably infinite. So, another example. So, let us just consider rationals in rationals between 0 and 1 I will prove that rationals are countable a little bit later. So, these are rationals in countable set what you have to do. So, always the same thing there is no different every time you have to prove that something is countable you have to find a you have to either say it is a finite set in which case there is no problem at all or you have to prove that there is a bijection with natural numbers you have to put the set in a list and the set should be finished covered right that is all you have to do. So, how do you prove that rationals in 0 1 is a countable set find a bijection right. So, here is a bijection you write 1, 1 by 2 well may be you can put a 0 here if you want if let us be done with 0 1, 1 by 2 then you put 1 by 3 2 by 3. So, I am increasing the denominators then I do 1 by 4 now I do not do 2 by 4 because it is already there 2 by 4 is half right then I put 3 by 4 4 by 4 is already there 1 right. And then 1 by 5, 2 by 5, 3 by 5, 4 by 5, and so on and so forth right 5 by 5 is already there then I have 1 by 6, 2 by 6 is already there 3 by 6 is already there 4 by 6 is already there then 5 by 6 and so on. I am only so now all you have to show that this listing. So, I am listing the set out right you see what I am doing right I am increasing the denominator and I am changing the numerator 1 by 1 and if it turns out that the element is already there I leave it out it is a very simple construction. Now, you give me any rational number between 0 and 1 you choose 1 I will find it in this set right whatever rational number you give me I can find it in this set right. So, every rational number in 0 1 the interval 0 1 has a natural number index I can speak of the ith rational number is this clear. So, there are only as many rational numbers as in at least rational numbers in 0 1 as there are integers correct. So, although there seems to be so many in 0 1 it actually is in bijection with natural numbers is that clear. So, I have you understood how I created this list. So, every time increase I increase the denominator and I go 1 by k 2 by k and so on and if that number is already there leave it out my claim is that this list that I have just completed this is an infinite list of course, but this list has every rational number in 0 1 how do you prove that you give me a rational number p by q right you reduce to it is simplest form no common denominator etcetera p by q you go to the point where the q is in the denominator and check those guys will be there right because it will be there or it would have been covered earlier right if p by q is not in the simplest form it would have been covered earlier that is it. So, every rational number is 0 1 is in this list. So, it is in bijection with n correct which means q intersection 0 1 the rational since 0 1 is equicardial with n therefore, countable countable infinite where n is you have not tested n yet, but every element between 0 and 1 is there. So, this no what I really mean by writing something in a list is that this is 1 this is 2 this is 3 this is bijection with see once you write the set down I can also write the set of natural numbers 1 2 3 dot dot dot this is the bijection. So, with natural number 1 you associate 0 number 2 you associate 1 with 23 associate the 23 element you know that is it this is the function f of 1 is. So, the function from n 2 this set f of 1 is 0 f of 2 is 1 f of 3 is half f of 4 is 1 by 3 and so on that is the bijection see after all what is the bijection with n it is simply a listing of the set right n is 1 2 3 dot dot dot it think of it as writing the names of students right 1 so and so 2 so and so you are essentially putting the set in a list that is what a bijection with n really means after all right. So, for every unique natural every natural number there is a unique rational number and given any rational number I can find the index uniquely right. So, it is the bijection is that clear. So, this is the bijection it is not like I am just writing out the set that is not true that is what that is not that is what we are going to see. So, rational numbers are special in the sense that although it looks like a very even if they are distributed all over the line right in any tiny interval of the real numbers you can find so many rational numbers, but there are only as many of them as there are natural numbers they are countable. So, very manageable set in that sense there are only countably many rational numbers right it is not true. So, what is important and it was realized first by canter or at least proven first by canter is that there are infinite sets which are truly bigger than natural numbers or integers or rational numbers. There are bigger infinities than simply the infinity of rational numbers and those sets are called uncountable sets uncountably infinite or just uncountable yes uncountably infinite is a you know it is a tautology you do not have to say it right uncountable sets are infinities which are bigger than natural numbers. Before we get there I want to state a very important theorem without proof let i be a countable index set and let a i i belong to i i i i i i i i i i i i i i i i i i i i be a collection of countable sets. So, this theorem I will not prove it is a very important theorem you can find the proof in Rudin or any analysis book. So, I am taking some index set i is some index set and this a i index by this i this set is this is all countable sets. Then the theorem says then union i belongs to i a i is a countable set. So, in other words so this is more glibly stated as a countable union a countable union of countable sets is countable right this is a more colloquial way of stating the theorem. So, what am I saying so I am taking a bunch of countable sets and I am uniting all these countable sets and the index set that I am uniting over is also a countable set. For example, this index set could be natural numbers or integers or even numbers or rational numbers even and for each such index i I have a countable set a i each of this a is a countable. So, even if one of this a is not countable this is not true. So, if each of this a is is countable and i is a countable index set then the union over i a i is also a countable set. So, which is countable union of countable sets is countable that is what this is. This I will not prove this requires a proof I will not prove it in class you do not have to you do not have to we do not have spend time on this in class, but you have to know this result. So, using this theorem we can prove that the set of all rational numbers is countable. Why this can be a see this I have proven that the rationales in 0 1 is countable. So, countable set similarly rational numbers in any i comma i plus 1 is a countable set and then I can write q as. So, now, I can write. So, corollary what is the corollary something that follows from the theorem q is countable. Proof you can write q as union i belong to z union i belongs to z q intersection i comma i plus 1. So, just like I argued for 0 1 you can argue that any i i plus 1 the rationales in there are countable. In fact, you just add i to each of these guys you have found a bijection. So, this is a countable set now I am unioning over all integers not necessarily positive integers, but integers which is also a countable set. But this union is all of rational numbers. So, countable union of countable sets is countable. So, q is a countable set. So, truly there are only as many rationales as there are natural numbers. So, that answers I think your question. So, if you union two countable sets you always get countable set as long as the number of sets you are unioning is also countable. Just clear everybody any questions at this point. So, I think I just ran out of time. So, we have to continue next class.