Mathematical Proof/Functions

From testwiki
Jump to navigation Jump to search

Template:Nav

Introduction

In the previous chapter, we have discussed the concept of Template:Colored em. There are not much restrictions on the relations. For instance, for a relation from set A to set B, every element of A can be related to no elements of B, exactly one element of B, or multiple elements of B. In this chapter, we will focus on a particular type of relations from set A to set B where Template:Colored em element in A is related to Template:Colored em (or a Template:Colored em) element of B.

You should have encountered the concept of Template:Colored em before, e.g. a function defined by f(x)=x2 gives you a value of f(x) for every given value of x. The functions you have encountered are likely to be in the above form, i.e. in the form of an equation. Also, the value of x and f(x) are likely to be real numbers.

But we can generalize such ideas to more general situations where x and f(x) are not necessarily real numbers (e.g., they can be elements of certain sets), and the functions need not be expressed by a formula like above. As a result, the concept and definition of functions discussed here may seem foreign to you, and look quite different from what you have previously learnt about functions.

Definitions

Template:Colored definition Template:Colored remark Template:Colored exercise Template:Colored example Template:Colored example Template:Colored example Template:Colored exercise We should be aware that the codomain of a function is not necessarily the same as the range of a function. The following is the definition of the Template:Colored em of a function (same as the definition for a relation). Template:Colored definition Template:Colored remark Template:Colored example Template:Colored exercise Template:Colored example Template:Colored remark Template:Colored example Template:Colored exercise Since the domain and codomain, in addition to the "way" of the mapping, all affect the "behaviour" and properties of a function, it is natural to incorporate all these features into the definition of Template:Colored em of functions: Template:Colored definition Template:Colored exercise Template:Colored example Template:Colored exercise

Injective, surjective and bijective functions

In this section, we will discuss some important properties that a function may possess, namely injectivity, surjectivity, and bijectivity. Template:Colored definition Template:Colored remark Template:Colored exercise Template:Colored example Template:Colored example Template:Colored example Template:Colored exercise Template:Colored definition Template:Colored remark Template:Colored exercise Template:Colored example Template:Colored example Template:Colored definition Template:Colored remark Template:Colored exercise Template:Colored example Template:Colored example Template:Colored example Template:Colored exercise Template:Colored exercise Template:Colored exercise

Composition of functions

Let A,B and C be nonempty sets, and let f:AB and g:BC be two functions. In this section, we are going to discuss a way to create a new function from "combining" the two functions f and g, called their Template:Colored em: Template:Colored definition Template:Colored remark Template:Colored example Template:Colored remark Template:Colored example Template:Colored remark Although the composition of functions is not commutative, it is Template:Colored em. Template:Colored theorem

Proof. First, since gf is a function from A to C, it follows that h(gf) is a function from A to D. Similarly, since hg is a function from BD, it follows that (hg)f is function from A to D.

It now remains to prove that both functions map every element aA into the same image in D. For every aA, (h(gf))(a)=h((gf)(a))=h(g(f(a))). (a bracket for gf means "grouping" g and f first, that is, we regard gf as a function first. To understand this more easily, one may write f1 instead of "gf" above.)

Also, ((hg)(f(a)))=h(g(f(a))).

Template:Colored example Now, let us study some results that are related to the composition, injectivity, surjectivity, and bijectivity. Template:Colored proposition

Proof. For (a), assume that f and g are injective. Then, for every x,yA gf(x)=gf(y)g(f(x))=g(f(y))f(x)=f(y)(g is injective)x=y.(f is injective) For (b), assume that f and g are injective. Then, for every cC, since g is surjective, there exists bB such that g(b)=c. For Template:Colored em bB, there must also exist aA such that f(a)=b since f is surjective. It follows that for every cC, there exists aA such that c=g(b)=g(f(a))=(gf)(a).

Template:Colored corollary

Proof. Assume that f and g are bijective, i.e., are injective Template:Colored em surjective. It follows by the above proposition that gf is injective Template:Colored em surjective, i.e., is bijective.

After knowing such results, it is natural to question that whether the Template:Colored em of the above proposition holds. Indeed, the converse does not hold, and we have the following results: Template:Colored proposition

Proof. For (a), assume that gf is injective. Then, for every x,yA, f(x)=f(y)g(f(x))=g(f(y))(definition of function)x=y.(gf is injective) For (b), assume that gf is surjective. Then, for every cC, there exists aA such that g(f(a))=c. So, we now can show that g is surjective: for every cC, we can choose f(a)B, and then we have g(f(a))=c.

Template:Colored remark To summarize the results, we have the following table:

Summary
gf (given) f g
injective injective injective/not injective
surjective surjective surjective/not surjective
bijective injective surjective

Template:Colored exercise Template:Colored example Template:Colored exercise

Inverse functions

Recall that a function f:AB is a special relation from set A to set B satisfying some requirements. Also, recall that given a relation from A to B, the Template:Colored em R1 is defined to be R1={(b,a):(a,b)R}B×A. We know that the inverse relation is always a relation itself. However, is the inverse relation of a Template:Colored em f:AB always a Template:Colored em from B to A itself? The answer is, indeed, no. Consider the following example. Template:Colored example Of course, when the inverse relation of a function f:AB turns out to be also a function from B to A, it is natural to define it as the Template:Colored em of f: Template:Colored definition Template:Colored remark We are then interested in knowing under what conditions the inverse relation f1 is a function from B to A, so that the Template:Colored em.

First, in order for f1 to be a function from B to A, we must have domf1=B. So, we need to ensure that Template:Colored em element of B is related to some elements in A, so that when we "reverse" the ordered pairs in f to get f1, there is at least one image for every bB. This means ranf=B, i.e., f needs to be surjective.

Of course, we also need to ensure that there is a Template:Colored em image for every bB. Under the condition that f is surjective, there is at least one image for every bB already. So, it remains to ensure that there is Template:Colored em one image for every bB.

To ensure this, we need the function f to be injective, since, if f is injective, then every element of B has at most one pre-image. So, when we "reverse" the ordered pairs in f to get f1, every element of B has at most one Template:Colored em.

From this discussion, we know that if f1 is a function from B to A, then f has to be injective and surjective, i.e. bijective. This shows that the bijectivity of f is the necessary condition for the existence of the inverse function. Is it also the sufficient condition? It turns out that the bijectivity of f is actually the Template:Colored em condition for the existence of the inverse function: Template:Colored theorem

Proof.

"" direction: Assume that f1 is a function from B to A. Then, we will proceed to prove that f is injective and surjective:

Injective: For every x,yA, first assume z=f(x)=f(y)B. Then, (x,z),(y,z)f. By definition of inverse relation, we have (z,x),(z,y)f1. Since f1 is a function from B to A, we have by definition x=y.

Surjective: For every bB, since f1 is a function from B to A, there exists a unique aA such that (b,a)f1. This means by definition of inverse relation that (a,b)f, i.e., f(a)=b .

"" direction: Assume that f is bijective. Then, we will proceed to prove that f1 is a function from B to A. That is, we need to ensure that for every element bB, there exists a unique aA such that (b,a)f1.

Existence: For every bB, since f is surjective, there exists aA such that f(a)=b, i.e. (a,b)f. Hence, (b,a)f1. This shows that for every bB, there exists aA such that (b,a)f1.

Uniqueness: Assume (b,a)f1, in addition to (b,a)f1. So, we have (a,b),(a,b)f, i.e., f(a)=f(a)=b. Since f is injective, we have a=a.

Hence, from this theorem, we know that it is only meaningful to talk about inverse function of f when f is bijective. If f is not bijective, then its inverse function does not exist at all, and it is meaningless to talk about it. The following theorem further suggests that the inverse function must also be bijective. Template:Colored theorem

Proof. Assume that f:AB is bijective. Then, f1 is a function from B to A. Then, we will show that it is injective and surjective.

Injective: For every b,bB, first assume a=f1(b)=f1(b). Then, (b,a),(b,a)f1. Thus, (a,b),(a,b)f. It follows that b=b since f is a function.

Surjective: For every aA, since f is a function, there exists a unique bB such that f(a)=b, i.e., (a,b)f, and hence (b,a)f1, i.e., f1(b).

Template:Colored remark Another common definition of inverse function is that the inverse function of f, denoted by f1, is a function satisfying f1f=idA and ff1=idB. It turns out that these two definitions of inverse function are indeed (logically) equivalent. Consider the following theorem. Template:Colored theorem

Proof. Let us first prove that f is bijective.

Injective: For every x,yA, f(x)=f(y)g(f(x))=g(f(y))(g is a function)(gf)(x)=(gf)(y)idA(x)=idA(y)(assumption)x=y. Surjective: For every yB, choose x=g(y)A. Then, f(x)=f(g(y))=idB(y)=y.

Now, let us prove that g=f1. Since f is bijective, the inverse function f1 exists. Then, since the domain and codomain of the inverse function f1 is B and A respectively by definition, g and f1 have the same domain and codomain. It now remains to show that g(b)=f1(b) for every bB. Since f is surjective, for every bB, there exists aA such that f(a)=b. This means a=f1(b). Now, we have for every bB, g(b)=g(f(a))=idA(a)=a=f1(b).

The converse of the above theorem is also true. More precisely, if f is bijective, and thus its inverse function f1 exists, then we have ff1=idA and f1f=idB. (Details are left to the following exercise.) Hence, the two definitions are actually logically equivalent, in the sense that

  • by the above theorem, the conditions in the alternative definition imply the conditions in our definition.
  • by the above remark, the conditions in our definition imply the conditions in the alternative definition.

It then follows that the function g satisfying fg=idA and gf=idB is unique, since the inverse function is unique. Template:Colored exercise Here, we will introduce an approach to find a formula for the inverse function. But this approach does not Template:Colored em work. Template:Colored example In this approach, we use some algebraic manipulation to find the inverse function. However, such method is not always possible. For instance, the function f:(0,) defined by f(x)=ex is bijective, but its inverse function f1:(0,) is given by (indeed, defined to be) f1(x)=lnx. In this case, such inverse function cannot be obtained by such algebraic manipulation. Template:Colored exercise

Image sets and preimage sets

The concepts discussed in this section are the generalizations of the concepts of Template:Colored em and Template:Colored em. Template:Colored definition Template:Colored remark Graphically, the image set looks like:

   A              B
*------*       *------*
|      |       |      |
|  . X |       | f(X) |
|.###. |       |  .   |
|.###.--------->.###. |
|.###. |       |.###. |
|  .   |       |  .   |
*------*       *------*

The preimage set looks like

   A              B
*------*       *------*
|f-1(Y)|       |      |
|  .   |       |  Y   |
|.###. |       |  .   |
|.###.<---------.###. |
|.###. |       |.###. |
|  .   |       |  .   |
*------*       *------*

Template:Colored example Template:Colored remark Template:Colored exercise Template:Colored proposition

Proof. (a) For every subset XA, we have f1(f(X))={xA:f(x)f(X)}. So, for every x, xXf(x)f(X)xf1(f(X)). (b) For every subset YB, we have f(f1(Y))={yB:y=f(x) for some xf1(Y)}. So, for every y, assume yf(f1(Y)). Then, y=f(x) for some xf1(Y). But xf1(Y) means f(x)Y. So, we have y=f(x)Y.

Template:Colored exercise Template:Colored exercise

Cardinalities of sets

Recall that a set is S Template:Colored em if it contains a finite number of elements, i.e., S= or |S|=n for some n. On the other hand, a set is infinite if it is not finite. Previously, we have studied cardinalities of finite sets, and we have left cardinalities of Template:Colored em sets undefined. But, it turns out that we can define cardinalities of infinite sets in a more complicated way, using Template:Colored em.

It may now seem that we can write something like |S|= for an infinite set S. But it turns out that this is not quite meaningful, and as we shall see, infinite sets can have different cardinalities, or different "sizes". That is, there are different sizes of infinity! (in some sense).

To motivate the definition for the cardinalities of infinite sets, let us first consider a simple example of Template:Colored em sets. Template:Colored example This example suggests that for two finite (nonempty) sets A and B, they have the Template:Colored em if there exists a bijective function from A to B (or from B to A. One such function is given by the Template:Colored em of the bijective function from A to B.) This leads us to the following definition: Template:Colored definition Template:Colored remark Template:Colored example The result in this example may seem strange and counter-intuitive, since seems to be twice as large as E, and E is a proper subset of , but they turn out to have the same cardinality. Such phenomenon is actually quite common when we deal with the cardinalities of Template:Colored em.

Fortunately, the numerical equivalence has some nice properties: reflexivity, symmetry and transitivity: Template:Colored theorem

Proof.

Reflexivity:

Case 1: A is empty. Then, |A|=|A|=0.

Case 2: A is nonempty. Then, consider the identity function idA:AA. We have shown that it is bijective.

Symmetry:

Case 1: A and B are both empty. Then, B must be numerically equivalent to A.

Case 2: One of A,B is empty, and another is nonempty. Then, A must Template:Colored em be numerically equivalent to B, and the result follows.

Case 3: Both A and B are nonempty. Then, assume A is numerically equivalent to B. This means there exists a bijective function f:AB. Now, consider its inverse function f1:BA, which is bijective. So, B is numerically equivalent to A.

Transitivity:

Case 1: A,B,C are empty. Then, A must be numerically equivalent to C.

Case 2: Some of A,B,C are empty, and some are nonempty. Then, it is impossible for A to be numerically equivalent to B Template:Colored em B to be numerically equivalent to C. The result follows.

Case 3: A,B,C are nonempty. Then, assume A is numerically equivalent to B and B is numerically equivalent to C. Then, there exist bijective functions f:AB and g:BC. Thus, their composition gf:AC is bijective. Hence, A and C are numerically equivalent.

Now, let us focus on the set , and consider the (infinite) sets having the same cardinality as . We give a special name for such sets: Template:Colored definition Template:Colored remark Using this definition, we can further define another property of a set: Template:Colored definition Template:Colored remark Template:Colored example Template:Colored remark Template:Colored exercise We now know that and have the same cardinality. It is then natural to consider the set of all rational numbers, . It appears that is much larger than , so it may seem that should no longer be denumerable, and be uncountable. But it turns out that is also denumerable. Template:Colored example So, we have proved that ||=||=||. It turns out that even if seems much larger than and , it still has the same cardinality as them. A natural question then arises: is there any uncountable set at all? The answer is yes, and the best known example is the set of all real numbers, . In other words, there does not exist a bijective function from to . Since is uncountable, this suggests that the "size" of is different from the "size" of , i.e., there are different sizes of infinity (in some sense). Template:Colored example Template:Colored remark The following results may be useful for comparing denumerable or uncountable sets. Template:Colored proposition Template:Colored example Template:Colored exercise Template:Colored example Template:Colored proposition Template:Colored remark Template:Colored example Template:Colored remark Template:Colored proposition Template:Colored proposition Template:Colored exercise Template:Colored example Template:Colored exercise Template:Nav Template:BookCat