0% found this document useful (0 votes)
9 views27 pages

Lecture 11

Here are the key points about the inverse of a function: - The inverse of a function f, written f^-1, undoes the mapping of f. - For f to have an inverse, it must be a bijection (one-to-one and onto). - The domain and codomain are swapped when taking the inverse. - The inverse of f is a function from the codomain of f to its domain. - Applying f followed by f^-1 or vice versa returns the original element. So in summary, the inverse of a function reverses the input/output relationship if the function is bijective. It allows transforming an element back to where it came from.

Uploaded by

chaudhary manan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views27 pages

Lecture 11

Here are the key points about the inverse of a function: - The inverse of a function f, written f^-1, undoes the mapping of f. - For f to have an inverse, it must be a bijection (one-to-one and onto). - The domain and codomain are swapped when taking the inverse. - The inverse of f is a function from the codomain of f to its domain. - Applying f followed by f^-1 or vice versa returns the original element. So in summary, the inverse of a function reverses the input/output relationship if the function is bijective. It allows transforming an element back to where it came from.

Uploaded by

chaudhary manan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 27

‫السَّآل ُم َعلَ ْي ُك ْم َو َر ْح َمةُ هللا وبَ َركآتُه‬

‫َّحيم‬
‫َّحم ِن الر ِ‬
‫سم ہللاِ الر ٰ‬ ‫بِ ِ‬
‫ُشروع ہللَا کے پاک نام سے جو بڑا مہر بان نہايت رحم واال ہے‬
Discrete Structures
COSC-1103

Aqeel –Ur- Rehman


[email protected]
Lecture #
11
Functions
Relation vs Function

Relation is a way to map or pair an input with output, an


single input may have more then one output.

Function is a special type of relation in which there is only


one output for every input. There is no choice of multiple
outputs.
Injective Function
f
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)  x1 f(x1)
f(x2).
That is, ‘f’ is one - to - one if it map’s
distinct points of domain into the x2 f(x2)
distinct points of its co-domain.
Function not One-to-One
f

x1

f(x1)=f(x2) Y=co-domain of f
X=domain of f

x2

• A function f: X Y is not one-to-one iff there exist elements x1 and x2 such that
x1  x2 but f(x1) = f(x2).
• That is, if distinct elements x1 and x2 can found in domain of f then they have
the same function value.
f
Comparison
f g g

a 1 a 1 1 1
a a
b 2 b 2 2 2
b b
3 3 3 3
c c c4 c
4 4 4

X Y X XY Y X Y
• f is clearly one-to-one function, • g is not one-to-one because the
because no two different elements of elements a and c are mapped
X are mapped onto the same element onto the same element 2 of Y
of Y
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.
y
y=x2 y
y=x2
y
y

y x
y x
(-2,4) (2,4)
(-2,4) (2,4)

0 x -2 0 +2 x 0 x -2 0 +2 x
ONE-TO-ONE FUNCTION NOT ONE-TO-ONE FUNCTION
ONE-TO-ONE FUNCTION NOT ONE-TO-ONE FUNCTION
from R+ to R From R to R+
from R+ to R From R to R+
Surjective Function
• Let f: XY be a function. f is surjective
or onto if, and only if, y  Y,  x X
such that f(x) = y.

•  In other words every element of Y is


the image of some element of X.

• 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.
Function not ONTO
• A function f
f:XY is not onto iff there exists . .
y Y such that x  X, f(x) ≠y. .
• That is, there is some element in . .
Y that is not the image of any
element in X. .
.
X=domain of f Y=co-domain of f
Comparison
f
f g
Solution:
g
f is nota onto because 3 1f(x) for
a 1 any x in X. a
a onto because1each 1
g is clearly
2
elementb bof Y equals g(x)2for b
b some x in X. 2
2 c
c
as 1 = g(c);
2 = g(d) .33 d 3
c .3 c d
3 = g(a) = g(b)

X Y X X YY X Y
Graph Of Onto Function
y y=ex y y=ex
y = |x| y = |x|
y y
• A graph of a function ‘f’
is onto iff every
horizontal line intersects
the graph in at least one
O x point.O Ox x O x

ONTO FUNCTION NOT ONTO FUNCTION


ONTO FUNCTION
FROM NOT ONTO FUNCTION FROM
from R to R+ R to R from R to R+ R to R
Bijective Function
• A function f: XY that is both one-
to-one (injective) and onto
(surjective) is called a bijective
function or a one-to-one
correspondence.
One-to-One Correspondence
f
• The function f: XY 1
a
defined by the arrow
diagram is both one-to-one
and onto; hence a bijective b 2
function.

c .3

X Y
Graph Of Bijective Function
y y=x3
y y=x3
• A graph of a function ‘f’ is
bijective iff every horizontal line
intersects (0,5)
the graph at exactly (0,5)
one point.
x (5,0) O(0,0)
0
x (5,0) O(0,0)
0
BIJECTIVE FUNCTION
BIJECTIVE FUNCTION from R to R
BIJECTIVE FUNCTION
from R to R
BIJECTIVE FUNCTION from R to R
from R to R
Constant Function
f
• A function f:XY is a constant X Y
function if it maps (sends) all 1
elements of X to one element of Y .7
i.e.  x X, f(x) = c, for some c  2
Y.
3 .8

4 .9
Remark:
1. A constant function is one-to-one iff its domain is a singleton.
2. A constant function is onto iff its co-domain is a singleton.
Equality Of Functions
Suppose ‘f’ and ‘g’ are functions from X to Y.
Then ‘f’ equals ‘g’, written f = g, iff, 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
g(x)= for all x εR
Since the absolute value of a real number equals to square root of its square
i.e., |x| = for all x εR
Therefore f(x) = g(x) for all x εR
Hence f = g
Inverse Of A Function g-1 g-1
g g

.a .a1. 1.
1. .a
1. .a
.b .b2. 2.
2. .b
2. .b
.c .c3. 3.
3. .c
3. .c

Y Y X X
X YX Y
FUNCTION INVERSE INVERSE
FUNCTION

Remark: Inverse of a function may not be a function.


Inverse Of A Function
f f f-1 f-1
.a .a .a .a
1. 1. 1. 1.
.b .b .b .b
2. 2. 2. 2.
.c .c .c .c
3. 3. 3. 3.
d d d d

X X Z Z Z Z X X

INJECTIVE FUNCTION INVERSE


INVERSE
INJECTIVE FUNCTION

Note: Inverse of an injective function may not be a function.


Inverse Of A Function
h
-1
h h h-1

1. 1.
1. 1. .a .a
.a .a 2. 2.
2. 2. .b .b
.b .b 3. 3.
3. 3.

Y Y X X
X XY Y
INVERSE INVERSE
SURJECTIVE FUNCTION FUNCTION
SURJECTIVE

Note: Inverse of a surjective function may not be a function.


Inverse Of A Function
p
p
P-1 P-1
.a
.a 1.
1. .b 1.
1. .a .b 2.
2. .a 2.
2. .b c
.b c 3.
3. 3.
3. c
c
Y X
X Y Y X
X Y
INVERSE
BIJECTIVE FUNCTION INVERSE
BIJECTIVE FUNCTION
Note: Inverse of a Bijective 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.

x=f-1(y) f(x)=y

f-1

X=domain of f Y=co-domain of f
Inverse Function
f f-1

1. .6
.6 1.
2. 7
7 2.
3 8
8 3
4. 9
9 4.
X Y
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: (gof)(x) = g(f(x)) for all xX
• 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
Composition Of Functions Defined By Arrow
Diagrams X
f
Y
g
Z

Y
x
Let X = {1,2,3}, Y={a,b,c,d,e} 1
2
a
b y
z
3 c
Y={a,b,c,d}, and Z ={x,y,z}. d

e
Define functions; Then gof f: X Z is represented by the arrow diagram.

f:XY and g:X Z by the gof

arrow diagrams
X Z

x
1
y
2
z
3
Lecture recap
Any question…?
End of
Lecture
11

You might also like