CSIT DS Functions
CSIT DS Functions
Compiled By
Ujjwal Rijal
[email protected]
[email protected] 1
Basic Concept of Function
[email protected] 2
Basic Concept of Function
[email protected] 3
Basic Concept of Function
[email protected] 4
Basic Concept of Function
[email protected] 5
Basic Concept of Function
[email protected] 6
Equal Function
Definition:
✓ Let A and B be the two sets and f: A → B and g: B → A
be the two functions. We say that f and g are equal
functions and write f = g iff f(a) = g(a) for all a ∈ A.
Here, iff denotes if and only if.
✓ If f and g are not equal functions, then we write f ≠ g.
In general sense,
✓ Two functions are equal if they have the same
domain and co-domain and their values are the same
for all the elements of the domain.
[email protected] 7
Identity Function
Definition:
✓ The function f: A → A is called the identity function if each
element of set A has an image on itself i.e. f(a) = a for all a ∈
A.
✓ It is denoted by IA .
Example: Consider set A = {1, 2, 3, 4, 5} and f: A → A
such that f = {(1, 1), (2, 2), (3, 3), (4, 4), (5, 5)}.
[email protected] 8
Real-valued Function
Definition:
✓A function f: A → R such that f(a) = R, a ∈ A, is called
a real valued function.
In general sense,
✓A real valued function is a function whose values are real
numbers. In other words, it is a function that assigns a
real number to each member of its domain.
✓In other words, if the domain and range of a function f
are the subsets of R (set of real numbers), then f is said
to be the real valued function of real variables or simply a
real function.
[email protected] 9
Integer-valued Function
[email protected] 10
Types of Function
[email protected] 11
Injective Function
(One-to-One)
o A function f from A to B (A → B) is one-to-one if for all
x1, x2 ∈ A such that f(x1) = f(x2) implies x1 = x2.
o We can express the one to one function f by using the
quantifiers as follows:
∀x1∀x2 ((f(x1) = f(x2)) → (x1 = x2)), where universe
of discourse is the domain of the function.
o In other words, a function “f” from A to B is called
injective if it maps distinct elements of A to the distinct
elements of B.
[email protected] 12
Injective Function
(One-to-One)
[email protected] 14
Surjective Function
(Onto Function)
o A function f from A to B (A → B) is an onto function if
every element of B is the image of some elements in A.
o We can express that “f” is surjective function using
quantifiers as follows:
∀y ∃x (f(x) = y)
o In other words, a function “f” from A to B is called
surjective if for every y in the co-domain B, there exists
at least one x in the domain A.
[email protected] 15
Surjective Function
(Onto Function)
[email protected] 16
Surjective Function
(Onto Function)
[email protected] 17
Bijective Function
(One-to-One Correspondence)
[email protected] 18
Bijective Function
(One-to-One Correspondence)
[email protected] 19
Inverse of Function
[email protected] 20
Inverse of Function
[email protected] 21
Inverse of Function
➢ Here, we can see that f-1 is not a function, since f-1(a) = {1, 2}.
[email protected] 22
Inverse of Function
𝐲 −𝐛
i.e. x = ∈ R
𝐚
𝐲 −𝐛 𝐲 −𝐛
and, f( =a) ( +b)
𝐚 𝐚
=y–b+b
=y
𝐲 −𝐛
∴ y is the image of .
𝐚
Thus, f is onto.
Hence, f is one-to-one and onto both, therefore, f-1 exists
𝐲 −𝐛
and is defined by f (y) =
-1 . Here, y is just a dummy
𝐚
variable and can be replaced by x, then the inverse of
𝐱 −𝐛
function f is given by, f-1(x) = .
𝐚
[email protected] 24
Composite Function
[email protected] 25
Composite Function
[email protected] 26
Composite Function
[email protected] 27
Composite Function
[email protected] 28
Composite Function
(Test Yourself)
[email protected] 31
Composite Function
(i). gof(x)
(ii). gof-1of(x)
(iii). hogof(x)
(Test Yourself)
[email protected] 32
Graph of Functions
[email protected] 33
Graph of Functions
[email protected] 34
[email protected] 35
[email protected] 36
[email protected] 37
[email protected] 38
[email protected] 39
[email protected] 40
[email protected] 41
[email protected] 42
[email protected] 43
[email protected] 44
[email protected] 45
[email protected] 46
[email protected] 47
[email protected] 48
[email protected] 49
[email protected] 50