22
1 Chapter 5 Functions Examples of functions: 1. f (x)=3x - 2, or y = x 2 sin x, or z = x 2 + y 2 . 2. Given any country, assign to it its capital. 3. Given any student, assign to him/her the respective University number. Definition (5.1.1) Let A and B be nonempty sets. A function from A to B (denoted by f : A B ) is a relation (A,B,f ) satisfying the following conditions:

Chapter 5 Display

Embed Size (px)

Citation preview

Page 1: Chapter 5 Display

1

Chapter 5 Functions

Examples of functions:

1. f(x) = 3x− 2, or y = x2 sinx, or z = x2 + y2.

2. Given any country, assign to it its capital.

3. Given any student, assign to him/her the respective University number.

Definition (5.1.1) Let A and B be nonempty sets. A function from A to B

(denoted by f : A → B) is a relation (A,B, f) satisfying the following conditions:

Page 2: Chapter 5 Display

2

1. For each a ∈ A there exists b ∈ B such that (a, b) ∈ f , and

2. if (a, b) and (a, c) are both in f , then b = c.

The first condition says that for each a ∈ A, there is a b ∈ B which is related to

a. For instance, b = sin a has this property, but b = log a doesn’t since for

a = −1, there is no such b.

The second condition says that the b ∈ B which is related to a is unambiguously

determined. Hence the relation that (a, b) ∈ f means a and b are brothers, is not a

function.

Since for each given a ∈ A, b is uniquely determined, we denote b by f(a).

Page 3: Chapter 5 Display

3

See the example at the bottom of p.103.

Do Exercise 5.1.2, 5.1.3.

Refer to figure 5.1.

In definition 5.1.1, the set A is called the domain of f , denoted by Dom(f), and

the the set B is called the codomain of f , denoted by Codom(f). The set

{b ∈ B : there exists an a ∈ A such that b = f(a)}

is called the range or image of f , denoted by Ran(f).

Theroem (5.1.7) If f : A → B and g : A → B are two functions, then

Page 4: Chapter 5 Display

4

f = g if and only if for each a ∈ A, f(a) = g(a).

Proof We check that the two relations (A,B, f) and (A,B, g) are equal, that

is, they have equal graphs f and g. According to the definition of functions

f = {(a, f(a)) : a ∈ A}, g = {(a, g(a)) : a ∈ A}.

Whence the conclusion of the theorem follows.

5.1.8

The inverse of a function is not necessarily a function. See figure 5.1.

Defintion (5.1.8) A function f : A → B is said to be one-to-one or injective if

Page 5: Chapter 5 Display

5

given any b ∈ B, there is at most one a ∈ A for which b = f(a).

A function f : A → B is said to be onto or surjective if for each b ∈ B, there is at

least one a ∈ A for which b = f(a). In other words, f is onto if Codom(f) =

Ran(f).

A function that is both one-to-one and onto is called a one-to-one

correspondence or bijective function.

Remark To prove f is one-to-one, we let a, c be any elements in A such that

f(a) = f(c) and then proceed to show that a = c.

Examples

Page 6: Chapter 5 Display

6

1. The function f : R+ → R given by f(x) = x2 is one-to-one. But if the domain

is changed to R then the function is not one-to-one. (Why?) Is the function

surjective?

2. Let A be any nonempty set and let B be any set. The function g : P(A) → P(B)

given by g(X) = X ∩ B is not injective nor surjective. Under what condition

will g be surjective? Injective?

Exercises 5.1.14

3. f(x) = x3 − x is not one-to-one, since f(1) = 0 = f(0).

4. f(x) = ex is one-to-one: f(x) is an increasing function, so f(x) = ex = f(y) =

Page 7: Chapter 5 Display

7

ey implies x = y.

5.2 Composition and Inverses

If f : A → B and g : B → C are functions, then the relation g ◦ f : A → C is also

a function. Indeed, for any a ∈ A, there is a unique b ∈ B such that b = f(a), and

then there is a unique c ∈ C such that c = g(b) = g(f(a)) = (g ◦ f)(a).

(g ◦ f) : A → C is called the composition of f and g. For any a ∈ A,

(g ◦ f)(a) = g(f(a)).

Exercises (5.2.2)

Page 8: Chapter 5 Display

8

1. f is surjective does not imply g ◦ f is surjective.

Example: A = B = C = {1, 2}.

f : A → B given by f(1) = 1, f(2) = 2;

g : B → C given by g(1) = g(2) = 1.

2. g is surjective does not imply g ◦ f is surjective.

Example: A = B = C = {1, 2}.

f : A → B given by f(1) = f(2) = 1;

g : B → C given by g(1) = 1, g(2) = 2.

3. f is one-to-one does not imply g ◦ f is one-to-one.

Page 9: Chapter 5 Display

9

4. g is one-to-one does not imply g ◦ f is one-to-one.

Theorem (5.2.3) Suppose that f : A → B and g : B → C are functions.

Then the following hold.

1. If f and g are both one-to-one, g ◦ f is one-to-one.

2. If f and g are both onto, g ◦ f is onto.

Proof of 2. For any z ∈ C, there exists a certain y ∈ B such that z = g(y).

Since f is also onto, there exists an x ∈ A such that y = f(x). Hence,

z = g(y) = g(f(x)) = g ◦ f(x). So, g ◦ f is onto.

Page 10: Chapter 5 Display

10

Problems (5.2.4)

1. If g ◦ f is one-to-one, then f must also be one-to-one.

Proof Let x, y ∈ A such that f(x) = f(y). Then g(f(x)) = g(f(y)). Hence,

g ◦ f(x) = g ◦ f(y). Since g ◦ f is injective, x = y, as desired.

2. g ◦ f one-to-one implies g one-to-one?

3. g ◦ f surjective implies f surjective?

4. g ◦ f surjective implies g surjective?

Page 11: Chapter 5 Display

11

Theorem (5.2.5) If f : A → B, g : B → C, h : C → D are functions, then

h ◦ (g ◦ f) = (h ◦ g) ◦ f.

In other words, the composition of functions is associative.

Proof The functions on both sides have the same domain A and the same

codomain D. We, therefore, need only to show that, for each x ∈ A,

h ◦ (g ◦ f)(x) = (h ◦ g) ◦ f(x).

Theorem (5.2.7) Let f : A → B be a function. The relation (B,A, I), where

I = {(f(a), a) : a ∈ A},

Page 12: Chapter 5 Display

12

is a function if and only if f is bijective. In such case, we write f−1 to denote

this function, which is called the inverse of f .

Proof First we assume f is bijective and proceed to show that I is a function.

Since Ran(f) = B, every element b ∈ B is of the form f(a) for some a ∈ A. So

(b, a) ∈ I. Furthermore, if c ∈ A such that (b, c) is also in I, then by the definition

of I, b = f(a) = f(c). Hence a = c. Thus, I is a function. In addition, we see

that, the function I is also bijective.

Conversely, assume that I is a function. Then every element in B is of the form

f(a) for some a ∈ A. Hence f is surjective. If a, c are elements in A such that

f(a) = f(c), then, by defintion, (f(a), a), (f(c), c) are both in I. But I is a

function, hence a = c. This shows that f is also injective.

Page 13: Chapter 5 Display

13

Theorem (5.2.9) Let f : A → B be a function.

Part I. If f is a one-to-one correspondence, the following statements hold.

1. f ◦ f−1 = IB, the identity function on B, that is IB(b) = b for every b ∈ B.

2. f−1 ◦ f = IA, the identity function on A, that is IA(a) = a for every a ∈ A.

3. If g : B → A is any function for which f ◦g = IB or g◦f = IA, then g = f−1.

In other words, f−1 is the only function which satisfies the composition laws

in 1 or 2 above.

Part II. If there exists a function g : B → A such that g ◦ f = IA and

f ◦ g = IB, then f is a one-to-one correspondence, and g = f−1, f = g−1.

Page 14: Chapter 5 Display

14

Proof

Part I. We only prove 3. From f ◦ g = IB, we have

f−1 ◦ (f ◦ g) = f−1 ◦ IB = f−1.

The left hand side, by Theorem 5.2.5, is equal to (f−1 ◦ f) ◦ g = IA ◦ g = g.

Similarly, g ◦ f = IA implies (g ◦ f) ◦ f−1 = IA ◦ f−1, which then implies, on

invoking Theorem 5.2.5 again, that f−1 = g ◦ (f ◦ f−1) = g ◦ IB = g.

Part II. g ◦ f is injective implies f is injective. g ◦ f is surjective implies g is

surjective. Since identity functions are bijective, g ◦ f = IA implies f is injective,

and f ◦ g = IB implies f is surjective. Hence f is bijective. The desired conclusion

Page 15: Chapter 5 Display

15

then follows from Part I 3.

Theorem (5.2.10) If both h : A → B and k : B → C are bijective, then k ◦ h

is also a bijective function. Furthermore, (k ◦ h)−1 = h−1 ◦ k−1.

5.3 Images and Inverse Images

Definition (5.3.7) Let f : A → B be a function. For any subset T of A, the set

f(T ) = {b ∈ B : there is some t ∈ T with f(t) = b} = {f(t) : t ∈ T}

is called the image of T under the function f . Thus, Ran (f) = f(A).

Example (5.3.10) Let f : R→ R be given by f(x) = x2. Then

Page 16: Chapter 5 Display

16

f([−2, 10]) = [0, 100].

f({0,−1}) = {0, 1}.

f(φ) = φ.

Note In the notation f(T ), T is a subset of A and f(T ) is a subset of B.

Theorem (5.3.11) Let f : A → B be a function. For any subsets X,Y of A,

1. f(X ∪ Y ) = f(X) ∪ f(Y ),

2. f(X ∩ Y ) ⊆ f(X) ∩ f(Y ),

Page 17: Chapter 5 Display

17

3. f(X1) ⊆ f(X) if X1 ⊆ X.

Proof of 1. By 3, both f(X) and f(Y ) are subsets of f(X ∪ Y ), hence,

f(X) ∪ f(Y ) ⊆ f(X ∪ Y ). Conversely, for any z ∈ f(X ∪ Y ), z = f(t) for some

t ∈ X ∪ Y . If t ∈ X, then z ∈ f(X). If t ∈ Y , then z ∈ f(Y ). In any case,

z ∈ f(X) ∪ f(Y ).

Exercise Give an example to show that equality in 2 may not hold.

Definition (5.3.1) Let f : A → B be a function. For any subset S of B, the set

f−1(B) = {a ∈ A : f(a) ∈ S}

Page 18: Chapter 5 Display

18

is called the inverse image of the set S under the function f .

Examples

1. f−1(B) = A.

2. Suppose f : R→ R is given by f(x) = x2. Then

f−1([1, 2]) = [−√2,−1] ∪ [1,√

2],

f−1({0}) = {0},f−1({3}) = {−√3,

√3},

f−1([−1, 4]) = [−2, 2],

f−1(R) = R.

Page 19: Chapter 5 Display

19

Note The inverse image f−1(S) is one single symbol. It is not the function f−1

on S, because, in general f is not bijective and its inverse is not a function.

Theorem (5.3.6) Let f : A → B be a function. For any subsets R and S of

B,

1. f−1(R ∪ S) = f−1(R) ∪ f−1(S),

2. f−1(R ∩ S) = f−1(R) ∩ f−1(S),

3. f−1(B\S) = A\f−1(S),

4. f−1(R1) ⊆ f−1(R) if R1 ⊆ R.

Page 20: Chapter 5 Display

20

Proof of 2. f−1(R) ⊆ f−1(R ∪ S) and , f−1(S) ⊆ f−1(R ∪ S). Therefore

f−1(R) ∪ f−1(S) ⊆ f−1(R ∪ S).

Conversely, for any x ∈ f−1(R ∪ S), by definition of inverse image, f(x) ∈ R ∪ S.

Therefore, x ∈ R or x ∈ S. Hence, x ∈ f−1(R) or x ∈ f−1(S) . Consequently,

x ∈ f−1(R) ∪ f−1(S). This shows that f−1(R ∪ S) ⊆ f−1(R) ∪ f−1(S).

Combining with the previous inclusion, we get that

f−1(R ∪ S) = f−1(R) ∪ f−1(S).

5.5 Sequences

Definition (5.5.1) Let A be a nonempty set. Any function s : N→ A is called

a sequence in A.

Page 21: Chapter 5 Display

21

Usual notation for a sequence in A is (ai) or more explicitly: a1, a1, a2, . . . , an, . . .,

where ai = s(i).

Examples

1. The harmonic sequence: 1, 12,

13,

14, . . . .

2. The Fibonacci sequence: 1, 1, 2, 3, 5, 8, . . . .

3. The set A = R× R and an = (2n + 1, sin(14πn)).

Subsequence

Page 22: Chapter 5 Display

22

Example The sequence (ai) of squares: 1, 4, 9, 16, 25, 36, 49, . . . has the

subsequence 1, 9, 25, 49, . . . consisting of the odd squares. The terms of the

subsequence are a1, a3, a5, . . ..

Definition (5.5.18) Let (ai) be a sequence in a set A. If (ni) is a strictly

increasing sequence in N (that is n1 < n2 < n3 < n4 < . . .), then the sequence

an1, an2, an3, . . .

is a subsequence of (ai) and we denote this subsequence by (sni).

Do Exercise 5.5.19.

Read Theorem 5.5.21 and Theorem 5.5.22.