<<

DCS 1 Part 3 Functions :- Injective, Surjective and Bijective functions - Inverse of a function- Composition ​ :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: A function is a special case of . ​ ​ Definition: Let X and Y be any two sets. A relation f from X to Y is called a function if for ​ ​ ​ every x∈ X, there is a unique element y ∈ Y such that (x, y) ∈ f. ​ ​

For every x there should be unique y .i.e. x has only one .

A relation must satisfy two additional conditions to become a function. These conditions are: ​ ​ 1. Every x∈ X must be related to y ∈ Y. ○ Domain of f must be X 2. Uniqueness . Every x has only one y image ○ (x,y)∈ f ∧ (x,z)∈ f ⇒ y=z Function f from set X to Y can be expressed as: f: X→Y or

If (x,y) ∈ f then x is called an argument and Y is called image of x under f. ​ ​ ​ ​ (x,y) ∈ f is same as y=f(x) ​ f: x→y or

Domain of function f from X to Y is denoted as D ​ ​f . Df=X ​ ​

Range of function f is denoted as Rf is defined as:- ​ ​ ​ Rf=f(X) ​ ​ Range of f, Rf is defined as:- ​ ​ Rf={y| ∃x∊X ∧ y=f(x) } ∃means “there exists” ​ ​ Rf ⊆Y ​ ​ f:X → Y. Here set Y is called codomain of function f ​ ​

E.g. Let X={1,3,4} Y={2,5,6} Check whether following are functions from X to Y or not ​ (1)R1={(1,2),(3,5),(4, 2)} (2)R2={(1,2)(1,5),(3,2)(4,6)} (3)R3={(1,2),(3,2)} R1 is a function because every x has unique image ,

Domain of R={1,3,4}=X R2 is not a function because one of the x value 1 has two images since (1,2) and (1,5) R3 is not a function because domain of R3={1,3}≠X E.g. Find the domain,codomain and range of the function ​ S={1,2,3} T={a,b} f:S->T f={(1,a),(2,b),(3,a)}

Domain Df={1,2,3} ​ ​ Range Rf={a,b} ​ ​ Codomain=T={a,b}

E.g. 1 Let X = {1, 2, 3}, Y = {p, q, r}, f : X → Y ​ and f = {(1, p), (2, q), (3,q)} then f(1) = p f(2) = q f(3)= r.

Df={1,2,3} ​ ​ ​ Rf={p,q} ​ ​ ​ Codomain=Y={p,q,r} ​

E.g. 2: 2 If the function f is defined by f(x)=x +​ 1 on the set {−2, −1, 0, 1, 2}, find the range of f. ​ Ans. 2 f(−2) = (−2) +​ 1=5 2​ f(−1) = (−1) +​ 1 = 2 ​ f(0) = 0 + 1 = 1 f(1) = 1 + 1 = 2 f(2) = 4 + 1 = 5 f={(-2,5),(-1,2),(0,1),(1,2),(2,5) } So the range of f = {1, 2, 5}. Domain of f=x= {-2,-1,0,1,2}

2 E.g. Let X=Y=R and f(x)=x +​ 2 Df=R and Rf⊆R. Values are different and lie on a . So ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ this is a function.

E.g. Let X=Y=R set of real numbers(set of positive negative integers,rational numbers zero etc) ​ and let 2 f={(x,x )​ | x∊R} 2 ​ g={(x ,x)​ | x∊R} ​ 2 2 Here f is a function from X to Y f(x)= x ,​ because for every x there is only one x .​ ​ 2 ​ 2 But g is not a function from X to Y because for any a, we have (a ,a)​ and (a ,-a)​ in 2 2 ​ ​ g. This means that a ​ has two images a and –a. If a ​ i s 4 then a can be 2 and -2. But in a function ​ ​ for every x ϵX, there should be a unique image y ϵY. So g is not a function E.g. Let P is a set of all positive integers and f:P→P such that f(n)=n+1 where nϵP f(1)=2, f(2)=3 … … The function f is called Peano’s successor function. ​ ​

E.g. Let ​ f={(x,⌊x⌋)| x∊R ∧ ⌊x⌋ = the greatest integer less than or equal to x} ​ ​ ​ ​ g={{(x,⌈x⌉)| x∊R ∧ ⌈x⌉ = the least integer greater than or equal to x} ​ ​ ​ ​ Function f(x)=⌊x⌋is called floor of x. (whole number just before that ) ​ ​ ​ Function g(x)= ⌈x⌉ is called ceil of x. (whole number just after that ) ​ ​ ​ ​ f(3.6)=3 g(3.6)=4 f(-3.6)=-4 g(-3.6)=-3 E.g. If R is a set of real numbers identify which of the following relations define a function? 2 (1) f={(x,x )|x​ ∈R} ​ 2 Every real number has a unique square eg: -1 =1​ ​ So f is a function

2 (2) g={(x ,x)|x​ ∈R} ​ Real number can have more than one square root e.g. square root of 4 is -2 and 2 So (4,-2) ,(4,2) is in R here 4 has two images(y values) -2 and 2 So g is not a function

RESTRICTION AND EXTENSION If f : X → Y and A ⊆ X then f ∩(A ×Y) is a function g from A→ Y . g is called restriction of f ​ ​ ​ to A denoted as f/A. If g is a restriction of f then f is called extension of g. ​ ​ ​ ​ E.g. Let f : R → R. The function f(x)=|x| (Here |x| denote of x) ​ and R+ ⊆ R.and g:R+ → R ​ ​ R is a set of real numbers. R+ is a set of positive real numbers. Here g is a restriction of f. f is the extension of g.

TYPES OF FUNCTION 1. Onto(surjective): ​ 2. One-to-one(Injection) 3. Oneto-one onto(bijective) 1.Onto(surjective) ​ A mapping f : X → Y is called onto or surjective or surjection if range Rf=Y ​ ​ ​ ​ ​ Otherwise i.e . Rf≠Y then function is not into. ​ ​ ​ ​ ​ E.g. X={1,2,3} Y={a,b} f : X → Y f={(1,a),(2,b),(3,a)}

Here range Rf={a,b}=Y ​ ​ ​ So f is onto. ​ ​ E.g. X={1,2,3} Y={a,b,c} f : X → Y ​ g={(1,a),(2,b),(3,a)}

Here range Rf={a,b}≠Y So g is not onto but into. ​ ​ ​ ​ ​

2. One-to-one(Injection): A mapping f : X → Y is called one-to-one if distinct elements of X ​ ​ are mapped into distinct elements of Y , ​ i.e., f is one-to-one if x1 ≠ x2 ⇒ f(x1) ≠ f(x2) Or f(x1) = f(x2) ⇒ x1 = x2 for x1, x2 ∈ X. ⇒means “implies” or “”it means” ​ ​ ​ f(x1) = f(x2) ⇒ x1 = x2 is read as “if f(x1)=f(x2) then x1 =x2”

E.g. Let X={a,b,c} Y={1,2,3,4} f : X → Y

f={(a,2),(b,3),(c,4)} Here f is one-to-one(injection) f is not onto but f is into. 3. One-to-one onto(Bijective) ​ or one-to-one correspondence between two sets A mapping f : X → Y is called one-to-one onto(bijective) if it is both onto and one-to-one. ​ ​ ​ ​ ​ i.e. distinct elements of X are mapped into distinct elements of Y and Range of f, Rf=Y ​ ​ ​ ​ ​ E.g. Let X={1,2,3} Y={a,b,c} f :X→Y.

f={(1,b),(2,a),(3,c})

Domain of f={1,2,3}=X Each element in x is mapped to different element in Y. Range of f=(a,b,c}=Y So f is bijective(one-to-one onto)

E.g. Let X={a,b,c,k} and Y={1,2,3,4}.The function f :X→Y. Identify which of the following are ​ functions.Check whether they are onto,one-to-one or bijective.. Find the domain, range and co-domain of the function. 1)f={(a,1),(b,2),(c,3),(k,4) } Ans. f is a function from X→Y because here every element in X has unique image in Y and every element in X has image. Domain={a,b,c,k} Range={1,2,3,4}=Y Co-domain={1,2,3,4} Here distinct elements of X are mapped into distinct elements of Y. So this is one to one. ​ ​ ​ ​ Here Range set=Y So function is onto. So this function f is bijective(both one-to-one and onto).

2) g={(a,1),(c,2)} Here g is not a function since every element in X is not related to Y.Here b and k inX has no image in Y.

3) h={(a,1),(b,2),(b,3),(c,4),(k,2)} Here h is not a function since element b in X has more than one image in Y .(b,2 )and (b,3).

4) j={(a,1),(b,1),(c,1),(k,1)} j is a function. Here every element in X has unique image in Y. But a,b,c and k has same image inY i.e, 1 j is into.Not one-to-one Not onto. ​ ​ Domain={a,b,c,k} Range={1} Co-domain={1,2,3,4} Note :Range of a function may not be same as its co-domain. ​

Composition of function Let f : X → Y and g : Y → Z be two functions. ​ ​ ​

The composition relation gof is a relation from X→ Z ​ ​ gof is possible if and only if range of f is of domain of g. ​ Here range of f : X → Y is Y . domain of g : Y → Z is Y. ​ ​ ​ Here Y⊆Y .So gof is defined. Similarly, fog can be defined only if range of g : Y → Z i.e Z is a subset of domain of f:X →Y ​ ​ i.e X. Here If Z⊆X then only fog exists. E.g X={1,2,3} Y={p,q} Z={a,b} f :X→Y. f={(1,p),(2,p),(3,q)} g :Y→Z. g={(p,b),(q,b))} f={(1,p),(2,p),(3,q)} g={(p,b),(q,b))}

gof

(1,p)and (p,b) become (1,b) (2,p)and (p,b) become (2,b) (3,q)and (q,b) become (3,b)

So gof={(1,b),(2,b),(3,b)}

E.g. f={(1,2)(3,4)} g={(1,1),(3,2)} f={(1,2)(3,4)} g={(1,1),(3,2)}

gof gof does not exist.f={(1,2)(3,4)} g={(1,1),(3,2)} f={(1,2)(3,4)} g={(1,1),(3,2)}

fog

E.g. Let X={1,2,3} functions f={(1,2),(2,3),(3,1)} g={(1,2),(2,1),(3,3)} h={(1,1),(2,2),(3,1)} fof= {(1,3),(2,1),(3,2) } fohog = (foh)og=fo(hog) foh={(1,2),(2,3),(3,2)} ( from function h to f) fohog={(1,3),(2,2),(3,2)( from function g to foh)

Q Let function f:{(1,2),(3,4)} and g={(1,1),(3,2)} Find fog, gof Ans. fog ={(1,2)} gof is not defined because range of f={2,4} is not a subset of domain of g i.e. {1,3}. {2,4} ⊈{1,3}

Q.Let f(x)=x+2 g(x)=x-2 h(x)=3x for xϵR, R is set of real numbers. ​ Find gof, gog, foh,(foh)og Ans. 1. gof=g(f(x)) f(x)=x+2 Given So g(f(x))=g(x+2) But g(x)=x-2 Given So g(x+2)=(x+2)-2=x So gof={(x,x)|xϵR} 2. gog=g(g(x)) g(x)=x-2 Given So g(g(x))=g(x-2) Since g(x)=x-2 Given g(x-2)=(x-2)-2=x-4 So gog={(x,x-4)|xϵR} 3. (foh)og= (foh)og=fo(hog)=fohog fohog=f(h(g(x))) g(x)=x-2 Given So f(h(g(x)))= f(h(x-2)) h(x)=3x given So h(x-2)=3*(x-2)=3x-6 So f(h(x-2))=f(3x-6) f(x)=x+2 Given f(3x-6)=(3x-6)+2=3x-4 (foh)og={(x,3x-4)|xϵR}

2 Q. Let f : R → R be given by f(x)=-x ​ and g : R+ → R+ be given g(x)=√x ​ ​ ​ R+ is a set of non negative real numbers and R set of real numbers. Find fog. Is gof defined? Ans. 2 fog =f(g(x))=f(√x )=-(√x ) ​ =-x The function fog is defined from ​

Here range of function g i.e. R+ is a subset of domain in function f i.e R. So fog is possible But fog is not defined

Here range of f i.e. R is not a subset of domain of g i.e R+ R⊈ R+ So gof is not defined

Inverse function

-1 Let f : X → Y be a function then its reverse or of f is denoted as f or​ ​ ​ ​ ​ -1 f or​ :Y → X ​ ​ Q.X={1,2,3} Y={2,3,4} f : X → Y Let f={(1,2),(3,4),(2,3)} -1 f ={(2,1),(4,3),(3,2)}​ ​ ​

Q. X={1,2,3} Y={2,3,4} f : X → Y Let f={(1,2),(3,4),(2,2)} -1 -1 f is​ not a function because f ={(2,1),(4,3),(2,2)}​ ​ ​ ​ ​ Here 2 has more than one image and 3 has no image

2 E.g. g={(x,x )​ x∈R} R is real number. ​ 2 g has no inverse because inverse (x ,x)​ is not a function. -1 ​ 2 In g we​ can have (4,-2),(4,2) i.e more than one image(x) for same x ​ . ​ ​

Identity function

Consider function f : X → X Rule 1: ​ IX={(x,x)|x∈X} ​ ​ IXof=foIX=f ​ ​ ​ ​ Rule 2 f : X →Y foIX=f ​ ​

Rule 3 f : X →Y g : Y →X

-1 g=f ​ if and only if ​ gof=I ​X fog=I ​y Rule 4 -1 fof ​ =

E.g. X={1,2,3}

IX={(1,1,),(2,2),(3,3)} ​ ​ Y={4,5} f={(1,4),(2,5),(3,4)} foIX={(1,4),(2,5),(3,4)}=f ​ ​

-1 ● A function f is invertible if f ​ is a function. ​ ​ ​ ○ f is invertible only if it is one-to-one onto(bijective) ​ Q. f(x)=x3 ​ ​ g(x)=x1/3 ​ Prove thatf(x) and g(x) are inverse of each other. Ans. ​ -1 -1 We have to prove that g=f ​ and f=g ​ ​ Or fog is identity function 1/3 1/3 3 fog(x)=f(g(x))=f(x )=(x​ )​ =x=I​ X () ​ 3 3​ 1/3​ ​ ​ gof(x)=g(f(x))=g(x )=(x​ )​ =x=I​ X (Identity element) ​ ​ ​ ​ ​ So f and g are inverse of each other.

-1 -1 -1 Q.Prove that (gof) =f​ og​ ​ ​ ​ ​ Ans. Let x∈X y∈Y z∈Z f : X → Y and g : Y → Z ​ ​ ​ f : X → Y So y=f(x) g : Y → Z So z=g(y)

f g X → Y →Z

gof

So gof:X → Z and (x,z)∈gof------> (1)

-1 -1 f : X → Y So f :​ Y → X and x=f (y)​ -​ 1 -​1 g : Y → Z So g :​ Z → Y and y=f (z)​ ​ ​ f-1 ​ -1 -1 g ​ f ​ ​ Z → Y →X

-1 -1 f og​ -1​ -1​ So f og​ :Z​ →X and ​ ​ -1 -1 (z,x)∈ f og​ ------>​ (2) ​ ​

Since, (x,z)∈gof------> (1) -1 So (z,x) ∈(gof) ------>​ (3) ​

(3) and (2) are same

-1 -1 -1 (z,x) ∈(gof) and​ (z,x)∈ f og​ -1 -1​ -1 ​ ​ So (gof) =f​ og​ ​ ​ ​ Hence proved.

3 -1 Q.Let f(x)=x -2​ and f:R →R, R is set of real numbers. Find f ​ ​ Ans. 3 f(x)=x -2​ 3 ​ (x,x -2)​ ∈f 3 ​ -1 (x -2,x)​ ∈f ​ ​

⅓ (x,(x+2) )​ ∈f-1 ​ -1 ​ ​ ⅓ f (x)=​ (x+2) ​ ​ ​ Q. .Let f(x)=x+2 and f:R →R, R is set of real numbers. Find f-1 ​ Ans.​ f(x)=x+2 (x,x+2)∈f (x+2,x)∈f-1 ​

(x,(x-2))∈f-1 ​ -1 ​ f (x)=​ (x-2) ​ ​ 2 Q. Let f:R →R, R is set of real numbers. f(x)=-x ​ g:R+ →R+, R+ is set of positive real ​ numbers.​ g(x)=√x Find fog and gof. Ans. fog=f(g(x)) 2 =f(√x)=-(√x) =-x​ ​ gof is not defined because range of f i.e. R is not subset of domain of g i.e. R+ i.e. R⊈ R+