MA 3362 Lecture 7 - One-to-one and Onto Wednesday, October 22, 2008. Objectives: Formalize definitions of one-to-one and onto One-to-one functions and onto functions At the level of set theory, there are two important types of functions - one-to-one functions and onto functions. Definition. If f : A B is a function, it is said to be a one-to-one function, if the following statement is true. If f(x) = f(y), then x = y. Note that in general, a function must map each domain element to a unique element of the co-domain, but it is OK for two elements of the domain to map to the same element. This does not happen in a one-to-one function. Definition 2. If f : A B is a function, it is said to be an onto function, if the following statement is true. For every b B, there exists an a A such that f(a) = b. An onto function uses every element in the co-domain. In other words, f(a) = B. Cardinality In class, it was pointed out that if f : A B is a one-to-one and onto function, then A and B must be the same size. This makes perfect sense for finite sets, and we can extend this idea to infinite sets. There are a number of different, and useful, ways to measure the size of a set, and this is one of them. Definition 3. If there is a one-to-one and onto function f : A B, then we will say that f is a one-to-one correspondence and that the sets A and B have the same cardinality. Note that for sets to have the same cardinality, there needs to be at least one one-to-one correspondence between them. Of course, not all functions between the two sets need to be one-to-one correspondences, however. The natural numbers N = {, 2, 3, 4,...} are also known as the counting numbers. Any set that has the same cardinality as the natural numbers is said to be countable. For example, consider f : N 2N = {(, 2), (2, 4), (3, 6),...}. In other words, f(n) = 2n. This is a one-toone correspondence between N and the set 2N = { 2, 4, 6,...}. One odd way of defining an infinite set is to say that infinite sets have the same cardinality as a proper subset. The rationals are countable. This should seem odd, since between any two real numbers, there are infinitely many rationals. Note that if you can list all of the rationals in a sequence, then they must be countable, and consider the following. { () Q + =, 2, 2, 3, 2 2, 3, } 4,... The list starts with one positive fraction whose denominator and numerator sum to 2, then two whose sum is 3, then three whose sum is 4, etc. Every positive rational number will find its way into this list eventually (multiple times actually, which is overdoing it). Starting with zero and alternating positive and negative will get all of Q. It turns out that the set of irrationals and the set of reals have a cardinality greater than N. Based on the most sensical assumptions of set theory, it is indeterminable if there are cardinalities between N and R. It is taken for granted, therefore, that R is the smallest uncountable cardinality in mainstream mathematics.
MA 3362 Lecture 7 - One-to-one and Onto 2 This is known as the The Continuum Hypothesis. See the old lecture notes on cardinality stuck onto the end of these notes. Proofs involving one-to-one and onto These definitions are in the form of an if-then statement, so that they can be used easily in a proof. Let s look at a few examples. Example. Consider the function, f : R R defined by the equation f(x) = x 3. This is a one-to-one and onto function. To show that f is one-to-one, we would start off with the if part of the definition. Let f(a) = f(b). This can be rewritten as a 3 = b 3. From basic algebra, we know that all real numbers have unique cube roots, so we know that 3 a 3 = 3 b 3. Furthermore, we know what these cube roots are, a = b. We have satisfied the definition of one-to-one. To show that f is onto, we would start off with: Let b R. As mentioned before, we know that every real number has a unique cube root, so let a = 3 b. Clearly, this is the a, we re looking for, f(a) = b. Example 2. These proofs wouldn t work for the function g : R R defined by g(x) = x 2. Let s try. Trying to show that g is one-to-one, we would start with: Let g(a) = g(b). This means that a 2 = b 2. These are non-negative numbers, so we can take the (positive) square roots of both sides a 2 = b 2. (Don t forget that the symbol designates the positive square root.) So far, so good, but since we generally have both a negative and positive square root, we only know that a 2 = ±a and b 2 = ±b. We cannot conclude that a = b. This proof doesn t work We can actually prove that g is not one-to-one. Consider g( 2) = g(2), which is a true statement, since ( 2) 2 = 4 = 2 2. It does not follow that 2 = 2, however, so g cannot be one-to-one. We can also prove the g is not onto. Consider 4 in the co-domain. Suppose there exists an a R such that g(a) = 4. However, the square of any real number is non-negative, so g(a) 0. This is a contradiction.
MA 3362 Lecture 7 - One-to-one and Onto 3 Homework 7. Look at the graph of g(x) = x 2, and describe what characteristic of the graph tells that g is not one-to-one. 2. What about onto? Which of these functions are one-to-one and/or onto? Let A = { a, b, c }, B = {, 2, 3 }, C = {, 2, 3, 4 }, and D = {, 2 }. 3. f : A B, where f = { (a, 2), (b, 3), (c, ) }. 4. g : A B, where g = { (a, 2), (b, 3), (c, 2) }. 5. h : A C, where h = {(a, 2), (b, 3), (c, ) }. 6. i : A D, where i = { (a, ), (b, 2), (c, ) }.
MA 3362 Lecture 7 - One-to-one and Onto 4 Some old notes on cardinality:. Cardinality I started talking about cardinality last time, and you did some stuff with it in the Homework, so let s continue. I said that two sets have the same cardinality, if there is a one-to-one correspondence between them. Let me give an alternate approach here that we ll have an easier time using. Note that we re talking about sets now, not just groups. Basic Principle. Given two sets A and B, exactly one of the following is true: () A and B are the same size, (2) A is larger than B, or (3) B is larger than A. Basic Principle 2. If there is no onto function f : A B, then B must be larger than A. Basic Principle 3. If there is an onto function f : A B, then B cannot be larger than A. Let s just operate as if these are fundamental truths. From Homework 07, therefore, we know that that there is an onto function f : N Z, so Z is not larger than N. It is easy to show that N is not larger than Z. Therefore, they must be the same size. Basic Principle 4. With regards to infinite sets, twice as big, is not really bigger at all. Twice as big is the same size. Let s throw this in too. Basic Principle 5. If A B, then A can t be larger than B. It could be the same size, however. 2. The Rationals are Countable Any set that is the same size (formally, have the same cardinality) as the natural numbers, N, is said to be countable. Some people also include finite sets with the infinite countable sets. That s fine. Sets that are larger than N are called uncountable. I want to show today that the rationals are countable, and the reals are uncountable. In some sense, the rationals are quite a large set. For example, between any two real numbers, there are infinitely many rational numbers. It seems, therefore, that there must be as many rationals as reals. That s not true. At least from our point of view. We ll see this later. First, let s prove that Q is countable. Actually, I m going to prove that Q + is countable, and from what we ve seen, if that s true, then Q must be countable also. Consider the following infinite array of numbers.
MA 3362 Lecture 7 - One-to-one and Onto 5, 2, 2, 3, 2 2, 3, (2) 4, 2 3, 3 2, 4, 5, 2 4, 3 3, 4 2, 5, 6, 2 5, 3 4, 4 3, 5 2, 6, 7, 2 6, 3 5, 4 4, 5 3, 6 2, 7,. For any fraction, I can add the numerator and denominator to get a positive integer. I ve gathered all the fractions with the same sum in rows. For example, the third row has all the fractions with a sum of 4, and there are only three of these. All of Q + is in this array with many repeats. In particular, all the fractions with a given denominator line up along a diagonal. I can now put these all into a single line of numbers. (3), 2, 2, 3, 2 2, 3, 4, 2 3, 3 2, 4, 5, 2 4, 3 3, 4 2, 5, 6, 2 5, 3 4, 4 3, 5 2, 6, 7, 2 6, 3 5, 4 4, 5 3, 6 2, 7,... Now, you can define a function f : N Q + such that f() =, f(2) = 2, etc., where f(n) is simply the n-th thing in the list. Since all the positive rationals are in the list at least once, f must be onto, and Q + cannot be bigger than N. It follows that Q + and Q must be countable.. Is there any positive rational that is not listed in (3) more than once? 3. The Reals are Uncountable Now, I m going to show you that the reals are uncountable. As you may have gathered, showing a set is countable essentially means stuffing all of it into a sequence. You can t do that with the reals. What I ll do is show that the interval (0, ) is uncountable, and since this is a subset of R, we must conclude that R is uncountable too. Let s suppose that we could put all the real numbers between 0 and into a list, and then we ll show we really couldn t have.
MA 3362 Lecture 7 - One-to-one and Onto 6 OK. So suppose the following is a list containing all the real numbers between 0 and. Since every real number has a decimal expansion, possibly infinite, we ll list them out that way. a = 0.7896309846387349587... (4) a 2 = 0.85640393847564638356... a 3 = 0.57483994353648958598... a 4 = 0.4750253496870958574... a 5 = 0.46573937465943737489... a 6 = 0.33333333333333333333... a 7 = 0.25000000000000000000.... Note that I put 3 and 4 sixth and seventh on the list. Another list might put them somewhere else, but they would have to be somewhere. I claim that there is no way that all the numbers in (0, ) can be in this list. I ll describe how to find one that s missing. We re going to construct the decimal expansion of a number x that does not belong to the list. The first digit of a = 0.789... is, so if I choose x to be x = 0.3..., then definitely x a. The second digit of a 2 = 0.8564... is 5, so if I choose x to be x = 0.32..., then definitely x a 2. In general, I will choose the n-th digit of x to be different from the n-th digit of a n. Carrying this out to infinity, x is not equal to anything in the list. That is, the list is missing x. The one thing we have to be careful about is choosing the digit 9. The decimal 0.9999999 9..., for example, is actually equal to. That s an analysis issue, so I won t talk about it more. It s easy to avoid choosing 9 s, so we re OK. Note that there are always at least eight choices for each digit of x, so there really are a lot of numbers missing. Not surprisingly, any such list will leave out an uncountable number of reals. In any case, (0, ) and R are uncountable. 4. The Continuum Hypothesis When we get within sight of the boundaries of mathematics, I like to point that out. We ve just seen that R is bigger than N. Cantor wondered about something that is almost too obvious to notice. Is there a set that is smaller than R and bigger than N? We can state this question as a conjecture. (Conjecture) The Continuum Hypothesis. The cardinality of R is the smallest uncountable infinity. It is relatively easy to show that there are sets larger than R (the set of all f : R R, for example). It turns out, however, that all the basic facts that we assume about mathematics are consistent with this conjecture being true and also with it being false. In other words, The Continuum Hypothesis is not provable and not disprovable. This is really odd. For example, we could just assume that there is a subset of R that is uncountable, but smaller than R. We would never run into a contradiction. We could also just assume that there isn t such a set. Again, no contradictions. This is why we re careful about proving things. There is a lot of obvious stuff that isn t obvious at all.