Lecture 17
Lecture 17
LECTURE # 17
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: R→R by formulas:
f(x) = |x| for all x εR
INVERSE OF A FUNCTION:
Discrete Structures
g-1
g
.a 1.
1. .a
.b 2.
2. .b
.c 3.
3. .c
Y X
X Y
FUNCTION INVERSE
f f-1
.a .a
1. 1.
.b .b
2. 2.
.c .c
3. 3.
d d
X Z Z X
h h-1
1.
1. .a
.a 2.
2. .b
.b 3.
3.
Y X
X Y
INVERSE
SURJECTIVE FUNCTION
p P-1
.a
1.
1. .b
.a 2.
2. c
.b 3.
3.
c
Y X
X Y
INVERSE
BIJECTIVE FUNCTION
Note:Inverse of a surjective function may not be a function.
INVERSE FUNCTION:
Suppose f:X→Y is a bijective function. Then the inverse function f-1: Y→X is defined as:
yY,f-1(y) = x y = f(x)
That is, f-1 sends each element of Y back to the element of X that it came from under f.
Discrete Structures
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.
INVERSE FUNCTION FROM AN ARROW DIAGRAM:
Let the bijection f:X→Y be defined by the arrow diagram.
1. .6
2. 7
3 8
4. 9
X Y
f-1
.6 1.
7 2.
8 3
9 4.
y +1
x=
y −1
y +1
Thus for each y R - {1}, there exists x= R - {1}
y −1
y +1
such that f ( x) = f = y
y −1
Accordingly f is surjective
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-1(y) = ; y 1
y −1
EXERCISE:
Let f:R→R 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 .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)
3
x =y-5
x = 3 y −5
such that
f ( x) = f ( 3 y −5 )
( )
3
= 3 y −5 +5 (by definition of f)
= ( y − 5) + 5 = y
Hence f is onto.
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
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
x Y g(f(x)) =(gof)(x)
f(x)
gof
g
f Z
X Y
Y
1 a x
2 b y
3 c z
d
X Z
x
1
y
2
z
3
EXERCISE:
Let A = {1,2,3,4,5} and we define functions f:A →A and then g:A→A :
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
(fog) (5) = f(g(5)) = f(3) = 3
Also
(gof) (1) = g(f(1)) = g(3) = 1
(gof) (2) = g(f(2)) = g(5) = 3
(gof) (3) = g(f(3)) = g(3) = 1
(gof) (4) = g(f(4)) = g(1) = 4
(gof) (5) = g(f(5)) = g(2) = 1
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
b. Two functions from one set to another are equal if, and only if, they
take the same values.
In this case,
(gof)(1)
=g(f(1))= (1 + 1) 2 = 4 where as
(fog)(1) = f(g(1))=12 + 1 = 2
Thus fog gof
X f Y
a x i.e. f(a) = z
b y f(b) = x
c z
f(c) = y
Then f is one-to-one and onto. So f-1 exists and is represented by the arrow diagram
Below.
Discrete Structures
Y f-1 X
x a
i.e. f-1(x) = b
y b
z c f-1(y) = c
f-1(z) = a
f Y f-1
X X
a x a
b y b
c z c
EXERCISE:
Let f: R →R and g:R →R be defined by
f(x) = 3x + 2 for all xR
x−2
and g(x) = for all xR
3
Discrete Structures