Download as pdf or txt
Download as pdf or txt
You are on page 1of 75

Module 2

Relations and Function


• Set is an unordered collection of objects, known as elements or members of the set. An element ‘a’ belong to a set
A can be written as ‘a ∈ A’, ‘a ∉ A’ denotes that a is not an element of the set A.

• Objects: Objects constituting a set are called its elements and we express the fact that ais an element of a set S,
symbolically as a ∈ S.(Pronounce as a belongs to S).,

• Since “object” is very general in scope, an element of a set may be letters, numbers or any symbol ordered pairs, or
even a set itself. Sets are denoted by capita letters A, B,C etc and its element by small letters a,b,c …Sets are either
be written by enumerating at its elements(listing method) or by a rule (rule method or set builder method)or by
statement method.
• (a) There are no particular order in a set, since it is only a collection of
elements i.e. A = [1,2,3] and B= [2,3,1] are both the same set. we say A= B.
• (b): Repetition of element in a set, since an element is taken only once i.e. A=
{1,2,2,3} and B = {1,2,3} are both the same sets.

• Representation of a Set
A set can be represented by various methods. 2 common methods used for representing set:

1. Roaster form or tabular form method.


2. Set Builder method.
• a) Roster or tabular form: In this form of representation we list all the
elements of the set within braces { } and separate them by commas.
• Example: If A= set of all odd numbers less then 10 then in the roster
from it can be expressed as A={ 1,3,5,7,9}.

• b) Set Builder form: In this form of representation we list the properties


fulfilled by all the elements of the set. We note as {x: x satisfies
properties P}. and read as 'the set of those entire x such that each x has
properties P.'
• Example: If B= {2, 4, 8, 16, 32}, then the set builder representation will
be: B={x: x=2n, where n ∈ N and 1≤ n ≥5}
Standard Notations:
x∈A x belongs to A or x is an element of set A.

x∉A x does not belong to set A.

∅ Empty Set.
U Universal Set.
N The set of all natural numbers.

I The set of all integers.


I0 The set of all non- zero integers.

I+ The set of all + ve integers.

C, C0 The set of all complex, non-zero complex numbers respectively.

Q, Q0, Q+ The sets of rational, non- zero rational, +ve rational numbers respectively.

R, R0, R+ The set of real, non-zero real, +ve real number respectively.
• Cardinality of a Sets:
• The total number of unique elements in the set is called the cardinality of
the set. The cardinality of the countably infinite set is countably infinite.

• Examples:
• 1. Let P = {k, l, m, n}
The cardinality of the set P is 4.
• 2. Let A is the set of all non-negative even integers, i.e.
A = {0, 2, 4, 6, 8, 10......}.
• As A is countably infinite set hence the cardinality.
Types of Sets Theory
• 1: Finite Set : A set with finite number of elements.
For example, A={x ∈ N, 3<x<9}
A={4,5,6,7,8}
• 2: Infinite Set : A set which contains infinite number of elements.
For example, A={x: x ∈ N, x is a multiple of 2}
A={2,4,6,8….}
• 3: Null Set/Empty Set/Void Set : A set which contains no elements.It is
denoted by ∅ or { }
∅ = { x : x ≠ x }, this set is empty, since there is no element which is not equal to itself.
For example, a = a, 2 = 2.
• 4: Singleton Set/Unit Set : A set which has only one element .
For example, S={a }
• 5: Universal Set : A set which consists of all the elements of the considering sets is said to be the Universal set
for those sets.
It is generally denoted by U or S.
• For example : Consider the following sets,
• A = {a, b, c, d, e} ; B = {x, y, z} and
• U = {a, b, c, d, e, f, g, h, w, x, y, z}
Here, U is the universal set for A and B, since U contains all the elements of A and B.
.6: Equal Sets –: When two sets consists of exactly same elements, whether in the same order, they are said to be
equal.
In other words, if each element of the set A is an element of the set B and each element of B is an element of A,
the sets A and B are called equal, i.e., A = B.
• For example, A = {1,2,3,4,5} and B = {1,5,2,4,3} , then A = B.
• 7: Equivalent Sets –: If the cardinalities of two sets are equal, they are called equivalent
sets.
• Example: If A= {1, 2, 6} and B= {p, q, r}, they are equivalent as cardinality of A is
equal to the cardinality of B. i.e. |A|=|B|=3

• 8: Disjoint Sets: Two sets A and B are said to be disjoint if no element of A is in B


and no element of B is in A.
Or
Two sets are said to be disjoint sets if they don’t have common elements.
• Example: R={a,b,c} and S = {k, p, m}
R and S are disjoint sets.

9: Overlapping Sets –: Two sets that have at least one common element are called overlapping sets.

Example: Let, A={1,2,6}


and B={6,12,42}
. There is a common element ‘6’, hence these sets are overlapping set
• 10: Subsets of a Given Set –
Suppose A is a given set. Any set B, each of whose elements is also an element of A, is called contained in A
and is said to be a subset of A.
The symbol ⊆ stands for “is contained in” or “is subset of”. Thus, if “B is contained in A” or “B is subset of
A”, we write
• B ⊆ A.
• When B is subset of A, we also say ‘A contains B’ or ‘A is superset of B. The symbol ⊇ is read for
“contains” this A ⊇ B means “A contains B”.

• Example : If A = (3, 5, 7), B = (3, 5, 7, 9) than A ⊆ B since every element of A is also an element of B. But
B ⊄ A since 9 ∈ B while 9 ∉ A
• 11: Proper Subset –
If B is a subset of A and B ≠ A, then B is said to be proper subset of A. In other words, if each element of B
is an element of A and there is at least one element of A which is not an element of B, then B is said to be a
proper subset of A. “Is proper subset of” is symbolically represented by ⊂.
• Also, the empty set ∅ is a proper subset of every set except itself.

• 12. Improper Subset – : Set A is called an improper subset of B if and only if A = B.


• Note : Every set is an improper subset of itself.
• 13.: Power Set – : The set of all subsets of a given set A, is said to be the power set of A. The
power set of A is denoted by P(A).
• If the set A= {a, b, c} then its subsets are ∅, {a}, {b}, {c}, {a, b}, {a, c}, {b, c} {a, b, c}.
• Therefore, P(A) = {∅, {a}, {b}, {c}, {a, b}, {a, c}, {b, c} {a, b, c} }.
Operations on Sets
• The basic set operations are:
• 1. Union of Sets: Union of Sets A and B is defined to be the set of all
those elements which belong to A or B or both and is denoted by A∪B.
A∪B = {x: x ∈ A or x ∈ B}
• Example: Let A = {1, 2, 3} B= {3, 4, 5, 6}
A∪B = {1, 2, 3, 4, 5, 6}.


• 2. Intersection of Sets: Intersection of two sets A and B is the set of all
those elements which belong to both A and B and is denoted by A ∩ B.
A ∩ B = {x: x ∈ A and x ∈ B}
• Example: Let A = {11, 12, 13}, B = {13, 14, 15}
A ∩ B = {13}.


• 3. Difference of Sets: The difference of two sets A and B is a set of all
those elements which belongs to A but do not belong to B and is
denoted by A - B.
A - B = {x: x ∈ A and x ∉ B}
• Example: Let A = {1, 2, 3, 4} and B = {3, 4, 5, 6} then
• A - B = {1,2} and B - A = {5, 6}


• 4. Complement of a Set: The Complement of a Set A is a set of all those
elements of the universal set which do not belong to A and is denoted by Ac.

Ac = U - A = {x: x ∈ U and x ∉ A} = {x: x ∉ A}


Example: Let U is the set of all natural numbers.
A = {1, 2, 3}
Ac = {all natural numbers except 1, 2, and 3}.
• 5. Symmetric Difference of Sets: The symmetric difference of two sets
A and B is the set containing all the elements that are in A or B but not in
both and is denoted by A ⨁ B i.e.
A ⨁ B = (A ∪ B) - (A ∩ B)
• Example: Let A = {a, b, c, d} , B = {a, b, l, m}
A ⨁ B = {c, d, l, m}


Algebra of Sets
• Sets under the operations of union, intersection, and complement satisfy various laws (identities)
which are listed in Table .

• Law of Algebra of Sets


Idempotent Laws (a) A ∪ A = A (b) A ∩ A = A

Associative Laws (a) (A ∪ B) ∪ C = A ∪ (B ∪ C) (b) (A ∩ B) ∩ C = A ∩ (B ∩ C)

Commutative Laws (a) A ∪ B = B ∪ A (b) A ∩ B = B ∩ A

Distributive Laws (a) A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C) (b) A ∩ (B ∪ C) =(A ∩ B) ∪ (A ∩ C)

c c c c c c
De Morgan's Laws (a) (A ∪B) =A ∩ B (b) (A ∩B) =A ∪ B

Identity Laws (a) A ∪ ∅ = A (c) A ∩ U =A


(b) A ∪ U = U (d) A ∩ ∅ = ∅
c c
Complement Laws (a) A ∪ A = U (c) U = ∅
c c
(b) A ∩ A = ∅ (d) ∅ = U
c c
Involution Law (a) (A ) = A
Relation and Function
Relation
• Let A and B be two Sets. A relation from A to B is a subset of the cartesian
product A*B.
i.e , A*B={(x,y): x ∈ A and y ∈ B}
R ⊆ A*B
For example, If A ={1,2,5}, B={2,4}
Then A*B ={(1,2), (1,4), (2,2),(2,4),(5,2),(5,4)} Ordered pair
1: Relation x<y
R={(1,2),(1,4),(2,4)}
2: Relation x=y
R={(2,2)}
Domain and Range of Relation
• Domain of Relation: The Domain of relation R is the set of elements in P
which are related to some elements in Q, or it is the set of all first entries
of the ordered pairs in R. It is denoted by DOM (R).
• Range of Relation: The range of relation R is the set of elements in Q
which are related to some element in P, or it is the set of all second
entries of the ordered pairs in R. It is denoted by RAN (R).
• Example: Let A = {1, 2, 3, 4} , B = {a, b, c, d}
R = {(1, a), (1, b), (1, c), (2, b), (2, c), (2, d)}.
Solution:
DOM (R) = {1, 2}
RAN (R) = {a, b, c, d}
Complement of a Relation
• Consider a relation R from a set A to set B. The complement of relation R
denoted by R is a relation from A to B such that
R = {(a, b): {a, b) ∉ R}.
• Example: Consider the relation R from X to Y
• X = {1, 2, 3} , Y = {8, 9}
R = {(1, 8) (2, 8) (1, 9) (3, 9)}
• Find the complement relation of R.

Solution:
X *Y = {(1, 8), (2, 8), (3, 8), (1, 9), (2, 9), (3, 9)}
Now we find the complement relation R from X x Y
• R = {(3, 8), (2, 9)}
Representation of Relations
• Relations can be represented in many ways. Some of which are as
follows:
• 1. Relation as a Matrix: Let P = [a1,a2,a3,.......am] and Q = [b1,b2,b3......bn] are
finite sets, containing m and n number of elements respectively. R is a relation
from P to Q. The relation R can be represented by m x n matrix M = [Mij], defined
as
• Mij = 0 if (ai,bj) ∉ R
1 if (ai,bj )∈ R
• Example Let P = {1, 2, 3, 4}, Q = {a, b, c, d}
• R = {(1, a), (1, b), (1, c), (2, b), (2, c), (2, d)}.
• The matrix of relation R is shown as fig:
• 2. Relation as a Directed Graph: There is another way of picturing a
relation R when R is a relation from a finite set to itself.
• Example
1.A = {1, 2, 3, 4}
2.R = {(1, 2) (2, 2) (2, 4) (3, 2) (3, 4) (4, 1) (4, 3)}
• 3. Relation as an Arrow Diagram: If P and Q are finite sets and R is a
relation from P to Q. Relation R can be represented as an arrow diagram
as follows.
• Draw two ellipses for the sets P and Q. Write down the elements of P and
elements of Q column-wise in two ellipses. Then draw an arrow from the
first ellipse to the second ellipse if a is related to b and a ∈ P and b ∈ Q.
• Example
1.Let P = {1, 2, 3, 4} , Q = {a, b, c, d}
R = {(1, a), (2, a), (3, a), (1, b), (4, b), (4, c), (4, d)
• 4. Relation as a Table: If P and Q are finite sets and R is a relation from
P to Q. Relation R can be represented in tabular form.
• Make the table which contains rows equivalent to an element of P and
columns equivalent to the element of Q. Then place a cross (X) in the
boxes which represent relations of elements on set P to set Q.
• Example
1.Let P = {1, 2, 3, 4} ,Q = {x, y, z, k}
R = {(1, x), (1, y), (2, z), (3, z), (4, k)}.
• The tabular form of relation as shown in fig:
Types of Relations
• 1. Reflexive Relation: A relation R on set A is said to be a reflexive if (a,
a) ∈ R for every a ∈ A.
• Example 1:
• If A = {1, 2, 3, 4} then R = {(1, 1) (2, 2), (1, 3), (2, 4), (3, 3), (3, 4), (4, 4)}.
Is a relation reflexive?
• Solution: The relation is reflexive as for every a ∈ A. (a, a) ∈ R, i.e. (1,
1), (2, 2), (3, 3), (4, 4) ∈ R.

• Example2:
• If A = {1, 2, 3, 4} then R1 = {(1, 1) (1, 2), (2, 1), (2, 2), (3, 1), (4, 4)}. Is a
relation reflexive?
• Relation R2 is not reflexive because the ordered pair (3,3) is not in R2
• 2. Irreflexive Relation: A relation R on set A is said to be irreflexive if
(a, a) ∉ R for every a ∈ A

• Example: Let A = {1, 2, 3,4} and R = {(1, 2), (2, 1), (3, 3), (4, 4)}. Is the
relation R irreflexive?
• Solution: The relation R is not irreflexive because (3,3) and(4,4) is
there in R
But R1={(1,2), (2,1)} is irreflexive because a ∈A, (a,a) ∉ R1
• 3. Symmetric Relation: A relation R on set A is said to be symmetric if (a,
b) ∈ R ⟺ (b, a) ∈ R.
• Example: Let A = {1, 2, 3} and R = {(1, 1), (2, 2), (1, 2), (2, 1), (2, 3), (3,
2)}. Is a relation R symmetric or not?
• Solution: The relation is symmetric as for every (a, b) ∈ R, we have (b, a)
∈ R, i.e., (1, 2), (2, 1), (2, 3), (3, 2) ∈ R.

• Example: R1={(1,1),(1,2),(1,3),(1,4)} is not symmetric because for(1,2)


there is no (2,1) in R1. Same is true for (1,3) and (1,4)
4: Antisymmetric Relation: A relation R on a set A is called
antisymmetric if ∀a ∀a ∀b((a, b) ∈ R ∧ (b, a) ∈ R → (a = b)). Whenever
we have (a , b)in R , we will never have (b, a) in R until or unless (a==b)

• Example1: Let A = {1, 2, 3} and R = {(1, 1), (2,1)}. Is the relation R


antisymmetric?
• Solution: The relation R={(1,1), (2,1)} on set A is antisymmetric
because (2,1) is in R but (1,2) is not in R
• Ex:
• Let A ={ 1,2,3,4}
• R1={(2,2),(2,3),(2,4),(3,2),(3,3),(3,4)}
• R2={(1,1),(1,2),(2,1),(2,2),(3,3),(4,4)}
• R3={(2,4),(4,2)}
• R4={(1,2),(2,3),(3,4)}
• R5={(1,1)(2,2),(3,3),(4,4)}
• R6={(1,3),(1,4),(2,3),(2,4),(3,1),(3,4)}
• R7= ∅
• R8=A*A
• 5. Transitive Relations: A Relation R on set A is said to be transitive if
(a, b) ∈ R and (b, c) ∈ R ⟺ (a, c) ∈ R.

Example1: Let A = {1, 2, 3} and R = {(1, 2), (2, 1), (1, 1), (2, 2)}. Is the
relation transitive?
• Solution: The relation R is transitive as for every (a, b) (b, c) belong to
R, we have (a, c) ∈ R i.e , (1, 2) (2, 1) ∈ R ⇒ (1, 1) ∈ R.
Example: Let A={1,2,3}
• R1={(1,1), (2,2)} Yes
• R2= { (1,2), (2,3)} No
• R3= { } Yes
• R4= {(1,1), (1,2),(2,1)} Yes
• 6. Asymmetric Relation: A relation R on a set A is called an
Asymmetric Relation if for every (a, b) ∈ R implies that (b, a)
does not belong to R.
• Example: A={ 1,2,3,4}
• R1= {(1,1), (1,2), (1,3)} is not an asymmetric relation because of(1,1)
R2={(1,2),(1,3),(2,3)} is an asymmetric relation
• 7. Identity Relation: Identity relation I on set A is reflexive, transitive
and symmetric. So identity relation I is an Equivalence Relation.

• 8. Void Relation: It is given by R: A →B such that R = ∅ (⊆ A x B) is a


null relation. Void Relation R = ∅ is symmetric and transitive but not
reflexive.

• 9. Universal Relation: A relation R: A →B such that R = A x B (⊆ A x B)


is a universal relation. Universal Relation from A →B is reflexive,
symmetric and transitive. So this is an equivalence relation.
Closure Properties of Relation
Equivalence Relations

• A relation R on a set A is called an equivalence relation if it satisfies


following three properties:

1.Relation R is Reflexive, i.e. aRa ∀ a∈A.


2.Relation R is Symmetric, i.e., aRb ⟹ bRa
3.Relation R is transitive, i.e., aRb and bRc ⟹ aRc.
• Ex:
• Let A = {1,2,3}
• R1= {(1,1),(2,2),(3,3)} No
• R2= { (1,1),(2,2)(3,3),(2,1),(1,2)} Yes
• R3= {(1,1), (2,2),(3,3),(3,2),(1,3)} No
• R4={ } No
Warshall’s Algorithm
Functions
• Let A and B be two non-empty sets . A function f from A to B is a set of
order d pairs f ⊆ A*B with the property that for each element ‘a’ in A there is a Unique element ‘b’
in B such that (a, b) ∈ f
• OR
• It is a mapping in which every element of set A is uniquely associated at the element with set B. The set of A is
called Domain of a function and set of B is called Co domain.
• The statement “ f is function from A to B” is represented symbolically by
• f: A →B or A →B
• A function can be represented pictorially as shown in fig:
•A B A B
A
1 A 1
B
2 B 2
C
3 C 3
D

•A B A B

A
1
A 1
B
2
B 2
C
3
3
D
Domain, Co-Domain, and Range of a Function:
• Domain of a Function: Let f be a function from P to Q. The set P is
called the domain of the function f.
• Co-Domain of a Function: Let f be a function from P to Q. The set Q is
called Co-domain of the function f.
• Range of a Function: The range of a function is the set of picture of its
domain. In other words, we can say it is a subset of its co-domain. It is
denoted as f (domain).
• If f: P → Q, then f (P) = {f(x): x ∈ P} = {y: y ∈ Q | ∃ x ∈ P, such that f (x) =
y}.
• Image of a Function: If(a,b) ∈ f, then f(a) =b, so ‘b’ is called the image
of ‘a’
• Pre-image of a Function: ‘a’ is called pre-image of ‘b’
Example: Find the Domain, Co-Domain, and Range of function .

Let x = {1, 2, 3, 4}
y = {a, b, c, d, e}
f = {(1, b), (2, a), (3, d), (4, c)

Solution:
Domain of function: {1, 2, 3, 4}
Range of function: {a, b, c, d}
Co-Domain of function: {a, b, c, d, e}
Pre-image: {1,2,3,4} and Image : { 1a,b,c,d}
Representation of a Function
• The two sets P and Q are represented by two circles. The function f: P
→ Q is represented by a collection of arrows joining the points which
represent the elements of P and corresponds elements of Q
• Example1:
1.Let X = {a, b, c} and Y = {x, y, z} and f: X → Y such that
2. f= {(a, x), (b, z), (c, x)}
• Then f can be represented diagrammatically as follows
• Example2: Let X = {x, y, z, k} and Y = {1, 2, 3, 4}. Determine which of the
following functions. Give reasons if it is not. Find range if it is a function.
1.f = {(x, 1), (y, 2), (z, 3), (k, 4)
2.g = {(x, 1), (y, 1), (k, 4)
3.h = {(x, 1), (x, 2), (x, 3), (x, 4)
4.l = {(x, 1), (y, 1), (z, 1), (k, 1)}
5.d = {(x, 1), (y, 2), (y, 3), (z, 4), (z, 4)}.
• Solution:
1.It is a function. Range (f) = {1, 2, 3, 4}
2.It is not a function because every element of X does not relate with some
element of Y i.e., Z is not related with any element of Y.
3.h is not a function because h (x) = {1, 2, 3, 4} i.e., element x has more
than one image in set Y.
4.d is not a function because d (y) = {2, 3} i.e., element y has more than
image in set Y
Types of Functions
• 1. Injective (One-to-One) Functions: A function ’f’ from set ‘A’ to set ‘B’
is one to one if no two elements in ‘A’ are mapped to same elements in
‘B’
• Note: x=y
• x<=y
• 2. Surjective (Onto) Functions: A function ‘f’ from set ‘A’ to set ‘B’ is
Onto if each elements in ‘B’ are mapped to atleast one element of’A’
• It is a Surjective Function, as every element of B is the image of some A
• Note: a=b or a<=b
In an Onto Function, Range is equal to Co-Domain.

• Example: Consider, A = {1, 2, 3, 4}, B = {a, b, c} and f = {(1, b), (2, a), (3,
c), (4, c)}.
• 3. Bijective (One-to-One Onto) Functions: A function which is both
injective (one to - one) and surjective (onto) is called bijective (One-to-
One Onto) Function.
• Note: |A|=|B|

Example:

Consider P = {x, y, z} Q = {a, b, c} and f: P → Q such that

f = {(x, a), (y, b), (z, c)}

The f is a one-to-one function and also it is onto. So it is a bijective function.


• 4. Into Functions: A function in which there must be an element of co-
domain Y does not have a pre-image in domain X.
• Example:
1.Consider, A = {a, b, c}
2. B = {1, 2, 3, 4} and f: A → B such that
3. f = {(a, 1), (b, 2), (c, 3)}
4.In the function f, the range i.e., {1, 2, 3} ≠ co-
domain of Y i.e., {1, 2, 3, 4}
• Therefore, it is an into function
• 5. One-One Into Functions: Let f: X → Y. The function f is called one-
one into function if different elements of X have different unique images
of Y.
• Example:
1.Consider, X = {k, l, m}
2. Y = {1, 2, 3, 4} and f: X → Y such that
3. f = {(k, 1), (l, 3), (m, 4)}
• The function f is a one-one into function
• 6. Many-One Functions: Let f: X → Y. The function f is said to be many-
one functions if there exist two or more than two different elements in X
having the same image in Y.
• Example:
1.Consider X = {1, 2, 3, 4, 5}
2. Y = {x, y, z} and f: X → Y such that
3. f = {(1, x), (2, x), (3, x), (4, y), (5, z)}
• The function f is a many-one function.
• 7. Many-One Into Functions: Let f: X → Y. The function f is called the
many-one function if and only if is both many one and into function.
• Example:
1.Consider X = {a, b, c}
2. Y = {1, 2} and f: X → Y such that
3. f = {(a, 1), (b, 1), (c, 1)}
• As the function f is a many-one and into, so it is a many-one into
function.

• 8. Many-One Onto Functions: Let f: X → Y. The function f is called
many-one onto function if and only if is both many one and onto.
• Example:
1.Consider X = {1, 2, 3, 4}
2. Y = {k, l} and f: X → Y such that
3. f = {(1, k), (2, k), (3, l), (4, l)}
• The function f is a many-one (as the two elements have the same image
in Y) and it is onto (as every element of Y is the image of some element
X). So, it is many-one onto function

Composition of functions
• Let f: A --> B and g: B --> C. The composition of f and g, denoted by gof (read as 'g of f') is a new function
from A to C and is given by (gof) (x) = g(f(x)) for all x in A. The composition gof first applies f to map A into B
and it then employs g to map B to C.

• Example: Let A={1,2,3}, B={s,t} and C={x,y} and f: A-->B,defined as f(1)=s,f(2)=s,f(3)=t and g:B-->C is defined as
g(s)=x,g(t)=y,
• then, gof: A-->C is defined by

• (gof) (1) = g(f(1)) = g(s) =x
• (gof) (2) = g(f(2)) = g(s) =x
• (gof) (3) = g(f(3)) = g(t) =y
• The composition of functions f(x) and g(x) where g(x) is acting first is represented by f(g(x)) or (f ∘
g)(x). It combines two or more functions to result in another function. In the composition of functions,
the output of one function that is inside the parenthesis becomes the input of the outside function. i.e.,
• In f(g(x)), g(x) is the input of f(x).
• In g(f(x)), f(x) is the input of g(x).
• We can understand this using the following figure:

• i.e., to find f(g(x)) (which is read as "f of g of x"), we have to find g(x) first
and then we substitute the result in f(x).
• Symbol of Composition of Functions
• The symbol of the composition of functions is ∘. It can also be
shown without using this symbol but by using the brackets. i.e.,
• (f ∘ g)(x) = f(g(x)) and is read as "f of g of x". Here, g is the inner
function and f is the outer function.
• (g ∘ f)(x) = g(f(x)) and is read as "g of f of x". Here, f is the inner
function and g is the outer function.
• Notes:
• 1) f: A →B g: B →C
• Range of f ⊆ Dom of g (for g o f)

• Range of g ⊆ Dom of f (for f o g)


• 2) In general , f o g f ≠ g o f
1: If f = { (1,2),(3,5),(4,1)}
g ={ (2,3),(5,1),(1,3)}
Write f o g and g o f

• Step 1: Dom of f ={1,3,4}


Range of f = { 2,5,1}
Dom of g ={2,5,1}
Range of g = { 3,1}
f(1)=2, f(3)=5,f(4)= 1
g(2)=3 , g(5)=1, g(1)= 3
• fog •gof
• f o g(2)= f(g(2))=f(3)= 5 • g o f(1)= g(f(1))=g(2)= 3

• f o g(5)= f(g(5))=f(1)= 2 • g o f(3)= g(f(3))=g(5)= 1

• f o g(1)= f(g(1))=f(3)= 5 • g o f(4)= g(f(4))=g(1)= 3

• f o g ={(2,5), (5,2), (1,5)} • g o f ={(1,3), (3,1), (4,3)}


If f: R →R
f(x) = x^2 -3x +2
find f o f(x)

• Solution:
• for f o f(x) =f (f(x))
• = f(x^2 -3x+2) let X
• X^2 -3X+2
• (x^2-3x+2)^2-3(x^2-3x+2)+2
• f o f(x) = x^4 -6x^3 +10x^2-3x
Consider the function f(x) = 2x-3. Find a formula for the composition functions
(i) 𝑓 2 = 𝑓 𝑜 𝑓 𝑎𝑛𝑑

(ii) ) 𝑓 3 = 𝑓 𝑜 𝑓 𝑜 𝑓

• Soln:
• (i) (f o f) (x) = f (f(x))
• = f(2x-3)
• = 2(2x-3)-3
• = 4x-6-3
• = 4x-9
• (i) (f o f o f) (x) = f (f(f(x)) )
• = f(f(2x-3)) = f(4x-9)
• = 2(4x -9)-3
• = 8x-18-3
• = 8x-21
Consider the function f(x) = 2x-3 and g(x) = x^2 + 3x + 5. Find a formula for the composition function
(i) g o f
(ii) f o g

• Soln:
• (i) g o f(x) = g(f(x))
• = g(2x-3)
• = (2x-3)^2 +3(2x-3)+5
• = 4x^2 -12x +9 + 6x -9 +5
• = 4x^2 -6x +5
• (ii) f o g(x) = f(g(x))
• = f(x^2 +3x +5)
• = 2 (x^2 +3x +5) -3
• = 2x^2 +6x +10 -3
• = 2x^2 + 6x + 7
Identity Functions
• The function f is called the identity function if each element of set A has
an image on itself i.e. f (a) = a ∀ a ∈ A.
• It is denoted by I.
• Example: Consider, A = {1, 2, 3, 4, 5} and f: A → A such that
1. f = {(1, 1), (2, 2), (3, 3), (4, 4), (5, 5)}.
• The function f is an identity function as each element of A is mapped
onto itself. The function f is a one-one and onto
Invertible (Inverse) Functions
• A function f: X → Y is invertible if and only if it is a bijective function.
• Consider the bijective (one to one onto) function f: X → Y. As f is a one to one, therefore, each
element of X corresponds to a distinct element of Y. As f is onto, there is no element of Y which is not
the image of any element of X, i.e., range = co-domain Y.
• The inverse function for f exists if f-1 is a function from Y to X.
• Example: Consider, X = {1, 2, 3}
1. Y = {k, l, m} and f: X→Y such that
2. f = {(1, k), (2, m), (3, l)
• The inverse function of f is shown in fig:

You might also like