Notes-unit II - Functions
Notes-unit II - Functions
Input(Elements)-Output(Images)
Introduction
Definition
1) Akash 01.09.2002
2) Anuraghav 03.10.2002
4) Sanjiv 20.03.2002
Pictorially
X f Y
x y
x
called the codomain. The set of images of all elements of X , is called the
range of f .
Examples of Functions
1.
2.
3)
a 1
b 2
c 3
d 4
4.
1.
2.
3.
The given relation is not a function since the element 2 in X has two
images in Y . Also, elements 3 and 4 do not have images
4.
II. Determine whether or not each of the following relations are functions
with domain {1,2,3,4} If any relation is not a function. Give reasons.
Solution
a) R1 is not a function, since there are 2 pairs (3,1) and (3,3). which
means that the element 3 has two images. That the image is not unique.
X ={Z},
x=-2, Y=11
x=-1, y=8
x=0, y=7,
x=2, Y=11
x=1, y=8
the relation y x 7 .
2
Range = {7,8,11,16,23,...}.
not unique.
Solution
c) Function
d) Not a function.[y = 1 - x ]
2
Representation of Functions
f= {(-1,2),(0,3),(5,2)}
4. Graphical representation
Note:
The following graph does not represent a function since there can be two
pre-images for one image.
Exercise
Result
1. Find all functions from {a, b} to {0,1}. Also find the range of each function.
Solution. By the above result there are 22 = 4 functions from {a, b} to {0,1}.
They are
a 0
b 1
a 0
b 1
2. Find all functions from {a, b} to {0,1,2}. Also find the range of each
function.
Solution. By the above result there are 32 = 9 possible functions from
{a, b} to {0,1,2}.
They are
f1 = {(a,0),(b,0)} f2 = {(a,0),(b,1)} f3= {(a,0),(b,2)}
f4 = {(a,1),(b,0)} f5 = {(a,1),(b,1)} f6 = {(a,1),(b,2)}
f7 = {(a,2),(b,0)} f8 = {(a,2),(b,1)} f9 = { (a,2),(b,2)}
The range set is given by
Rf0 = {0}, Rf1 = {0,1}, Rf3 = {0,2}
Rf4 = {0,1}, Rf5 = {1}, Rf6 = {1,2}
Rf7 = {0,2}, Rf8 = {1,2}, Rf9 = {2}
3. Find all functions from {a, b, c} to {0,1}. Also find the range of each
function.
Solution. By the above result there are 23 = 8 functions from {a, b} to {0,1,2}.
They are
The range is
TYPES OF FUNCTIONS
Equivalently
f(x) = f(y) x = y
Bijective function
Examples
1)
Range{x,y,w}≠B
The function f is not one-one, since the elements 1 and 4 of A have same
images in B.
Range{x,y,z}=B
Hence f is bijective.
1. 𝑓(𝑥) = 𝑓(𝑦) → 𝑥 = 𝑦
2. For quadratic and cubic equations solve and check the existence of the
solution (image).
f(x) y x g(y) .
a) f : R R defined by f(x) x2 11 .
b) f : Z Z defined by
f(x) x2 2 .
Solution.
a) To check f is 1-1
To check onto
y f(x) x 2 11 x 2 y 11 x y 11 .
R ={..... -13,-12,......-4,-3,-2,-1,0,1,2,3,4,......}
b) Given f : Z Z
To check f is 1-1
f(x)=f(y) implies x =y
Hence f is 1-1.
To check f is onto
logically approaching we note that f(1) =-(2-3)2= -1 and f(2) =-(4-3)2= -1 , but
1 2 . Therefore f is not injective.[not 1-1]
To check onto
1
y f(x) (2x 3)2 2x 3 y x (3 y ) .
2
Hence for positive real values of y, x is not defined. Therefore f is not surjective.
To check onto
j
(j is even)
2
f : Z Z, f(j) is 1-1 and onto function
j 1 ((j is odd)
2
Solution.
{(0,0),(1,0),(2,1),(3,1),(4,1),(5,2)...... (-1,-1),(-2,-1),(-3,-2),(-4,-2),..}
Solution.
R f = {0,1,2,3} = codomain
and hence it is onto. Also the function maps different values to different
values and hence f is one-one.
x
6. S.T. the function f : R → R defined by f(x)= is one-to-one and
x4
onto .
x
Given that f : R → R is defined as f(x)= .
x4
x y
Let f(x)=f(y) then =
x4 y4
4x =4 y ⇒ x = y
∴ f is one-to-one .
x
i.e., y =
x4
y(x +4)=x
4y
∴ For any y in co domain R , in domain R is the pre-image except
1- y
y=1, ∴ f is onto.
f is bijective.
x =y/2(y-2)
Solution .
NXN= (1,2),(1,1),(1,4),.....
N={0,1,2,.....}
8) Determine
f : Z Z Z, defined by f(m, n) 2m 3n where m,n Z Z
is one-one and/or onto function with justification.
Solution.
Here
f(1,3) = f(4,1) = 11
f(m, n) =2m + 3n = k
Obviously m = -k and n = k
COMPOSITION OF FUNCTIONS
2+3, 2-3
Sets:
union, intersection
Definition
Note
1. g f : A C
g: B ----C f: A-----B
Points to remember
To find g f(x) ,
1. First check the possibility of the existence of g f based on the functions f and
g.
Example.
2
f :R R and g : R R . Check whether g f possible or f g possible
g f is not defined
f g :R----R2
g: R----R f: R-----R2
f: R2------R2 g: R2----R2
f. g: R2------R2 possible
f: R2------R2 g: R2----R2
2. g f =g[f(x)] First find the image of x under f and then find the image of
f(x) under g.
4. g f is (read as 'g ' of 'f') is called as relative product of the functions f and
5. Inverse (f-1) of the functions can be obtained by reversing the elements in all
the ordered pairs.
Example
Solution. f g : A B
g : B C by
(g f ) : A C
Property 1:
Proof.
RHS
Thus the domain and codomain of h◦(g◦f) and those of (h◦g)◦f are the
same.
h◦(g◦f)(x)=h(z)
∴ h◦(g◦f)=(h◦g)◦f
Property 2:
g f : A C is an injection.
g f : A C is a surjection.
bijection.
Examples.
a) Verify whether f g g f .
From (3) and (4) g f 1 {(2,3), (1,4), (4,1), (5,5), (3,2)} ---(6)
1
From (3) and (4) f g1 {(3,2), (5,1), (1,5), (2,3), (4,4)} --------(7)
1
1 1 1 1 1
From (5),(6),(7), it is observed that (f g) g f f g
Solution.
Also f h g: R R
1
(f g)(x) f[g(x)] f 2 f [( x 2 1) 1 ] (x2 1)3 4(x2 1)1
x 1
Also h(x) x 4
(f g) [h(x)] (f g) [x4 ] (x8 1)3 4(x8 1)1 (1)
1
(g h)(x) g[h(x)] g[x4 ]
x 1
8
1
f [(g h)(x)] f[ ] f[(x8 1)1 ] (x8 1)3 4(x8 1)1 (2)
x 1 8
Answer:
( f o g)(x) = f (g(x))
= f (–x2 + 5)
= 2(–x2 + 5) + 3
= –2x2 + 10 + 3
= –2x2 + 13
(g o f )(x) = g( f(x))
= g(2x + 3)
= –(2x + 3)2 + 5
= –(4x2 + 12x + 9) + 5
= –4x2 – 12x – 9 + 5
= –4x2 – 12x – 4
7)
If f ( x) 2 x 5 and g ( x) 5 x 3 , find ( g f )( x) .
2
9)
Given f ( x) 2 3 x x , g ( x) 2 x 1 , find ( f g )( x)
2
Exercise problems
f = {(1,2),(2,2),(3,4),(4,1)}, g={(1,4),(2,3),(3,1),(4,2)}
3) Verify that ( f g ) h f ( g h)
1
i) f, g,h :R R defined by f(x) x 2, g(x) , h(x) 3
x2 1
ii) f, g,h : z z defined by f(x) x 1, g(x) 3x, h(x) 1
Definition.
i.e. g f x I A x and f g x I B x
i.e., g f x x and f g y y
1
The inverse of f is denoted by f .
Theorem:
1
Theorem : A function f : A B is invertible i.e., f exists, if and only if
1
Let f : A B be a bijection. Then there exists a function f : B A such
1
that f f I B and f 1 f I A . Then f 1 is called the inverse of f .
1
Then f : B A is given by
To check f is bijective:
f(x)=f(y) x=y
x-2=y-2 x=y
Onto:
f(x)=y=x-2x=y+2
y=-1 x=1
y=1 x=3
y=2 x=4
y=5 x=7
Therefore f is onto
Hence f is bijective
1
Then f : B A is given by f 1 ( x) x 2
[ f ( x) x 2 =y implies x =y+2]
Steps to find the inverse of a function
Example:
f-1(x)=x-3/2
Example:
5
f ( F ) ( F 32)
9
9
f 1 (C ) C 32
5
5 9C
f ( F ) ( F 32) C ( F 32) 9C / 5 F 32
9 5
9C
That is f (C ) 32
1
5
Example
Then 3x 2 y
ie., 3x y 2
y 2
x= x belongs to R, f is onto
3
or, x 3
y 2 x 2
f 1(y) Thus we have. f 1 :R R, f 1 (x)
3 3
1
Note: The graphs of f (x) and f ( x ) for the above example are:
1
We can see that the graph of the f ( x ) is a reflection of the f (x) about the line
y x .This will always be the case with the graphs of a function and its inverse.
g f 1
f 1 g1
Example:
and h( x) x 4
1)
Y={3,7,11,15,...}
Finding inverse
x
2)S.T. the function f : R → R defined by f(x)= is one-to-one and
x4
onto and hence find the inverse.
x
Given that f : R → R is defined as f(x)= .
x4
A function f is one-to-oneif
f(x1)=f(x2) ⇒ x1 = x2
x y
Let f(x)=f(y) then =
x4 y4
4x =4 y ⇒ x = y
∴ f is one-to-one
x
i.e., y = f(x)=
x4
y(x +4)=x
xy +4y = x
x(y−1) =−4y
4y
x=
1- y
4y
∴ For any y in co domain R , in domain R is the pre-image.
1- y
∴ f is onto.
4y
Now y = f(x) ⇒ x = f−1(y) =
1- y
4x
∴ f−1(x)=
1- x
3) Show that the function f(x)=x3 and g(x)=x1/3 for xϵR are inverses of
each other.
∴ f ◦g = I .........(1)
f = g−1 or g = f−1.
x -2
4) S.T. f : R−{3} → R−{1}given by f(x)= is a bijection and find its
x -3
inverse.
Let f(x)=f(y)
x -2 y -2
=
x -3 y -3 (x-2)(y-3)=(x-3)(y-2)
xy−2y−3x +6=xy−2x−3y +6
x -2
=y
x -3
⇒ x−2=xy−3y
⇒ x−xy=2−3y
x(1−y) =2−3y
2 - 3y
x=
1- y for all y in R-{1}
2-3 y
is the pre-image of y under f.
1-y
∴ f is onto
2 - 3x
f−1 : R−{1}→ R−{3}is given by f−1(x)=
1- x
Permutation Functions
Then
Thus, if f is a permutation of a finite set 𝐴 = {𝑎1 , 𝑎2 , 𝑎3 , … , 𝑎𝑛 }, then the
sequence 𝑓(𝑎1 ), 𝑓(𝑎2 ), … , 𝑓(𝑎𝑛 ) is just a rearrangement of the elements of
A.
1 2 3 1 2 3 1 2 3
p1 p2 p3
1 2 3 1 3 2 2 1 3
1 2 3 1 2 3 1 2 3
p4 p 2 p
3 1 3 1 2
5 6
3 2 1
2) Let A = {1,2,3,4}, f : A → A given by f(1) = 2, f(2) = 1, f(3) = 4,
f(4) = 3. Write this in permutation notation.
Solution:
1 2 3 4
p
2 1 4 3
1 2 3
3) A ={1,2,3}Find the inverse of permutation p
2 3 1
Solution
1 2 3
inverse of p p 1
3 1 2
1 2 3 1 2 3
4) Let p1 p2 find p2 p1
2 1 3 3 1 2
p1 : 12 3
↓ ↓ ↓
2 1 3
↓ ↓ ↓
p2 : 1 3 2
1 2 3 1 2 3
p2 p1 3 2 1
1 3 2 p1.p2 =
1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6
p1 , p 2 2 3 1 5 4 6 , p 3 6 3 2 5 4 1
3 4 1 2 6 5
1 1 1 1
find i)p1 and p2 ii) p1 p2 iii) (p2 p1 ) p3 iv)p3 (p2 p1 )
1
a b c d e f a b c d e f a b c d e f
p1 , p , p
2 b c a e d f 3 f c b e d a
c d a b f e
1 1 1 1
i)p1 and p2 ii) p1 p2 iii) (p2 p1 ) p3 iv)p3 (p2 p1 )1
Solution
1 1 2 3 4 5 6
i) p1
3 4 1 2 6 5
1 1 2 3 4 5 6
p2
3 1 2 5 4 6
1 1
p1 p2
ii)To find
1 1 2 3 4 5 6
p2 :
3 1 2 5 4 6
1 1 2 3 4 5 6
p1
-1 3 4 1 2 6 5
p1 : 1 3 4 6 2 5
Therefore
1 1 1 2 3 4 5 6
p1 p 2
1 3 4 6 2 5
1 2 3 4 5 6 1 2 3 4 5 6
p1 , p2 2 3 1 5 4 6
3 4 1 2 6 5
Therefore
1 2 3 4 5 6
(p2 p1 )
1 5 2 3 6 4
To find (p2 p1 ) p3
1 2 3 4 5 6
p3 : 6 3 2 5 4 1
1 2 3 4 5 6
(p2 p1 )
1 5 2 3 6 4
p2 p1 : 4 2 5 6 3 1
Therefore
1 2 3 4 5 6
(p2 p1 ) p3
4 2 5 6 3 1
iv) Find p3 (p2 p1 )
1
1 2 3 4 5 6
From iii) (p2 p1 ) ,
1 5 2 3 6 4
Therefore
1 2 3 4 5 6
(p 2 p1 )-1
1 3 4 6 2 5
To find p3 (p2 p1 )
1
1 2 3 4 5 6
Given p3
6 3 2 5 4 1
1 2 3 4 5 6
(p2 p1 )-1
1 3 4 6 2 5
p3 : 6 2 5 1 3 4
Therefore
1 2 3 4 5 6
p3 (p2 p1 )1
6 2 5 1 3 4
Examples:
1. Let
2. Consider the rotations and reflections of a square represented visually
as four
Cyclic Permutation
A cyclic permutation (or cycle) is a permutation of the elements of
some set X which maps the elements of some subset S of X to each other
in a cyclic fashion, while fixing (that is, mapping to themselves) all other
elements of X.
P= (1 3 5) 2 (4 6) is a cyclic permutation
To write this permutation in cyclic notation, we start at the upper left-
hand corner with 1 and write (1 and then follow it with its image P(1) = 3,
that is (13. Next, note that P maps 3 into 5, so we write (135. Then P
maps 5 back into the original 1 so we have our first cycle (135).
We then continue on with 2 (next unused element in the first row) and
observe that P maps 2 into itself so we have a 1-cycle (2). Finally, we see
that P maps 4 into 6 so we write (46 and since 6 maps back into 4 we
have our final cycle, the 2-cycle (46). Hence P is written in what is called
the product of three cycles; a 3-cycle, a 1-cycle, and a 2-cycle,
Examples:
(1 2) (1 4) (1 5) (1 6) - Even permutation
(1 2 4 5 6) (3)
Disjoint Cycles
Two cycles of a set A are said to be disjoint if no element of A appears in
both the cycles.
Example: The cycle (1,2,5) and (3,4,6) are disjoint whereas the cycles
(1, 2, 5) and (2,4,6) are not.
Transpositions
A permutation that interchanges two elements of a set and leaves all
others unchanged is called a transposition.
A cycle of length 2 is called a transposition.
If P is a transposition of A, then 𝑃𝑜𝑃 = 𝐼𝐴 , the identity permutation of A.
For example
odd permutation
Cycle to transpositions
No. of transpositions=4