Docsity

Functions-Discrete Mathematics-Lecture Handout, Exercises of Discrete Mathematics

Toggle sidebar
bg1
MTH001 โ€“ Elementary Mathematics
LEC URE # 1T 2
CT NCTION
Functions
INJE IVE FUNCTION or ONE-TO-ONE FU
or one-to-one if, and only if, โˆ€ x1,
o-one if it maps distinct
ain into the distinct points of the co-domain.
Let f: X โ†’Y be a function. f is injective
2 โˆˆX, then f(x1) โ‰  f(x2)That is, f is one-t x if x1 โ‰  x2
points of the dom
f
x
1 1
x
2
f(x )
f(x
2
)
A one-to-one function separates points.
FUNCTION NOT ONE-TO-ONE
A function f: X โ†’Y i ot one-to-one there exist es n iff lements x1 and x2 in such
e function value.
that x1 โ‰  x2 but f(x1) = f(x2).That is, if distinct elements x1 and x2 can found in
domain of f that have the sam
f
x
1
X=domain of f Y=co-domain of f
f(x
1
)=f(x
2
)
x
2
A function that is not one-to-one collapses points together.
-one functions?
EXAMPLE:-
Which of the arrow diagrams define one-to
Virtual University of Pakistan Page 70
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Functions-Discrete Mathematics-Lecture Handout and more Exercises Discrete Mathematics in PDF only on Docsity!

LEC TURE # 1 2

CT NCTION

Functions

INJE IVE FUNCTION or ONE-TO-ONE FU or one-to-one if, and only if, โˆ€ x1, o-one if it maps distinct ain into the distinct points of the co-domain.

Let f: X โ†’Y be a function. f is injective x 2 โˆˆX, if x1 โ‰  x2then f(x1) โ‰  f(x2)That is, f is one-t points of the dom

f

x 1 1

x 2

f(x )

f(x 2 )

A one-to-one function separates points.

FUNCTION NOT ONE-TO-ONE A function f: X โ†’Y i s not one-to-one iff there exist elements x 1 and x 2 in such

e function value.

that x 1 โ‰  x 2 but f(x 1 ) = f(x 2 ).That is, if distinct elements x 1 and x 2 can found in domain of f that have the sam

f

x (^1)

X=domain of f f(x^1 )=f(x^2 ) Y=co-domain of f

x (^2)

A function that is not one-to-one collapses points together.

-one functions?

EXAMPLE:-

Which of the arrow diagrams define one-to

f

a 1

b 2

c

X Y

a

b

c

X Y

g

f is clearly one-to-one function, because no two different elements of X are mapped onto the same element of Y. is not one-to-one because the elements a and c are mapped onto the same element 2 of Y.

LTERNATIVE DEFINITION FOR ONE-TO-ONE FUNCTION

S OLUTION:-

g

A

function f: X โ†’Y is one-to-one (1-1) iff โˆ€ x 1 , x 2 โˆˆX, if x 1 โ‰  x 2 then f(x 1 ) โ‰  f(x 2 ) i.e distinct elements of 1st^ set have their distinct images in 2nd^ set) he equivalent contra-positive statement for this implication isโˆ€ x 1 , x 2 โˆˆX, if f(x 1 ) = f(x 2 ), then x 1 = x (^2)

XAMPLE:-

Define f: R โ†’R by the rule f(x) = 4x - 1 for all x โˆˆR.Is f one-to-one? Prove or give a counter example. SOLUTION:- Let x 1 , x 2 โˆˆR such that f(x 1 ) = f(x 2 ) โ‡’ 4x 1 - 1 = 4 x 2 โ€“ 1 (by definition of f) โ‡’ 4 x 1 = 4 x 2 (adding 1 to both sides) โ‡’ x 1 = x 2 (dividing both sides by 4) Thus we have shown that if f(x 1 ) = f(x 2 ) then x 1 =x (^2) Therefore, f is one-to-one

EXAMPLE:- Define g : Z โ†’ Z by the rule g(n)=n^2 for all n โˆˆZ.Is g one-to-one? Prove or give a counter example.

SOLUTION:- Let n 1 , n 2 โˆˆZ and suppose g(n 1 ) = g(n 2 ) โ‡’ n 12 = n 22 (by defini on of g) โ‡’ either n 1 = + n 2 or n 1 = - n 2 (n 1 ) = g(n 2 ) does not imply n = n 2 always.

A
T
REMARK:-

f: X โ†’Y is not one-to-one iff โˆƒ x 1 , x 2 โˆˆX with f(x 1 ) = f(x 2 ) but x 1 โ‰  x 2

E

ti

Thus g (^1) As a counter example, let n 1 = 2 and n 2 = -2.

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 om a set with three elements to a set with two elements. TO-ONE FUNCTION

fr GRAPH OF ONE- A graph of a function f is one-to-one iff every horizontal line inter sects the graph in at most one point. EXAMPLE:-

y (^) y = x 2

-2 0 + 2 x

N O T O N E -T O -O N E F U N C T IO N

F ro m R to R +

y

y = x

x

O N E -T O -O N E F U N C T IO N

fro m R +^ to R

SURJECTIVE FUNCTION or ONTO 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. That is, f is onto if every element of its co-dom of some element(s) of its domain.i.e., co-domain of f = range of f

ain isthe image

Each element y in Y equals f(x) for at least one x in X

FUNCTION NOT ONTO A function 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.

f

X=domain of f Y=co-domain of f

EXAMPLE:-

Which of the arrow diagrams define onto functions?

As a counter example , let m = 0โˆˆ Z, then h(n) = 0 โ‡’ 4n-1 = 0 โ‡’ 4n = 1

Hence there is no integer n for which h(n) = 0.

n = โˆ‰ ฮ–

Accordingly, h is not onto. 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 x

x

N

y=e

O

ONTO FUNCTIO

from R to R+

NOT ONTO FUNCTION FROM

R to R

x

y

y = |x|

O

{1,5,9} and Y = {3,4,7}.Define g: X โ†’Y by specifying that 4

ne-to-one because each of the three elements of X are mapped to a different elements of Y by g. g(1) โ‰  g(5), g(1) โ‰  g(a), g(5) โ‰  g(a) nto as well, because each of the three elements of co-domain Y of g is the image of some

, 4 = g(9), 7 = g(1)

โˆˆP ({a,b,c}), f(A)= the number of elements in A.

EXERCISE:-

Let X = g(1) = 7, g(5) = 3, g(9) = Is g one-to-one? Is g onto? SOLUTION:- g is o

g is o element of the domain of g. 3 = g(5)

EXERCISE:- Define f: P({a,b,c})โ†’Z as follows: for all A a. Is f one-to-one? Justify. b. Is f onto? Justify. SOLUTION:-

a. f is not one-to-one because f({a}) = 1 and f({b}) = 1 but {a}โ‰  {b} se, there is no element of P({a,b,c}) that is mapped

etermi ive or surjective.

as g(x) = (x,x+1) UT

  1. = |-1| = 1 but 1 โ‰  -

d +a in Z such that

. ร— Z defined as g(x) = (x,x+1) g(x ) = g(x ) for x1, x2 โˆˆZ+

) = g(x2) then x = x . Z+^ ement of Z+.

b. f is not onto becau to 4 โˆˆZ. EXERCISE:- D ne if each of the functions is inject

a. f: Z โ†’Z+ define as f(x) = |x|

b g: Z โ†’ Z

- . +^ +^ ร— Z+ defined SOL ION: a. f is not injective , because f(1) = |1| = 1 and f(- i.e., f(1) = f(-1)

f is onto , because for every aโˆˆZ+, there exist โ€“a an f(-a) = |-a| = a and f(a) = |a| = a

b g: Z+^ โ†’ Z+^ +

Let (^1 ) โ‡’ (x1, x1 +1) = (x2, x2+1) (by definition of g) โ‡’ x1 = x2 and x1 + 1 = x2 + 1 (by equality of ordered pairs) โ‡’ x1 = x Thus if g(x 1 1 2 Hence g is one-to-one g is not onto because (1,1) โˆˆ ร—Z^ + is not the image of any el

BIJECTIVE FUNCTION or ONE-TO-ONE CORRESPONDENCE

A function f: Xโ†’Y that is both one-to-one (injective) an ndence.

d onto (surjective) is called a bijective

he arrow diagram is both one-to-one and onto; hence a bijective

function or a one-to-one correspo

EXAMPLE:-

The function f: Xโ†’Y defined by t function.

0 x

y (^) y=x 3

BIJECTIVE FUNCTION from R to R

(0,5)

(5,0) O(0,0)

BIJECTIVE FUNCTION o R

DENTITY FUNCTION ON A SET

from R t

I

iven a set X, define a function ix from X to X by ix(x) = x from all x โˆˆX.

agram

Prove that the identity function on X is bijective. OLUTION:- Let ix: X โ†’X be the identity function defined as ix(x) = x โˆ€โˆˆX

. ix is injective (one-to-one) Let ix(x1) = ix(x2) for x1, x2 โˆˆX โ‡’ x1 = x2 (by definition of ix) Hence ix is one-to-one. 2. ix is surjective (onto)

Let y โˆˆX (co-domain of ix) Then there exists y โˆˆX (domain of ix) such that ix (y) = y Hence ix is onto. Thus, ix being injective and surjective is bijective. N

G

The function ix is called the identity function on X because it sends each element of X to itself.

EXAMPLE:- Let X = {1,2,3,4}. The identity function ix on X is represented by the arrow di

EXERCISE:-

L et X be a non-empty set. S

CONSTANT FUNCTIO

A function f:Xโ†’Y is a constant function if it maps (sends) all elements of X to one element of Y i.e. x โˆˆX, f(x) = c, for some c โˆˆ Y XAMPLE:- he function f defined by the arrow diagram is constant.

โˆ€ E T 1 2 3

X Y

f

R
EMARK:-

on.

. A constant function is one-to-one iff its domain is a singleton.

  1. A constant function is onto iff its co-domain is a singlet