Lecture # 20 - New
Lecture # 20 - New
1
INJECTIVE FUNCTION or
ONE-TO-ONE FUNCTION
Let f: X Y be a function. f is injective or one-to-one if, and only if,
x1, x2 X, if x1 x2 then f(x1) f(x2)
That is, f is one-to-one if it takes distinct points of the domain to
distinct points of the co-domain.
f
x1 f(x1)
x2 f(x2)
X=domain of f Y=co-domain of f
A one-to-one function separates points. 2
FUNCTION NOT ONE-TO-ONE
x1
A function that is f(x1)=f(x2)
not one-to-one x2
collapses points
together.
X=domain of f Y=co-domain of f 3
EXAMPLE
Which of the arrow diagrams define one-to-one functions?
f g
a 1 a 1
b 2 b 2
3 3
c 4 c 4
X Y X Y
SOLUTION
f is clearly one-to-one function, because no two different elements of
X are mapped onto the same element of Y.
g is not one-to-one because the elements a and c are mapped onto the
same element 2 of Y. 4
ALTERNATIVE DEFINITION FOR
ONE-TO-ONE FUNCTION
f g
a u a u
b v b v
X Y X Y
8
EXERCISE
How many one-to-one functions are there from a set with three
elements to a set with four elements.
SOLUTION
Let X = {x1,x2, x3} and Y = {y1,y2,y3,y4}
x1.
.y1
x2.
.y2
x3.
X Y
Two elements in X could be mapped to the two elements in Y separately.
But there is no new element in Y to which the third element in X could
be mapped. Accordingly there is no one-to-one function from a set with
three elements to a set with two elements. 10
GRAPH OF ONE-TO-ONE FUNCTION
A graph of a function f is one-to-one iff every horizontal line
intersects the graph in at most one point.
EXAMPLE
y y=x2
y
y x (-2,4) (2,4)
x
0 -2 0 +2 x
ONE-TO-ONE FUNCTION NOT ONE-TO-ONE FUNCTION
11
from R+ to R From R to R +
SURJECTIVE FUNCTION or
ONTO FUNCTION
Let f: XY be a function. f is surjective or onto if, and only if,
y Y, x X such that f(x) = y.
That is, f is onto if every element of its co-domain is the image of
some element(s) of its domain.i.e., co-domain of f = range of f
f
.
. .
. .
x. . y = f(x)
.
X=domain of f Y=co-domain of f
Each element y in Y equals f(x) for at least one x in X. 12
FUNCTION NOT ONTO
X=domain of f Y=co-domain of f
13
EXAMPLE
Which of the arrow diagrams define onto functions?
f g
a 1 a 1
b
b 2 2
c
c .3 d 3
X Y X Y
SOLUTION
f is not onto because 3 f(x) for any x in X.
g is clearly onto because each element of Y equals g(x) for some x
in X. 1 = g(c); 2 = g(d); 3 = g(a) = g(b) 14
EXAMPLE
Define f: R R by the rule
f(x) = 4x-1 for all x R
Is f onto? Prove or give a counter example.
SOLUTION
Let y R. We search for an x R such that
f(x) = y
or 4x-1 = y (by definition of f)
y 1
Solving it for x, we find x 4 R
y 1
Hence for y R, there exists x R such that
4
15
y 1
f ( x) f
4
y 1
4. 1 ( y 1) 1 y
4
Hence f is onto.
16
EXAMPLE
Define h: Z Z by the rule
h(n) = 4n - 1 for all n Z
Is h onto? Prove or give a counter example.
SOLUTION
Let m Z. We search for an n Z such that
h(n) = m.
or 4n - 1 = m (by definition of h)
m 1
Solving it for n, we find n 4
m 1
But is not always an integer for all m Z.
4
17
As a counter example, let m = 0 Z, then
h(n) = 0
4n-1 = 0
4n = 1
1
n z
4
Hence there is no integer n for which h(n) = 0.
Accordingly, h is not onto.
18
GRAPH OF ONTO FUNCTION
A graph of a function f is onto iff every horizontal line intersects
the graph in at least one point.
EXAMPLE
y y=ex y y = |x|
O x O x
a 1
b 2
c .3
X Y 24
EXERCISE
Let f: R R be defined by the rule f(x) = x3.
Show that f is a bijection.
SOLUTION
f is one-to-one
Let f(x1) = f(x2) for x1, x2R
x13 = x23
x13 - x23 = 0
(x1 -x2) (x12 + x1x2 + x22) = 0
x1 - x1 = 0 or x12 + x1x2 + x22=0
x1 = x2 (the second equation gives no real solution)
25
f is onto
Let y R. We search for a x R such that
f(x)=y
x3 = y (by definition of f)
or x = (y)1/3
Hence for y R, there exists x = (y)1/3 R such that
f(x) = f((y)1/3)
= ((y)1/3)3 = y
Accordingly f is onto.
Thus, f is a bijection.
26
GRAPH OF BIJECTIVE FUNCTION
A graph of a function f is bijective iff every horizontal line
intersects the graph at exactly one point.
y=x+5
y y=x3 y
(0,5)
0 x (5,0) O(0,0)
31
EQUALITY OF FUNCTIONS
Suppose f and g are functions from X to Y. Then f equals g, written
f = g, if, and only if,
f(x)=g(x) for all x X
EXAMPLE
Define f: R R and g: RR by formulas:
f(x) = |x| for all x R
g(x)= x 2 for all x R
Since the absolute value of a real number equals to square root of its
square i.e., |x| = x 2 for all x R
Therefore f(x) = g(x) for all x R
Hence f = g
32
EXERCISE
Define functions f and g from R to R by formulas:
2 x3 2 x
f(x) = 2x and g ( x) 2 for all x R
x 1
Show that f = g
SOLUTION
2 x3 2 x
g ( x) 2
x 1
2 x( x 2 1)
( x 2 1)
2x [x 2 1 0]
f ( x) for all x R
Accordingly f = g
33
INVERSE OF A FUNCTION
g
1. .a a. .1
2. .b b. .2
3. .c c. .3
X Y Y X
FUNCTION INVERSE
.a a.
1. .1
.b b.
2. .2
.c c.
3. .3
d d.
X Z Z X
35
h
1. .1
.a a.
2. .2
.b b.
3. .3
X Y Y X
36
p
1. .a a. .1
2. .b b. .2
3. .c c. .3
X Y Y X
x=f-1(y) f(x)=y
f-1
X=domain of f Y=co-domain of f
REMARK: A function whose inverse function exists is
called an invertible function.
38
INVERSE FUNCTION FROM AN
ARROW DIAGRAM
Let the bijection f:XY be defined by the arrow diagram.
f
1. .6
2. .7
3 .8
4. .9
X Y
39
The inverse function f-1:YX is represented by the arrow diagram.
f-1
1. .6
2. .7
3. .8
4. .9
X Y
40
INVERSE FUNCTION FROM A
FORMULA
Let f:RR be defined by the formula
f(x) = 4x-1 xR
Then f is bijective, therefore f-1 exists.
By definition of f-1, f-1(y) = x f(x)=y
Now solving f(x) = y for x
4x-1 = y (by definition of f)
4x = y + 1
y 1
x
Hence, f-1(y) = y 1 4which defines f-1 : RR.
41
4
WORKING RULE TO FIND INVERSE
FUNCTION
42
EXAMPLE
Let a function f be defined on a set of real numbers as
x 1
f ( x) for all real numbers x 1.
x 1
44
b. f is surjective
Let y R - {1}. We look for an x R - {1}such that
f(x) = y
x 1
or y
x 1
x + 1= y(x-1)
1+ y = xy - x
1 + y = x(y-1)
y 1
x= R {1}
y 1 y 1
R {1}
Thus for each y R - {1}, there exists x = y 1
y 1
such that f ( x) f y
y 1
Accordingly f is surjective 45
2. inverse function of f
The given function f is defined by the rule
x 1
f ( x) y (say)
x 1
x + 1 = y (x-1)
x + 1 = yx-y
y + 1 = yx-x
y + 1 = x(y-1)
y 1
x
y 1
y 1
Hence f (y) =
-1 ; y 1
y 1 46
EXERCISE
Let f:RR be defined by
f(x) = x3 + 5
Show that f is one-to-one and onto. Find a formula that defines the
inverse function f-1.
SOLUTION
1. f is one-to-one
Let f(x1) = f(x2) for x1, x2 R
x13 + 5 = x23 + 5 (by definition of f)
x13 = x23 (subtracting 5 on both sides)
x1 = x2
47
Hence f is one-to-one.
2. f is onto
Let y R. We search for an x R such that f(x) = y.
x3 + 5 = y (by definition of f)
x3 = y - 5
x= 3 y 5
Thus for each y R, there exists x = 3 y 5 R
such that
f ( x) f 3 y 5
3
y 5 5
3
(by definition of f)
( y 5) 5 y
Hence f is onto.
48
3. formula for f-1
f is defined by y = f(x) = x3 + 5
y-5 = x3
or x= 3 y 5
Hence f-1(y) = 3 y 5
which defines the inverse function
49
COMPOSITION OF FUNCTIONS
Let f: X Y and g: Y Z be functions with the property that
the range of f is a subset of the domain of g i.e. f(X)Y.
Define a new function gof:X Z as follows:
(gof)(x) = g(f(x)) for all xX
The function gof is called the composition of f and g.
X Y Z
f g
Y
f(x) g(f(x))
x
=(gof)(x)
gof 50
COMPOSITION OF FUNCTIONS
DEFINED BY ARROW DIAGRAMS
Let X = {1,2,3},Y={a,b,c,d},Y={a,b,c,d,e} and Z ={x,y,z}.
Define functions f:XY and g:X Z by the arrow diagrams:
f g
X Y Z
Y
1 a x
2 b y
3 c z
d
e
51
Then gof f: X Z is represented by the arrow diagram.
gof
X Z
1 x
2 y
3 z
52
EXERCISE
Let A = {1,2,3,4,5} and let the functions f:A A and g:AA be
defined by:
f(1)=3, f(2)=5, f(3)=3, f(4)=1, f(5)=2
g(1)=4, g(2)=1, g(3)=1, g(4)=2, g(5)=3
Find the composition functions fog and gof.
SOLUTION
We are the definition of the composition of functions and compute:
(fog) (1) = f(g(1)) = f(4) = 1
(fog) (2) = f(g(2)) = f(1) = 3
(fog) (3) = f(g(3)) = f(1) = 3
(fog) (4) = f(g(4)) = f(2) = 5
53
54
COMPOSITION OF FUNCTIONS
DEFINED BY FORMULAS
Let f: Z Z and g:Z Z be defined by
f(n) = n+1 for nZ
and g(n) = n2 for nZ
a. Find the compositions gof and fog.
b. Is gof = fog?
SOLUTION
a. By definition of the composition of functions
(gof) (n) = g(f(n)) = g(n+1) = (n+1)2 for all n Z
and
(fog) (n) = f(g(n)) = f(n2) = n2+1 for all n Z 55
b. Two functions from one set to another are equal if, and only
if, they take the same values.
In this case,
(gof)(1) = (1 + 1)2 = 4where as
(fog)(1) = 12 + 1 = 2
Thus fog gof
56
COMPOSITION WITH THE
IDENTITY FUNCTION
Let X = {a,b,c,d} and Y={u,v,w} and suppose f:XY be
defined by:
f(a) = u, f(b) = v, f(c) = v, f(d) = u
Find foix and iyof, where ix and iy are identity functions on X
and Y respectively.
SOLUTION
The values of foix on X are obtained as:
(foix) (a) = f(ix(a)) = f(a) = u
(foix) (b) = f(ix(b)) = f(b) = v
(foix) (c) = f(ix(c)) = f(c) = v 57
For all elements x in X (foix)(x) = f(x)
so that foix = f
The values of iyof on X are obtained as:
(iyof)(a)=iy(f(a)) = iy(u) = u
(iyof)(b)=iy(f(b)) = iy(v) = v
(iyof)(c)=iy(f(c)) = iy(v) = v
(iyof)(d)=iy(f(d)) = iy(u) = u
For all elements x in X (iyof)(x) = f(x)
so that iyof = f
58
COMPOSING A FUNCTION WITH
ITS INVERSE
Let X = {a,b,c} and Y= {x,y,z}
Define f:XY by the arrow diagram.
f
X Y
i.e. f(a) = z
a x
b y f(b) = x
c z f(c) = y
60
f-1of is found by following the arrows from X to Y by f and back
to X by f-1.
f f-1
X Y X
a x a
b y b
c z c
Thus,
(f-1of)(a) = f-1(f(a)) = f-1 (z) = a
(f-1of)(b) = f-1(f(b)) = f-1 (x) = b and
(f-1of)(c) = f-1(f(c)) = f-1 (y) = c 61
REMARK 1
f-1of : X X sends each element of X to itself. So by definition
of identity function on X
f-1of = ix
Similarly, the composition of f and f-1 sends each element of Y to
itself. Accordingly
fof-1 = iy
REMARK2
The function f:X Y and g:Y X are inverses of each other iff
gof = ix and fog = iy
62
EXERCISE
63
( gof )( x) g ( f ( x))
g (3 x 2) (by definition of f)
(3 x 2) 2
(by definition of g)
3
3x
x
3
Also
( fog )( x) f ( g ( x))
g (3 x 2) (by definition of g)
(3 x 2) 2
(by definition of f)
3
( x 2) 2
x
Thus (gof)(x) = x = (fog)(x)
Hence gof and fog are identity functions. Accordingly f and g
are inverse of each other. 64
THEOREMS ON BIJECTIVE
FUNCTIONS
ALGEBRA OF FUNCTIONS
CARDINILITY
IMAGE SET AND
INVERSE IMAGE SET
65
THEOREM
If f: XY and g: Y Z are both one-to-one functions, then
gof: X Z is one-to-one.
PROOF
Suppose f: X Y and g: Y Z are both one-to-one functions.
Suppose x1, x2 X such that
(gof) (x1) = (gof) (x2)
g(f(x1)) = g(f(x2)) (definition of
composition)
Since g is one-to-one, therefore
f(x1) = f(x2)
And since f is one-to-one, therefore
x1 = x2
66
Thus, we have shown that if (gof) (x1) = (gof)(x2) then x1 = x2
THEOREM
If f: XY and g: Y Z are both onto functions, then gof:X Z
is onto.
PROOF
Suppose f: X Y and g: Y Z are both onto functions. We must
show that gof: X Z is onto.
Let zZ
Since g:Y Z is onto, so for zZ, there exists yY such that
g(y)=z.
Further, since f: X Y is onto, so for yY, there exists xX such
that f(x) = y.
Hence, there exists an element x in X such that
(gof) (x) = g(f(x)) = g(y) = z
Thus, gof: X Z is onto. 67
THEOREM
If f: W X, g:X Y, and h:Y Z are functions, then
(hog)of = ho(gof)
PROOF
The two functions are equal if they assign the same image to each
element in the domain, that is,
((hof)of)(x) = (ho(gof)) (x) for every x W
Computing
((hog)of)(x) = (hog)(f(x)) = h(g(f(x)))
and (ho(gof)) (x) = h ((gof)(x)) = h (g(f(x)))
Hence (hog)of = ho(gof)
REMARK: The composition of functions is associative. 68
EXERCISE
Suppose f:XY and g:YZ are both one-to-one and onto. Prove
that (gof)-1 exists and that
(gof)-1 = f-1og-1
SOLUTION
Suppose f: X Y and g:Y Z are bijective functions,
then their composition gof: X Z is also bijective. Hence (gof)-1:
Z X exists.
Next, to establish (gof)-1 = f-1og-1, we show that
(f-1og-1)o(gof) = ix and (gof)o(f-1og-1) = iz
69
Now consider
(f-1og-1)o(gof) = f-1o(g-1o(gof)) (associative law for o)
= f-1o((g-1og)of) (associative law for o)
= f-1o(iyof) (g-1og = iy)
= f-1of (iyof = f)
= ix (f:XY)
Also
(gof)o(f-1og-1) = go(fo(f-1og-1)) (associative law for o)
= go((fof-1)og-1) (associative law for o)
= go(iyog-1) (fof-1 = iy)
= gog-1 (iyog-1 = g-1)
= iz (g:YZ)
70
-1 -1 -1
REAL-VALUED FUNCTIONS
Let X be any set and R be the set of real numbers. A function
f:XR that assigns to each xX a real number f(x) R is called
a real-valued function.
If f: R R, then f is called a real-valued function of a real
variable.
EXAMPLE
1. f: R+ R defined by f(x) = log x is a real valued
function.
2. g:R R defined by g(x) = ex is a real valued function of
a real variable.
71
OPERATIONS ON FUNCTIONS
SUM OF FUNCTIONS
Let f and g be real valued functions with the same domain X. That
is f:X R and g:X R. The sum of f and g denoted f+g is a real
valued function with the same domain X i.e. f+g: X R defined
by
(f+g)(x) = f(x) + g(x) xX
EXAMPLE
Let f(x) = x2 + 1 and g(x) = x + 2 defines functions f and g from R
to R.
Then (f+g) (x) = f(x) + g(x)
= (x2 + 1) + (x + 2)
= x2 + x + 3 xR
72
which defines the sum functions f+g: X R
DIFFERENCE OF FUNCTIONS
Let f: X R and g:X R be real valued functions. The difference
of f and g denoted f-g is a function from X to R defined by
(f-g)(x) = f(x) - g(x) xX
EXAMPLE
Let f(x) = x2 + 1 and g(x)=x+2
define functions f and g from R to R.
Then (f-g) (x) = f(x) - g(x)
= (x2 + 1) - (x + 2)
= x2 - x - 1 xR
which defines the difference function f-g: X R
73
PRODUCT OF FUNCTIONS
Let f: X R and g:X R be real valued functions. The product of
f and g denoted f.g or simply fg is a function from X to R defined
by
(f . g)(x) = f(x) . g(x) xX
EXAMPLE
Let f(x) = x2 + 1 and g(x)=x+2
define functions f and g from R to R.
Then (f . g) (x) = f(x) . g(x)
= (x2 + 1) . (x + 2)
= x3 + 2x2 + x + 2 xR
which defines the product function f . g: X R 74
QUOTIENT OF FUNCTIONS
Let f:XR and g: X R be real valued functions. The quotient of
f
f by g denoted is a function from X to R defined by
g
f f ( x)
( x)
g g ( x)
EXAMPLE
Let f(x) = x2 + 1 and g(x) = x + 2 defines functions f and g from
R to R.
f f ( x)
( x) x X & g ( x) 0
Then g g ( x)
x2 1
x X x-2
x2
f
which defines the quotient function : X R. 75
g
SCALAR MULTIPLICATION
Let f:X R be a real valued function and c is a non-zero number.
Then the scalar multiplication of f is a function cf: R R
defined by
(cf)(x) = cf(x) xX
EXAMPLE
Let f(x) = x2 + 1 and g(x) = x+2 defines functions f and g from R
to R.
Then (3f - 2g)(x) = (3f)(x) - (2g)(x)
= 3 f(x) - 2 g(x)
= 3(x2+1) - 2 (x+2)
76
= 3x2 - 2x-1 xX
EXERCISE
If f:R R and g:R R are both one-to-one, is f+g also one-to-one?
Prove or give a counter example.
SOLUTION
f+g is not one-to-one
As a counter example; define f:R R and g: R R by
f(x) = x and g(x) = -x xR
Then obviously both f and g are one-to-one
Now
(f+g)(x) = f(x) + g(x) = x + (-x) = 0 xR
Clearly f+g is not one-to-one because
(f+g)(1) = 0 and (f+g) (2) = 0 but 12 77
EXERCISE
If f:RR and g:R R are both onto, is f+g also onto? Prove or
give a counter example.
SOLUTION
f+g is not onto.
As a counter example, define f:R R and g:R R by
f(x) = x and g(x) = - x xR
Then obviously both f and g are onto.
Now (f+g)(x) = f(x) + g(x)
= x + (-x)
= 0 xR
Clearly f+g is not onto because only 0R has its pre-image in
R and no non-zero element of co-domain R is the image of any78
element of R.
EXERCISE
Let f:R R be a function and c( 0)R.
1. If f is one-to-one, is cf also one-to-one? Justify.
2. If f is onto, is cf also onto? Justify.
SOLUTION
1. Suppose f:R R is one-to-one and c( 0)R
Let (cf)(x1) = (cf)(x2) for x1, x2 R
cf (x1) = cf (x2) (by definition of cf)
f(x1) = f(x2) (dividing by c0)
Since f is one-to-one, this implies
x1 = x2 79
2. Suppose f:R R is onto and c(0) R.
Let y R. We search for an x R such that
(cf) (x) = y (1)
cf(x) = y (by definition of cf)
y
f(x) = c (dividing by c0)
y
Since f: R R is onto, so for R, there exists some xR
c
such that the above equation is true; and this leads back to
equation (1).
Accordingly cf: R R is also onto.
80
EXERCISE
The real-valued function 0x:X R which is defined by
0x(x) = 0 for all x X
is called the zero function (on X).
Prove that for any function f: X R
1. f + 0x = f 2. f 0x = 0x
SOLUTION
1. Since (f + 0x)(x) = f(x) + 0x(x)
= f(x) + 0
= f(x) xX
Hence f+0x = f 81
2. Since (f 0x)(x) = f(x) 0x(x)
= f(x) 0
= 0
= 0x(x) xX
Hence f 0x = 0x
82
EXERCISE
Given a set S and a subset A, the characteristics function of A,
denoted A, is the function defined from S to the set {0,1}
defined as
1 if x A
A(x) =
0 if x A
85
SOLUTION
89
EXERCISE
If F, G and H are functions from A = {1,2,3} to A what must be true
if.
1. F is reflexive? 2.G is symmetric?
3. H is transitive, onto function?
SOLUTION
1. F is reflexive iff every element of A is related to itself
i.e.aFa aA. Also F is a function from A to A, so each element of
A is related to a unique (one and only one) element of A. Hence, F
maps each element of A to itself so that F is an identity function.
1 1
2 2
3 3
90
A A
2. G is symmetric iff
if aGb then bGa a,bA
Now, in the present case.
1 1 1 1
2 2 2 2
3 3 3 3
A A A A
91
3. H is transitive iff
if aHb and bHc then aHc. a,b,cA.
In our case
1 1 1 1
2 2 2 2
3 3 3 3
A A A A
92
FINITE AND INFINITE SETS
FINITE SET:
A set is called finite if, and only if, it is the empty set or there
is one-to-one correspondence from {1,2,3,,n} to it, where n
is a positive integer.
INFINITE SET
A non empty set that cannot be put into one-to-one
correspondence with {1,2,3,…,n}, for any positive integer n,
is called infinite set.
93
CARDINALITY
Let A and B be any sets. A has the same cardinality as B if,
and only if, there is a one-to-one correspondence from A to B.
COUNTABLE SET
A set is countably infinite if, and only if, it has the same
cardinality as the set of positive integers Z+.
A set is called countable if, and only if, it is finite or
countably infinite.
A set that is not countable is called uncountable.
94
EXAMPLE
The set Z of all integers is countable.
SOLUTION
We find a function from the set of positive integers Z+ to Z that is
one-to-one and onto.
Define f: Z+ Z by
n
2 if n is an even positive integer
f(n) = n-1
if n is an odd positive integer
2
X Y 97
INVERSE IMAGE OF A SET
Let f: X Y be a function and C Y.
The inverse image of C under f is denoted and defined as:
f-1(C)={x X | f(x) C}
EXAMPLE
Let f: X Y be defined by the arrow diagram.
f
X Y
1 a Let C = {a},D = {b,c},E = {d} then
2 b f-1(C)={1,2}, f-1(D) = {3,4}, and f-
3 c 1
(E) =
4 d
98
SOME RESULTS
Let f: X Y is a function. Let A and B be subsets of X and C and
D be subsets of Y.
1. if A B then f(A) f(B)
2. f(AB) = f(A) f(B)
3. f(AB) f(A) f(B)
4. f(A-B) f(A) - f(B)
5. if C D, then f-1(C) f-1(D)
6. f-1(CD) = f-1(C) f-1(D)
7. f-1(CD) = f-1(C) f-1(D)
8. f-1(C-D) = f-1 (C) - f-1 (D)
99