Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
12 views

03_Functions

Uploaded by

sondakh.edu2
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

03_Functions

Uploaded by

sondakh.edu2
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 21

FUNCTIONS

= WEEK 3 =
ORDERED PAIRS AND CARTESIAN
PRODUCTS
• Let A and B be sets. The Cartesian product of A and B, denoted by
AB, consists of all ordered pairs (a,b) where a  A and b  B. More
concisely, AB = {(a,b)| a  A, b  B}. Note: 1) AB is read “A cross
B”, 2) In (a,b), a and b are called the first element and the second
element, respectively, 3) Two ordered pairs (a,b) and (c,d) are equal if
and only if a=c and b=d.
• Example 1: If A={1,0} and B={-2,0,1} then AB = {(1,-2), (1,0), (1,1),
(0,-2), (0,0), (0,1)} and BA ={(-2,1), (-2,0), (0,1), (0,0), (1,1), (1,0)}.
• Example 2: If F = {1,-1} then FF = {(1,1), (1,-1), (-1,1), (-1,-1)}
• Question: In Example 2, what is F? (Recall that  is the empty
set.)
RELATIONS (1)
• A relation R from A to B is a subset of AB.
• Example 1: Let A={1,0}, B={-2,0,1} and R = {(1,0), (1,1), (0,-2), (0,1)}. As R  AB,
R is a relation from A to B.
• Example 2: Let A={1, 2, 3}, B = {3, 4, 6, 8}, and K = {(x,y) AB| y = x + 3}. Because
each element of K is an element of AB, K  AB and accordingly K is a relation
from A to B. (Note that K = {(1,4), (3,6)}.)
• [Domain and range] Let R be a relation from A to B. The domain DR of the
relation R is defined as DR = {aA| (a,b)R for some b B}. The range ER of the
relation R is defined as ER = {bB| (a,b)R for some a A}.
• In Example 1: DR = {1, 0} = A and ER = {0, 1, -2} = B
• In Example 2: DK = {1, 3} and EK = {4, 6}
RELATIONS (2): MORE EXAMPLES
• Example 3: Let K = {2, 3, 4, 7, 10, 13} and L = {4, 6, 14, 17}. A relation J
from K to L is defined as follows. J = {(x,y)KL| x divides y}. Find DJ
and EJ.
• Ans.: J = {(2,4), (2,6), (2,14), (3,6), (4,4), (7,14)}. Then, DJ = {2, 3, 4, 7},
EJ = {4, 6, 14}
• Example 4: Let L = {4, 7, 10, 15} and M = {4, 6, 14, 17, 20}. A relation V
from L to M is defined as follows. V = {(x,y)LM| x > y}. Find DV and
EV .
• Ans.: V = {(7,4), (7,6), (10,4), (10,6), (15,4), (15,6), (15,14)}. It follows
that DV = {7, 10, 15} and EV = {4, 6, 14}
FUNCTIONS (1): DEFINITION AND
EXAMPLES
• Definition
• Let A and B be sets and f  AB.
• f is a function from A to B provided that both conditions below hold:
• (1) If (a,b)  f and (a,c)  f then b = c, (2) Df = A
• Loosely speaking, every element of A is assigned to exactly one element of B.
• Example 1: [counter-example]
• Let K = {2, 3, 4, 7, 10, 13} and L = {4, 6, 14, 17}. A relation J from K to L is defined
as follows. J = {(x,y)KL| x divides y}. Is J a function from K to L? Ans.: No, it is
not. It fails condition (1). In the previous example, J = {(2,4), (2,6), (2,14), (3,6),
(4,4), (7,14)}. In this case (2,4) J and (2,6)  J, but 46.
FUNCTIONS (2): MORE EXAMPLES
• Example 2: [counter-example]
• Let A = {1, 2, 3, 4, 5} and B = {0, 4, 5, 6}. A relation g from A to B is defined as follows. g =
{(x,y)AB| y = x+2}. Is g a function from A to B? Ans.: No, it is not. It fails condition (2). To
prove this, note that g = {(2,4), (3,5), (4,6)}. From this we have Dg = {2, 3, 5}. Consequently,
Dg  A.
• Example 3:
• Let A = {1, 2, 3, 4} and B = {1, 2, 3, 4, 5, 6, 9}. A relation f from A to B is defined as follows. f =
{(x,y)AB| y = x+2}. Is f a function from A to B? Ans.: Yes, it is. f satisfies both conditions.
• Example 4:
• Let U = {1, 2, 3, 4} and V = {1, 2, 4, 5, 9, 16}. A relation k from U to V is defined as follows. k =
{(x,y)UV| y = x2}. Is f a function from U to V?
• Answer: Yes, it is. k satisfies both conditions.
FUNCTIONS (3): MORE EXAMPLES
• Example 5: A relation t from ℤ to ℕ is defined as follows. (Cf. Example 3 on

• t = {(x,y) ℤ  ℕ | y = x+2}
the previous slide.)

• Is t a function from ℤ to ℕ?

• Example 6: A relation h from ℤ to ℤ is defined as follows. (Cf. Example 5


• Answer: No, it isn’t. It fails condition (2). (Verify!)

• h = {(x,y) ℤ  ℤ | y = x+2}
above.)

• Is h a function from ℤ to ℤ?
• Answer: Yes, it is. It satisfies both condition. (Verify!)
DOMAIN, IMAGE AND RANGE (1)

f:A→B
• If f is a function from A to B, we can write:

• It is read “f maps A into B” or “f is a function from A to B”.


• [Domain] If f: A → B then A is called the domain of f, denoted by Df = A.
• [Image] Let f : A → B. If (a,b)  f then b is called the “image of a” under f
and we can write b = f(a). [f(a) is read “f of a”]. In this case, we can say

• [Range] Let f : A → B. The range of f is defined as the set of all elements


that b is “the value of f at a.”

in B which appear as the image of at least one element in A. It is denoted


by f(A).
IMAGE AND RANGE (2)
• Example 1
• Let U = {a, e, i, o}, V = {b, c, d, j, k, m}. A function g from U to V is defined as follows: g = {(a,k), (e,c),
(i,k), (o,b)}. Find (a) g(e) and g(o), (b) the range of g.
• Answer
• (a) g(e) = c, g(o) = b, (b) The range of g contains the images of every element in U. We have calculated
the images of e and o. The rest are g(a) = k and g(i) = k. So, the range of g = g(U) = {k, c, b}.
• Example 2
• Let A = {1, 2, 3, 4} and B = {1, 2, 3, 4, 5, 6, 9}. A relation f from A to B is defined as follows. f =
{(x,y)AB| y = x+2}. Find (a) the image of 1 under f, (b) the image of 4 under f, (c) the image of 5
under f, (d) the range of f .
• Answer
• (a) f(1) = 1+2 = 3, (b) f(4) = 4+2 = 6, (c) f(5) is undefined since 5 A, (d) The range of f contains the
images of every element in A. We have calculated the images of 1 and 4. The rest are f(2) = 4 and f(3)
= 5. So, the range of f = f(A) = {3, 4, 5, 6}.
EQUAL FUNCTIONS
• Let f and g be functions defined on the same domain D. If f(a) = g(a) for every a  D
then the functions f and g are equal and we write f=g.
• Note: As a consequence, we cannot define equal functions on distinct domains.
• Example 1
• Let A = {0, 1} and B = {0, 1, 2, 3}. Let f and g be functions from A to B such that for
every x  A: f(x) = x2 + 1 and g(x) = x3 + 1. In this case f = g because the functions
are defined on the same domain (i.e. A) and for every x  A f(x) = g(x). [Note: f(0) =
02 + 1 = 1, g(0) = 03 + 1 = 1, f(1) = 12 + 1 = 2, g(1) = 13+1 = 2]

• Let f: ℕ → ℤ, g: ℤ → ℤ with f(x) = x + 5 for every x  ℕ and g(x) = x + 5 for


• Example 2

every x  ℤ. In this case f  g because the functions are defined on different


domains.
ONE-TO-ONE CORRESPONDENCE (1)
• Let f be a function from A to B. Then, f is called a one-to-one
correspondence between A and B if all the following conditions hold:
(i) if (a,b) f and (a’,b)f then a = a’, (ii) f(A) = B.
• Loosely speaking, the conditions mean: (i) Distinct elements of A must
have distinct images (in B), (ii) Every element of B is an image of an
element of A.
• Note: one-to-one correspondence is also called bijection, and the
function that satisfies all the conditions above is said to be bijective.
ONE-TO-ONE CORRESPONDENCE (2)
• Fig. 1: f is a one-to-one correspondence between A and B.
• Fig. 2: g is not a one-to-one correspondence between A and C, condition (i) fails.
• Fig. 3: h is not a one-to-one correspondence between C and A, condition (ii) fails.
ONE-TO-ONE CORRESPONDENCE
(2): EXAMPLES
• Example 1: [counter-example]
• Let A = {-2, -1, 0, 1, 2} and B = {0, 1, 4}. f is a function from A to B such that f(x) = x2 for
every x  A. f is not a one-to-one correspondence because (-2,4), (2,4)  f but -2  2
[condition (i) fails].
• Example 2: [counter-example]
• Let K = {0, 1, 2} and L = {0, 1, 2, 3, 4}. g is a function from K to L such that g(x) = x2 for
every x  K. g is not a one-to-one correspondence because L  g(K) [condition (ii) fails].

• Let h: ℤ→ℤ such that h(x) = x + 5 for every x  ℤ. [Prove that h is a one-to-one
• Example 3:

correspondence from ℤ to ℤ.]


• Example 4: Let ℝ+ = {xℝ| x  0} and t: ℝ+ → ℝ+ such that for every . [Prove that t is
a one-to-one correspondence from ℝ+ to ℝ+.]
INVERSE FUNCTION: DEFINITION
AND EXAMPLE
• Let f: A → B be a bijection. Then, there exists a unique function from
B to A, namely f -1, such that f (f -1(x)) = x for every x  B. [Note f -1 is
read “inverse function of f ”.]
• Example 1: (Look at the figures on the right.)
• Let A = {1, 2, 3, 4}, B = {3, 5, 6, 10} and f is a one-to-one
correspondence between A and B, where f = {(1,6), (2,10), (3,5),
(4,3)}. In this case, the inverse function of f, (i.e. f -1) from B to A is f -1
= {(3,4), (5,3), (6,1), (10,2)}.
• To verify this, take each x  B and check whether f (f -1(x)) = x.
• x = 3 => f -1(3) = 4 => f (f -1(3)) = f(4) = 3.
• x = 5 => f -1(5) = 3 => f (f -1(5)) = f(3) = 5.
• x = 6 => f -1(6) = 1 => f (f -1(6)) = f(1) = 6.
• x = 10 => f -1(10) = 2 => f (f -1(10)) = f(2) = 10.
INVERSE FUNCTION: MORE
EXAMPLES
• Let h: ℤ→ℤ such that h(x) = x + 5 for every x  ℤ. [h is a one-to-one correspondence
• Example 2

from ℤ to ℤ.]. In this case, h-1: ℤ→ℤ where h-1(x) = x -5 for every x  ℤ. To verify
this let a be any element of ℤ. As a result, h-1(a) = a – 5. Consequently, h(h-1(a)) = h(a-
5) = (a-5) + 5 = a. We have showed that for every a  ℤ, it holds that h(h-1(a)) = a. It
implies h-1 as defined above is the inverse function of h.

• Let ℝ+ = {xℝ| x  0} and t: ℝ+ → ℝ+ such that for every . [t is a one-to-one


• Example 3

correspondence from ℝ+ to ℝ+.] In this case, t-1: ℝ+ → ℝ+ where for every ℝ+. To
verify this let a be any element of ℝ+. As a result, t-1(a) = a2. Consequently, t(t-1(a)) =
t(a2) = = a. We have showed that for every a  ℝ+, it holds that t(t-1(a)) = a. It implies
t-1 as defined above is the inverse function of t.
PRODUCT/COMPOSITION FUNCTION
• Let f: AB and g: BC. Then, the product function of f and g, denoted by g∘ f, is defined as a
function that maps A into C, where (g∘ f)(a) ≡ g(f(a)) for every member of A.
• Example 1
• Let A = {1, 2, 5}, B = {0, 8, 1}, C = {-2, 5, 1}

• To find the function g∘ f, calculate f(x) for every xA:


• f: A→ B and g: B→ C where f = {(1,1), (2,0), (5,8)} and g = {(0,5), (8,-2), (1,1)}

• f(1) = 1, f(2) = 0, f(5) = 8


• Next, for every xA calculate g(f(x)):

• Finally, we have: g∘ f = {(1,1), (2,5), (5,-2)}.


• g(f(1)) = g(1) = 1, g(f(2)) = g(0) = 5, g(f(5)) = g(8) = -2.

• What are (g∘ f)(1), (g∘ f)(2), and (g∘ f)(5)?


• Ans.: (g∘ f)(1) = 1, (g∘ f)(2) = 5, and (g∘ f)(5) = -2.
PRODUCT FUNCTION: EXAMPLE 2

Let f, g: ℝℝ where f(x) = x + 7 and g(x) = x3.


• Example 2

Note: f, g: ℝℝ means that both f and g map ℝ to ℝ.


a) Find the formulae for (g∘ f)(x) and (f∘ g)(x), b) (g∘ f)(3) and (f∘ g)(3)

c) Is g∘ f = f∘ g?

a) (g∘ f)(x) = g(f(x)) = g(x+7) = (x+7)3, (f∘ g)(x) = f(g(x)) = f(x3) = x3+7.
• Answer:

b) (g∘ f)(3) = (3+7)3 = 103 = 1000, (f∘ g)(3) = 33 + 7 = 27+7 = 34.


c) In order that g∘ f = f∘ g, both function must have the same domain and for every x in

the domain the following must hold: (g∘ f)(x) = (f∘ g)(x). In this case, although they have

the same domain, i.e. ℝ, (g∘ f)(x)  (f∘ g)(x) for some xℝ. (The answer to part b)
above shows that.) This proves that g∘ f  f∘ g.
PRODUCT FUNCTION: EXAMPLE 3

• Let f: ℝ+ℝ+ and g: ℝ+ℝ where f(x) = x2 for every xℝ+ and g(x) =
• Example 3

log x for every xℝ+. (Verify that f and g are both bijections.) Note: ℝ+
= {xℝ|x>0}. Find: a) g∘ f, b) f -1, c) g-1, d) (g∘ f)-1, e) f -1 ∘ g-1, f) Verify
that (g∘ f)-1 = f -1 ∘ g-1.

• As f: ℝ+ℝ+, g: ℝ+ℝ, and both are bijections, it follows that g∘ f:


• Answer to part a):

ℝ+ℝ (i.e. g∘ f maps ℝ+ into ℝ.). Moreover, it is a one-to-one


correspondence between ℝ+ and ℝ. The formula for (g∘ f)(x) is
determined as follows. (g∘ f)(x) = g(f(x)) = log f(x) = log x2. Therefore, g∘
f: ℝ+ℝ where (g∘ f)(x) = log x2 for every xℝ+.
PRODUCT FUNCTION: EXAMPLE 3
(contd.)

• Given f: ℝ+ℝ+ where f(x) = x2 for every x  ℝ+. Claim: it is a


• Answer to part b):

bijection. If f -1 is the inverse of f, it has to satisfy (f ∘ f -1)(x) = x for


every x  ℝ+. Hence, f(f -1(x)) = x for every x  ℝ+. It is equivalent to
(f -1(x))2 = x for every x  ℝ+, which is (in this case) equivalent to for
every  ℝ+. So, f -1: ℝ+ℝ+ where for every  ℝ+. (Question:
Why “in this case”? Why is “” not always equivalent to ?)
PRODUCT FUNCTION: EXAMPLE 3
(contd.)
• Answer to part c):
• Given g: ℝ+ℝ where g(x) = log x for every x  ℝ+. Claim: it is a bijection. If g-1 is the inverse of g, it
has to satisfy (g ∘ g -1)(x) = x for every x  ℝ. Hence, g(g-1(x)) = x for every x  ℝ. It is equivalent to: log
g-1(x) = x for every x  ℝ. It follows that g-1(x) = 10x for every  ℝ. So, g-1: ℝℝ+ where g-1(x) = 10x
for every x  ℝ.
• Answer to part d):
• From part a) we have g∘ f: ℝ+ℝ where (g∘ f)(x) = log x2 for every xℝ+. Since g∘ f is a bijection, it has
an inverse (g∘ f)-1, which maps ℝ into ℝ+ with the property that (g∘ f)((g∘ f)-1(x)) = x for every  ℝ.
Therefore, log [(g∘ f)-1(x)]2 = x for every  ℝ. As a consequence, the following holds for every  ℝ:

• So, (g∘ f)-1: ℝℝ+ where for every  ℝ.


PRODUCT FUNCTION: EXAMPLE 3
(contd.)

• From parts b) and c), we have f -1: ℝ+ℝ+ where for every  ℝ+
• Answer to part e):

and g-1: ℝℝ+ where g-1(x) = 10x for every x  ℝ. Consequently, f -1


∘ g-1: ℝℝ+ where (f -1 ∘ g-1)(x) = f -1(g-1(x)) for every x  ℝ. Then, (f
∘ g-1)(x) = f -1(g-1(x)) = for every x  ℝ. So, f -1 ∘ g-1: ℝℝ+ where (f
∘ g-1)(x) = for every x  ℝ.
-1

• Answer to part f): By comparing the results in parts d and e, (g∘ f)-1 =
-1

f -1 ∘ g-1 is verified.

• If f: AB and g: BC are bijections then (g∘ f)-1 = f -1 ∘ g-1.


• Theorem

You might also like