Professional Documents
Culture Documents
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
Since the absolute value of a real number equals to square root of its square
SOLUTION:
INVERSE OF A FUNCTION
:
CIIT Abbottabad
Page 97
CSC102 – Discrete Mathematics
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
CIIT Abbottabad
Page 98
CSC102 – Discrete Mathematics
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:
" yÎY,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.
CIIT Abbottabad
Page 99
CSC102 – Discrete Mathematics
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
CIIT Abbottabad
Page 100
CSC102 – Discrete Mathematics
f-1
.6 1.
7 2.
8 3
9 4.
Hence, f-1 (y) = is the inverse of f(x)=4x-1 which defines f-1 : R®R.
(by definition of f)
CIIT Abbottabad
Page 101
CSC102 – Discrete Mathematics
such that
Accordingly f is surjective
2. inverse function of f
The given function f is defined by the rule
Þ x + 1 = y (x-1)
Þ x + 1 = yx-y
Þ y + 1 = yx-x
Þ y + 1 = x(y-1)
Hence f-1(y) =
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=
CIIT Abbottabad
Page 102
CSC102 – Discrete Mathematics
such that
Hence f is onto.
3. formula for f-1
f is defined by y = f(x) = x3 + 5
Þ y-5 = x3
or x=
x Y g(f(x)) =(gof)(x)
f(x)
gof
CIIT Abbottabad
Page 103
CSC102 – Discrete Mathematics
f g
X Y Z
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
CIIT Abbottabad
Page 104
CSC102 – Discrete Mathematics
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.
CIIT Abbottabad
Page 105
CSC102 – Discrete Mathematics
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 xÎR
CIIT Abbottabad
Page 106
CSC102 – Discrete Mathematics
CIIT Abbottabad
Page 107