Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
53 views

UNIT-2 Functions: Dr. Krishna Keerthi Chennam

This document defines and provides examples of different types of functions. It begins by defining a function as a relation where each input is uniquely mapped to an output. It then defines and compares one-to-one, onto, and bijective functions. It provides graphical representations and examples of each. The document also defines and gives examples of identity, constant, and many-to-one functions. Key terms like domain, co-domain, image, and preimage are introduced and illustrated with examples.

Uploaded by

Parinita Marella
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views

UNIT-2 Functions: Dr. Krishna Keerthi Chennam

This document defines and provides examples of different types of functions. It begins by defining a function as a relation where each input is uniquely mapped to an output. It then defines and compares one-to-one, onto, and bijective functions. It provides graphical representations and examples of each. The document also defines and gives examples of identity, constant, and many-to-one functions. Key terms like domain, co-domain, image, and preimage are introduced and illustrated with examples.

Uploaded by

Parinita Marella
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

UNIT-2

Functions

Dr. Krishna Keerthi Chennam


FUNCTION
• Let A and B be any two sets. A relation f from A to B
is called a function if for every a ∈A there is a
unique element b ∈B such that (a , b) ∈f.
(OR)
• Let A and B be any two nonempty sets. A function
from A into B is a relation that associates with each
element of A exactly one element of B.
f

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

In Fig-1: Element x has


FIG-1 image element 3, element
y has image element 1 and
X element z has image
1
element 2.
In Fig-1: Element 1 has
Y 2 preimage Y, element 2
has preimage Z and
z 3 element 3 has preimage
X
Which of the following is a function?

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

Fig-1 is a function but Fig-2 is not a


function because -1 has two
images 3 and -2
Examples on function

FIG-1 FIG-2 FIG-3

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: AB, 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 RB 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: AB 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:

In the beside fig:


f a1, a2, a3 and a4
elements in set A
have unique
images b1, b3,
b2, b4 in set B
respectively,
hence f is one-to-
one
4
2
Examples on One-to-One function
• Graph representations of functions that are
(or not) one-to-one:

• • • •
• • •
• • • •
• • •
• • •
• • •
• • • •
• •

Not one-to- Not even
One-to- one a
one function!
4
3
Onto (Surjective) Functions
• A function f : AB 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 : AB is called onto or surjective or
surjection, if the range Rf = B.

In the beside fig:


f f b1, b2, b3 and b4
elements in set B
have preimages
a4, a3, a2, a1 in
set A
respectively,
hence f is onto
Illustration of Onto
• Some functions that are or are not onto
their codomains:


• • • • • • • •
• • • • • • •
• • •
• • • • •
• • •
• • • • •
• •

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 : AB 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 : AB is bijective, then A and B
have same number of elements.
• A function f : AB 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 : AA 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 : AB 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 : AB is called a Many-to-one
function if one or more elements of set A is
mapped to one element in set B.

f In the beside fig:


3, and 1
3 elements in set
1 4 A have the
5 image 4 in set B
0 hence f is a
Many-to-one
A B function
Composition of Functions
• The term "composition of functions" (or "composite function")
refers to the combining together of two or more functions in a
manner where the output from one function becomes the input
for the next function.
• A composite function is created when one function is substituted
into another function.
• Let f: X → Y and g: Y → Z be two functions. The composition
of f and g is a new function from X to Z is denoted by
(gof):X→Z is given by
(gof)(x)=g(f(x)) for all x ∈A
• gof is read as “g composed with f of x" or “g of f of x".
Fig: go
f
f g

f g

x f(x g(f(x)
) )

Composition of functions f and g

1. gof is read as “g composed with f of x“ or “g of f of x“


2. fog is read as “f composed with g of x“ or “f of g of x".
• gof is called the left composition of g with f or relative product of
functions f and g.
• When dealing with composition, always start with the function on the
right g(f(x).
Example-1: Given f (x) = 5x + 1 and g (x) = 3x - 2. find out (fog)(x) and
(gof)(x).
Sol: (fog)(x)=f(g(x)) (gof)(x)=g(f(x))
=f(3x-2) =g(5x+1)
=5(3x-2)+1 =3(5x+1)-2
=15x-10+1 =15x+3-2
=15x-9 =15x+1
Example-2: Given f (x) = 3x2 + 4x + 7 and g (x) = x + 1.
Sol: i. (gof)(x)=g(f(x)) =g(3x2 + 4x +7)
= (3x2 + 4x + 7)+1= 3x2 + 4x +8
ii. (fog)(x)=f(g(x)) =f(x + 1)
= 3(x+1)2 + 4(x+1) + 7
= 3(x2 +2x+1)+ 4x +4+7
= 3x2 +6x+3+ 4x +4+7
= 3x2 +10x+14
Example-3: Given f (x) = x2 - 1 and g (x) = 3x + 2.
Find out (fog)(2),(gof)(4),(gog)(-1),(fof)(3)
Sol: (fog)(2)=f(g(2))=f(3(2)+2)=f(8)=(8)2-1=63
(gof)(4)=g(f(4))=g((4)2-1)=g(15)=3(15)+2=47
(gog)(-1)=(g(g(-1))=g(3(-1)+2)=g(-1)=3(-1)+2=-1
(fof)(3)=f(f(3))= f(((3)2-1)=f(8)= )=(8)2-1=63
Example-4: Consider f, g and h, all functions on the
integers, by f (n) =n2, g (n) = n + 1 and h (n) = n - 1.
Determine (i) hofog (ii) gofoh (iii) fogoh.
Sol:(i) (hofog)(n)=h(f(g(n)))
=h(f(n+1))
=h((n+1)2)
= ((n+1)2)-1
=n2+2n+1-1
=n2 +2n
(ii) (gofoh)(n)=g(f(h(n)))
=g(f(n-1))
=g((n-1)2)
= ((n-1)2)+1=n2 -2n+1+1=n2 -2n+2
iii. (fogoh)(n)= f(g(h(n)))
= f(g(n-1))
= f(n-1+1)
= f(n)
= n2
Example-5: Let X={1,2,3} ,Y={p, q} and Z={a, b} also let f: X → Y
be defined by f={(1,p),(2,q),(3,q)} and g: Y → Z be defined by
g={(p, b),( q, b)}. Find gof.
Sol: gof(1)=g(f(1))=g(p)=b gof(2)=g(f(2))=g(q)=b
gof(3)=g(f(3))=g(q)=b gof={(1,b),(2,b),(3,b)}
Example-6: Let X={1,2,3} and f,g,h and s be functions from X to
X given by
f={(1,2),(2,3),(3,1)} g={(1,2),(2,1),(3,3)}
h={(1,1),(2,2),(3,1)} s={(1,1),(2,2),(3,3)}
Find fog,gof,fohog, sog, gos, sos and fos.
Sol:
fog={(1,3),(2,2),(3,1)}
gof={ (1,1),(2,3),(3,2)}
fohog= fo (hog)= fo{(1,2),(2,1),(3,1)}={(1,3),(2,2),(3,2)}
sog={(1,2),(2,1),(3,3)}
gos={(1,2),(2,1),(3,3)}
sos={(1,1),(2,2),(3,3)}
fos={(1,2),(2,3),(3,1)}
Note: Composition of functions is Associative.
if f: A → B , g: B → C and h: C → D are thefunctions,
then ho(gof)=(hog)of
since f: A → B , g: B → C, then gof: A → C
since gof: A → C, h: C → D, then ho(gof): A→ D
now hog: B → D, f: A → B , then (hog)of ): A → D
therefore ho(gof)=(hog)of
Inverse of a function
• Let f and g are two functions. if f: A → B and g: B → A, then
the function g is called the inverse of the function f if and only
if gof=IA and fog=IB, where IA is the identity function on A and
IB is the identity function on B.
• g is called an inverse of f and we write it as g=f-1
• Example-1: Let A={1,2,3,4} ,f and g are two functions
defined from A to A is given by f={(1,4),(2,1),(3,2),(4,3)} and
g={(1,2),(2,3),(3,4),(4,1)}. Prove that f and g are inverse of
each other.
Sol: we check that
(gof)(1)=g(f(1))=g(4)=1= IA
(gof)(2)=g(f(2))=g(1)=2= IA
(gof)(3)=g(f(3))=g(2)=3= IA
(gof)(4)=g(f(4))=g(3)=4= IA
(fog)(1)=f(g(1))=f(2)=1= IA
(fog)(2)=f(g(2))=f(3)=2= IA
(fog)(3)=f(g(3))=f(4)=3= IA
(fog)(4)=f(g(4))=f(1)=4= IA
Thus, for all x ∈A, we have (gof)(x)= IA(x) and (fog)(x)= IA(x).
Therefore, g is an inverse of f and it also follows that f is
an inverse of g.
Example-2: Consider the function f: R → R defined by
f(x)=2x+5. Let a function g: R → R be defined by
g(x)=1/2*(x-5). Prove that g is an inverse of f.
Sol: we check that, for any element x ∈R,
(g o f)(x)=g(f(x))=g(2x+5)=1/2* (2x+5-5)=1/2*2x=x= IR(x)
(f o g)(x)=f(g(x))=f(1/2*(x-5)=2(1/2* (x-5)+5=x= IR(x)
Thus, for all x ∈R, we have (gof)(x)= IR(x) and (fog)(x)= IR(x).
Therefore, g is an inverse of f and it also follows that f is
an inverse of g.

You might also like