UNIT-2 Functions: Dr. Krishna Keerthi Chennam
UNIT-2 Functions: Dr. Krishna Keerthi Chennam
Functions
a b
A B
• A function f from A to B is also written as f: A
B which is read as “ a function of A into B”
• Set A is called domain of the function f.
• Set B is called the co-domain of function f.
• Functions are also called mappings or
transformations.
f
3 -1
1 2
Domain= {0,1,3}
0 3
Range or Co-Domain=
{-1,2}
A B
Graphical Representation of
Function
• Functions can be represented graphically in
several ways:
f A B
• •
f • •
a• • • y
b •
•
• •
x
A
B Graphj Plo
Like Venn hgf t
diagrams
Image and Preimage
It is not a
function
It is not a because a1 has
function two images b1 It is a function
because a3 has and b3
no image
• Figure (iii) is an example of a function. Since
the given function maps every element of A
with that of B.
• In figure (ii), the given function maps one
element of A with two elements of B (one to
many).
• Figure (i) is a violation of the definition of the
function. The given function does not map
every element of A.
Examples on Function
Which relation mapping represents a function?
Fig-1 Fig-2
3 -1 2 2
1 2 -1 3
0 3 3 -2
0
A B A B
x 1 a x a x
y 2 b y b y
z 3 c z c z
It is not a
It is a Function Function
Because
It is a Function
element b has
no
image
DOMAIN,CO-DOMAIN,IMAGE,PRE-
IMAGE, RANGE
• If f: AB, and f(a)=b (where a A & b B),
then:
– A is the domain of f.
– B is the co-domain of f.
– b is the image of a under f.
– a is a pre-image of b under f.
• In general, b may have more than one pre-
image.
– The range RB of f is {b | a f(a)=b }.
3
8
• Example: if the function f is defined by f(x)=
x2+1 on the set {-2, -1, 0, 1, 2 }. Find the
range of f.
Sol:
f(x)= x2+1
f(-2)=(-2)2+1=4+1=5
f(-1)=(-1)2+1=1+1=2
f(0)=(0)2+1=0+1=1
f(1)=(1)2+1=1+1=2
f(2)=(2)2+1=4+1=5
Range of function f is {1,2,5}
Types of Functions
• One to One(1-1) function(Injective)
• Onto function(Surjective)
• Bijective function(One to One and onto
function
• Many to one function
• Constant function
• Identity function
One-to-One(Injective) Function
• A function f: AB is called one-to-one (1-1) or
injective, or an injection, if distinct element of set A
are mapped into distinct elements of set B.
• Example:
• • • •
• • •
• • • •
• • •
• • •
• • •
• • • •
• •
•
Not one-to- Not even
One-to- one a
one function!
4
3
Onto (Surjective) Functions
• A function f : AB is called onto or surjective or
surjection if and only if for every element b ∈ B
there is an element a ∈A such thatf(a)=b.
• A function f : AB is called onto or surjective or
surjection, if the range Rf = B.
•
• • • • • • • •
• • • • • • •
• • •
• • • • •
• • •
• • • • •
• •
•
Onto Not Onto Both 1-1 1-1 but
(but not 1-1) (or not 1-1) and onto not onto
4
5
Bijection function
• A function f : AB is called One-to-One Onto or
bijective or bijection if and only if function f is both
one-to-one and onto.
In the beside fig: a1,
a2, a3 and a4 elements
in set A have unique
images b4, b3, b2, b1 in
set B respectively,
f
hence f is one-to-one
In the beside fig: b1,
b2, b3 and b4 elements a4,
in set inB set have
A
respectivel
preimages hence f
y,
a3,onto.
a2, a1 is
Hence f is
bijective
because f is one-to-one
4 and onto
6
• A function f : AB is bijective, then A and B
have same number of elements.
• A function f : AB is invertible if and only if
f is one-to-one and onto
• Consider the below function f, f is not bijective
because f is not one-to-of ne and f is not onto.
Identity Function
• A function f : AA is called the identity function if
the image of every element of set A is itself, in this
case f(A)=A.
• Identity function defined on a set A is usually
denoted by IA or 1A
• Note that the identity function is both one-to-one and
onto (bijective).
f
3 3
1 1
0 0
A A
Constant Function
• A function f : AB is called a constant
function if all the elements of set A have the
same image in B.
• From the below diagram, f(A)=4
In the beside fig:
3 f
3, 1, 0 elements
1 4 in set A have the
0 Image same 4
Hence in set B f
is a constant
function
A B
Many to One function
• A function f : AB is called a Many-to-one
function if one or more elements of set A is
mapped to one element in set B.
f g
x f(x g(f(x)
) )