Chapter 4✅
Chapter 4✅
DISCRETE
C h a p t e
MATHEMATICS r 4
Chapter 4: SETS, RELATIONS
AND FUNCTIONS
4.1 Derive sets and set operations
4.1.1 Explain with examples, the basic
terminology of functions, relations and sets
4.1.2 Define sets
4.1.3 Use set notation and operation on sets:
4.1.3a Union
4.1.3b Intersection
4.1.3c Disjoint
4.1.3d Difference
4.1.3e Complement
Chapter 4: SETS, RELATIONS
AND FUNCTIONS
4.1.4 Conduct Venn diagram to represent set
operations
4.1.5 Identify set properties based on De
Morgan's Law
4.1.6 Explain relations
4.1.7 Identify the properties of relations in
directed graph
4.1.8 Explain the equivalent relation:
4.1.8a Reflexive
4.1.8b Symmetriic
4.1.8c Transitive
BASIC TERMINOLOGY OF SETS AND
STANDARD NOTATION IN SETS
• A set is an unordered collection • The statement “𝒑 is an element
of objects. of 𝑨”or equivalently “𝒑 belongs
• The objectin a set are called the to 𝑨" is written 𝒑 ∈ 𝑨.
elements or members of the set. • • The statement “𝒑 is not an
• Capital letters like 𝑨 , 𝑩 , 𝑿 , 𝒀 , …… element of 𝑨” that is the negation
are used to denote sets and of 𝒑 ∈ 𝑨 is written 𝒑 ∉ 𝑨.
lowercase letters 𝒂, 𝒃, 𝒙, 𝒚, …… are
used to denote elements of sets.
BASIC TERMINOLOGY OF SETS AND
STANDARD NOTATION IN SETS
EQUAL SETS Example:
• If and only if their number of
elements and the member of A = {5,6,7},
elements are exactly same. B = {7,5,6},
• The order of elements and the C = {5,5,6,6,7,7}
repetition of elements does not have
any relevance here. Here, all the three sets, set A, set B and
set C are equal.
SPECIAL SYMBOLS FOR SETS
𝐍 = the set of positive integers : 1, 2, 3, ….
𝐙 = the set of integers : ….., -2, -1, 0, 1, 2, …..
𝐐 = the set of rational numbers
𝐑 = the set of real numbers
𝐂 = the set of complex numbers
EXAMPLE
List the members of these sets.
a) {𝑥 | 𝑎 𝑖𝑠 𝑟𝑒𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑠𝑢𝑐ℎ 𝑡ℎ𝑎𝑡 𝑥² = 1 }
b) {𝑥 | 𝑥 𝑖𝑠 𝑎 𝑝𝑜𝑠𝑖𝑡𝑖𝑣𝑒 𝑖𝑛𝑡𝑒𝑔𝑒𝑟 𝑙𝑒𝑠𝑠 𝑡ℎ𝑎𝑛 12 }
c) {𝑥 | 𝑥 𝑖𝑠 𝑡ℎ𝑒 𝑠𝑞𝑢𝑎𝑟𝑒 𝑜𝑓 𝑎𝑛 𝑖𝑛𝑡𝑒𝑔𝑒𝑟 𝑎𝑛𝑑 𝑥 < 100}
d) {𝑥 | 𝑥 𝑖𝑠 𝑎𝑛 𝑖𝑛𝑡𝑒𝑔𝑒𝑟 𝑠𝑢𝑐ℎ 𝑡ℎ𝑎𝑡 𝑥² = 2}
Solution:
a) {−1 , 1}
b) {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}
c) {0, 1, 4, 9, 16, 25, 36, 49, 64, 81}
d) Ø (empty set which means no element)
Example
Determine whether each of these pairs of sets are equal.
a) {1, 3, 3, 3, 5, 5, 5, 5, 5} , {5, 3, 1 }
b) {{1} , {1, {1}}
Solution:
a) Yes
b) No
Exercise A
• List the elements of the following sets;
𝑁 = {1, 2, 3…} .
here
a) 𝐴 ={ 𝑥 𝑥∈ 𝑁 𝑥 , 3 < 𝑥 < 10 }
b) 𝐵 = {𝑥 𝑥∈ 𝑁 𝑥 , 𝑖 𝑠 𝑒𝑣 𝑒𝑛, 𝑥 < 15 }
c) 𝐶 = {𝑥 𝑥∈ 𝑁 𝑥 , 4 + 𝑥 = 7}
𝑖𝑠 𝑎𝑛 𝑖𝑛𝑡𝑒𝑔𝑒𝑟},
26, 𝑥
𝑀 = {𝑥 ∶ 𝑥 𝑖𝑠 𝑎 𝑝𝑟𝑖𝑚𝑒 𝑛𝑢𝑚𝑏𝑒𝑟} ;
𝑁 = {𝑥 ∶ 𝑥 𝑖𝑠 𝑎 𝑚𝑢𝑙𝑡𝑖𝑝𝑙𝑒 𝑜𝑓 3} ;
𝑂 = {𝑥: 𝑥 𝑖𝑠 𝑎𝑛 𝑒𝑣𝑒𝑛 𝑛𝑢𝑚𝑏𝑒𝑟}
Exercise A cont...
3. List the element of the following sets:
a) {x: x ∈ N, 5 < x < 12}, where N = {1, 2,
3…}
b) {x: x ∈ N, x is even, x < 15}, where N = {1,
2, 3…}
c) {x: x ∈ N , 10 < x< 35, x with sum of digits
less than 6} where N = {1, 2, 3…}
Solution:
a) B ⊆ A; C ⊆ D
b)
EXAMPLE
Determine whether each of these statements is true or false.
a) 0 ∈ Ø
b) Ø ∈ {0}
c) 𝑥 ∈ {𝑥}
d) {𝑥} ⊆ {𝑥}
Solution:
a) False
b) False
c) True
d) True
Exercise B
Ø , 𝐴 = {1}, 𝐵 = {1, 3}, 𝐶 = {1, 5, 9},
• Consider the following sets :
a) Ø , 𝐴 b) 𝐴 , 𝐵 c) 𝐵 , 𝐶
of set.
e) 𝐶 , 𝐷 f) 𝐶 , 𝐸 g) 𝐷 , 𝐸
d) B , E
h) D , U
i. 𝐴 ⊆ 𝐵 and 𝐵 ⊆ 𝐶
2. Use a Venn Diagram to illustrate the relationship
ii. 𝐴 ⊆ 𝐷 and D⊆ 𝑈
OPERATION ON SETS
UNION OF THE SETS A AND B INTERSECTION OF THE SETS A
• Denoted by 𝑨 ∪ 𝑩 AND B
• Definition: the set that contains • Denoted by 𝑨 ∩ 𝑩
those elements that are either in 𝑨 • Definition: containing those
or in 𝑩, or in both. elements in both 𝑨 and 𝑩.
OPERATION ON SETS
a) 𝐴 ∩ 𝐵c
b) (𝐵 \ 𝐴)c
Solution
1.
a) {0, 1, 2, 3, 4, 5, 6 }
b) {3}
c) {1, 2, 4, 5}
d) {0, 6}
2.a) b)
EXAMPLE
List the members of these sets.
a) {𝑥 | 𝑎 𝑖𝑠 𝑟𝑒𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑠𝑢𝑐ℎ 𝑡ℎ𝑎𝑡 𝑥² = 1}
b) {𝑥 | 𝑥 𝑖𝑠 𝑎 𝑝𝑜𝑠𝑖𝑡𝑖𝑣𝑒 𝑖𝑛𝑡𝑒𝑔𝑒𝑟 𝑙𝑒𝑠𝑠 𝑡ℎ𝑎𝑛 12}
c) {𝑥 | 𝑥 𝑖𝑠 𝑡ℎ𝑒 𝑠𝑞𝑢𝑎𝑟𝑒 𝑜𝑓 𝑎𝑛 𝑖𝑛𝑡𝑒𝑔𝑒𝑟 𝑎𝑛𝑑 𝑥 <
100}
d) {𝑥 | 𝑥 𝑖𝑠 𝑎𝑛 𝑖𝑛𝑡𝑒𝑔𝑒𝑟 𝑠𝑢𝑐ℎ 𝑡ℎ𝑎𝑡 𝑥² = 2}
Solution:
a) {−1 , 1}
b) {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}
c) {0, 1, 4, 9, 16, 25, 36, 49, 64, 81}
d) Ø (empty set which means no element)
Exercise C
1. Given 𝐴 = {1, 2, 3, 4, 5} , 𝐵 = {4, 5, 6, 7} , 𝐶 = {5, 6,
7, 8, 9} , 𝐷 = {1, 3, 5, 7, 9} , 𝐸 = {2, 4, 6, 8} , 𝐹 = {1, 5,
9}.
a) 𝐴 ∪ 𝐵 e) 𝐶 ∪ 𝐹
Find:
b) 𝐵 ∩ 𝐷 f) 𝐸 − 𝐵
c) 𝐷 ∩ 𝐸 g) 𝐷\𝐴
a) 𝐴 ∪ 𝐵
ℎ}. Find :
b) 𝐴 ∩ 𝐵
c) 𝐴 − 𝐵
Exercise C cont...
3. The universal set,
U = {x: 10 < x < 35, x is an integer},
F = {x: x is a prime number},
G = {x: x is a multiple of 3}
H = {x: x < 20}.
BINARY RELATION
• Definition: relationships between the elements of two sets.
• A binary relation from 𝐴 to 𝐵 is a set 𝑅 of ordered pairs where the first
element of each ordered pairs comes from 𝐴 and the second elements come
from 𝐵.
IMPORTANT
Notation form:
*a 𝑹 b (a is R-related to b)
*a 𝑹 b (a is not R-related to b)
Domain: all first elements of the ordered pairs which belong to 𝑹
Range: the set of second elements in 𝑹
EXAMPLE
Let A=(1,2,3) and B=(x,y,z) and let R={(1,y),(1,z),
(3,y)}.Define the relation given in notation form.
State the domain and range.
Solution:
1 𝑹 y, 1 𝑹 z, 3 𝑹 y
1 𝑹 x, 2 𝑹 x, 2 𝑹 y
2 𝑹 z, 3 𝑹 x, 3 𝑹 z
Domain={1,3}
Range={y,z}
RELATION REPRESENTATION
1. GRAPHICALLY/ ARROW DIAGRAM
Example:
R= {(1, 1), (2, 4), (3, 9), (4, 16), (5, 25)}
1
RELATION REPRESENTATION
2. DIGRAPH (DIRECTED GRAPH) Example:
• It consists of set ‘V’ of vertices and R= {(1,2), (1,3), (1,4), (2,3), (2,4), (3,4)}
with the edges ‘E’. Here E is
represented by ordered pair of Digraph:
Vertices.
• In the edge (a, b), a is the initial
vertex and b is the final vertex.
• If edge is (a, a) then this is regarded
as loop.
RELATION REPRESENTATION
Example:
3. MATRICES Suppose that A = {1,2,3} and B = {1,2}.
• The relation R is represented by the R= {(2, 1), (3,1), (3,2)}
matrix 𝑀𝑅 = [𝑚ᵢj ] . In matrix form;
• The matrix representing R has a 1 as 𝑴ʀ =
[
00
its (i,j) entry when 𝑎𝑖 is related to 𝑏j 1𝟎
and a 0 if 𝑎𝑖 is not related to 𝑏j 𝟏1
Exercise D
1. What are the ordered pairs in the relation R
represented by the directed graph shown below?
a) a = b
b) a + b = 4
c) a > b
d) a divides b (a | b) (*it means b / a)
• We have two edges with opposite direction for each nodes. Therefore, it is
symmetric.
TRANSITIVE
• A binary relation R over a set A is called transitive iff For any x, y, z ∈ A, if xRy and
yRz, then xRz.
• • Look at the picture below;
EXAMPLE
𝑅₁ = {(1,1) , (1,2) , (2,1) , (2,2) , (3,4) , (4,1) , (4,4)} ;
Consider the following relations on {1, 2, 3, 4} :
Solution:
The relations 𝑅₃ and 𝑅₅ are reflexive because they both contain all
pairs of the form 𝑎, 𝑎 , namely (1,1) , (2,2) , (3,3) , (4,4) .
EXAMPLE
𝑅₁ = {(1,1) , (1,2) , (2,1) , (2,2) , (3,4) , (4,1) , (4,4)} ;
Consider the following relations on 1, 2, 3, 4 :
Solution:
The relations 𝑅₂ and 𝑅₃ are symmetric. The relations 𝑅₁ are not symmetric
The relations 𝑅₄ , 𝑅₅ and 𝑅₆ are antisymmetric.
EXAMPLE
𝑅₁ = {(1,1) , (1,2) , (2,1) , (2,2) , (3,4) , (4,1) , (4,4)} ; 𝑅₂ = {(1,1) , (1,2) , (2,1)}
Consider the following relations on 1, 2, 3, 4 :
R = {(1,1),(1,2),(1,4),(2,1),(2,2),(3,3),(4,1),(4,4)}
S = {(1,1),(1,3),(1,4),(3,4)}
T = {(1,2),(2,2),(2,3)}
Domain = {a, b, c, d}
Codomain = {r, s, t, u}
Range/Image = {r, s, u}
PROPERTIES OF FUNCTIONS
Example:
1. ONE-TO-ONE FUNCTION Determine whether the function f from {a,
• A function f is said to be one-to-one, b, c, d} to {1, 2, 3, 4, 5} with f(a) = 4, f(b) =
if and only if f(a) ≠ f(b) whenever a ≠ 5, f(c) = 1 and f(d) = 3 is one-to-one.
b.
• If different element in domain A has Solution:
distinct / it’s individual image The function f is
one-to-one.
PROPERTIES OF FUNCTIONS
2. ONTO FUNCTION
• Each element of B is the images of element of A (all codomain is an image of
domain)
PROPERTIES OF FUNCTIONS
3. COMPOSITE FUNCTION
• Let g be a function from the set A to the set B and let f be a function from the set B
to the set C. The composition of the functions f and g, denoted by f о g, is defined
by
(f о g)(a) = f (g (a))
• In symbol: 𝑔: 𝐴 → 𝐵, 𝑓: 𝐵 → 𝐶 = 𝑓 ∘ 𝑔: 𝐴 → 𝐶
• Composition function happened when codomain B is the domain in 𝑓: 𝐵 → 𝐶
EXAMPLE
Composition function 𝑓 ∘ 𝑔
EXAMPLE
Let f and g be the functions from the set of integers to the set of integers
defined by f(x) = 2x + 3 and g(x) = 3x + 2. What is 𝑓 ∘ 𝑔 and 𝑔 ∘ 𝑓?
Solution:
𝑓 ∘ 𝑔(𝑥) = f (g(x)) = f (3x + 2)
= 2 (3x + 2) + 3
= 6x + 4 + 3
= 6x + 7
𝑔 ∘ 𝑓 = g (f (x)) = g (2x + 3)
= 3 (2x + 3) + 2
= 6x + 9 + 2
= 6x + 11
EXAMPLE
Given f(x) = and fg(x) = 3x.
What is 𝑓 ∘ 𝑔 and 𝑔 ∘ 𝑓?
Solution:
Given f (x) =
fg (x) = ……................(1)
Given fg (x) = 3x……….(2)
= 3x
∴ 𝑔(𝑥) =
=
EXAMPLE
PROPERTIES OF FUNCTIONS
4. INVERSE FUNCTION
• If a function f from A to B is a one-to-one, then there is a function from B to A that
“undoes” f, that is: it sends each element of B back to the element of A that it came
from via f.
• The function is invertible if a function f is Onto function and at the same time it
also one-to-one function.
• The inverse function of f is denoted: f ⁻¹.
EXAMPLE
Let f be the function from {a, b, c} to {1, 2, 3} defined by f(a) = 2, f(b) = 3, and f(c) =
1. Is f invertible, and if it is, what is its inverse?
Solution:
The function f is invertible because it is a one-to-one. The inverse function f ⁻¹
reverse the correspondence given by f, so f ⁻¹(2) = a, f ⁻¹(3) = b, and f ⁻¹(1) = c. This
illustrated in figure below.
EXAMPLE
Given the function f(x) = , x ≠ 6. Find the value 𝒇⁻¹(3).
Solution:
Let 𝒚 = 𝒇⁻¹ (𝟑)
𝒇 (𝒚) = 𝟑
Substitute the coefficient x with y into f(x)
=𝟑
𝒚 + 8 = 3(𝒚 − 6) ; 𝒚 + 8 = 3𝒚 − 18
Find the value of 𝒚;
𝟑𝒚 − 𝒚 = 8 + 18
2𝒚 = 26; 𝒚 = 13
𝒚 = 𝒇⁻¹ (𝟑) → 𝒇⁻¹ (𝟑) = 𝟏𝟑
EXAMPLE
Given f(x) = 2 + 𝑥² and g ∘ 𝑓(x) = Step 2, substitute 𝑓⁻¹ (x) into gf(x)
Find g(x) ? ∴ 𝑔𝑓(𝑓−1(x)) =
𝑔(𝑥) =
Solution:
Step 1, find 𝑓⁻¹(x)
Let 𝑓⁻¹(x) =y
x = f(y)
x = 2 + 𝑦²
𝑦²= x-2
TIPS:
1- Find 𝒇⁻¹𝒙
𝑦 = √(x−2)
2-Substitute 𝒇⁻¹𝒙 into gf(x)
∴ 𝑓−1(x) = √(x−2)
Exercise F
• Given g = {(1,b), (2,c), (3,a)}, a function from X
= {1, 2, 3} to Y = {a, b, c, d} and f = {(a,x), (b,x),
(c,z), (d,w)}, a function from Y to Z = {w, x, y, z},
write f ∘ g as a set of ordered pairs and draw
the arrow diagram of f ∘ g.
• Let f and g be functions from the positive
integers to the positive integers defined by
equations f(n) = 2n + 1, g(n) = 3n – 1 . Find the
compositions f ∘ f , g ∘ g , f ∘ g , and g ∘ f.
• Given that the function f(x) = 4x + 1, find a
formula for f −1(x).
Exercise F cont…
4. Given that the functions g(x) = x – 2 and f (g(x))
= x² – 4x + 8. Find:
a) g(8)
b) The values of x if f (g(x)) = 13
c) The function f
d) g ⁻¹(-1)
Example:
What is the floor and ceiling of 5?
Solution:
The Floor of 2.31 is 2 & the Ceiling of
2.31 is 3
IMPORTANT SYMBOLS
• The symbols for floor and ceiling are like the square brackets [ ] with the top or
bottom part
• missing:
GRAPH OF THE FLOOR AND CEILING
FUNCTIONS
The graph of floor function The graph of ceiling function
Note:
a solid dot means "including" & an open dot means "not including"
Exercise G
1. Find these values.
a) ⌊ ̶1 ⌋
b) ⌈ 3 ⌉
c)
d) ⌊ 8.9 + 0.7 ⌋
e) ⌊ 8.9 ⌋ + ⌊ 0.7 ⌋
f) ⌊ 0.5 + ⌈ 1.3 ⌉ - ⌈ -1.3 ⌉ ⌋
g) ⌈ ⌊1.6 ⌋ + 2.3 -⌈1.1⌉ ⌉