RELATIONS &
FUNCTIONS
MADAM NOOR HANISAH BINTI MOHD GAZALI
LEARNING OUTCOMES
By the end of this lesson, students should be able to:
Determine the relations
Identify the function
Identify domain and range
Understand the properties of relation
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.1 Relations
3.2 Properties of
Relations
3.3 Equivalence
Relations and TABLE OF
Partitions
CONTENTS
3.4 Functions
3.5 Floor, Ceiling and
Trunc Functions
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.1 RELATIONS
Relations
• Is any set of ordered-pair numbers.
• An ordered-pair number is a pair of numbers that go together.
• The numbers are written within a set of parentheses and separated by a comma.
• Example 1 : (4, 7) STEP 1
is an ordered-pair number. The order is designated by the first element 4 and the
second element 7. The pair (7, 4) is not the same as (4, 7) because of the different ordering.
• Example 2: 𝑊 = STEP
1,20 , 22,100 , 3,150 , 4, 130
03
• The set of all first elements is called the domain of the relation. The domain of 𝑊 = 1,2,3,4
STEP 3
• The set of second elements is called the range of the relation. The range of 𝑊 = 120,100,150,130
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.1 RELATIONS
Relations
• Example 3 : Let 𝑋 = 4,6 , 𝑌 = 2,4,8,10,12 . 𝑅 = { 𝑥, 𝑦 , 𝑥𝑅𝑦 ↔ 𝑥|𝑦 𝑎𝑛𝑑 𝑥 ∈ 𝑋 𝑎𝑛𝑑 𝑦 ∈ 𝑌}.
∴ 𝑅 = { 4,4 , 4,8 , 4,12 , 6,12 }
𝐷𝑜𝑚 𝑅 = 4,6
STEP 1 𝑅𝑎𝑛 𝑅 = 4,8,12
STEP 2
03
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.1 RELATIONS
Example 4 : Let 𝐴 = 1,2,3,4,5 𝑎𝑛𝑑 𝑅 𝑖𝑠 𝑟𝑒𝑙𝑎𝑡𝑖𝑜𝑛 𝑜𝑛 𝑎𝑅𝑏 ↔ 𝑎 < 𝑏. Find:
a) List all the elements of R
b) Dom(R)
c) Ran(R)
STEP 1
Solutions:
03 STEP 2
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.1 RELATIONS
Example 5 : Let 𝐴 = 1,2,3,4,8 = 𝐵; 𝑎𝑅𝑏 ↔ 𝑎 = 𝑏. Find:
a) List all the elements of R
b) Dom(R)
c) Ran(R)
STEP 1
Solutions:
03 STEP 2
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.1 RELATIONS
Example 6 : Let 𝐴 = 1,2,3,4,8 𝑎𝑛𝑑 𝐵 = {1,4,6,9}; 𝑎𝑅𝑏 ↔ 𝑎|𝑏. Find:
a) List all the elements of R
b) Dom(R)
c) Ran(R)
STEP 1
Solutions:
03 STEP 2
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
EXERCISES 3.1
QUESTION 1
Let 𝐴 = 1,3,5,6,9 𝑎𝑛𝑑 𝐵 = 2,4,6,8 ; 𝑎𝑅𝑏 ↔ b < a. Find:
a) List all the elements of R
b) Dom(R)
c) Ran(R) STEP 1
Solutions:
03
STEP 2
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
EXERCISES 3.1
QUESTION 2
Let 𝐶 = 2,8,14,18 𝑎𝑛𝑑 𝑅 𝑖𝑠 𝑎 𝑟𝑒𝑙𝑎𝑡𝑖𝑜𝑛 𝑜𝑛 𝐶. 𝑥𝑅𝑦 ↔ 𝑥 − 𝑦 > 5. Find:
a) List all the elements of R
b) Dom(R)
c) Ran(R) STEP 1
Solutions:
03
STEP 2
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
EXERCISES 3.1
QUESTION 3
Let 𝐴 = 1.5,2,2.5,3 𝑎𝑛𝑑 𝐵 = 1,2,35,6 ; 𝑎𝑅𝑏 ↔ 𝑎 𝑑𝑖𝑣𝑖𝑑𝑒𝑠 𝑏. Find:
a) List all the elements of R
b) Dom(R)
c) Ran(R) STEP 1
Solutions:
03
STEP 2
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.2 PROPERTIES OF RELATIONS
Reflexive Relation
• A binary relation R is called reflexive if and only if 𝑎 ∈ 𝐴, 𝑎𝑅𝑎. So, a relation R is reflexive if it relates
every element of A to itself.
• Example:
STEP 1
STEP 2
03
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.2 PROPERTIES OF RELATIONS
Irreflexive Relation
• A binary relation R on a set A is called irreflexive if 𝑎𝑅𝑎 does not hold any 𝑎 ∈ 𝐴 .This means that
there is no element in R which is related to itself.
• Example:
STEP 1
STEP 2
03
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.2 PROPERTIES OF RELATIONS
Symmetric Relation
• A binary relation R on a set A is called symmetric if for all 𝑎, 𝑏 ∈ 𝐴 it holds that if 𝑎𝑅𝑏 then 𝑏𝑅𝑎 .
• In other words, the relative order of the components in an ordered pair does not matter-if a binary
relation contains an (a, b) element, it will also include the symmetric element (b, a).
• Example:
STEP 1
03
STEP 2
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.2 PROPERTIES OF RELATIONS
Antisymmetric Relation
• A binary relation R on a set A is called antisymmetric if there is no pair of distinct elements of A each
of which us related by R to the other.
• So, an antisymmetric relation R can include both ordered pairs (a, b) and (b, a) if and only if 𝑎 = 𝑏 .
• Example:
STEP 1
03 STEP 2
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.2 PROPERTIES OF RELATIONS
Transitive Relation
• A binary relation R on a set A is called transitive if for all 𝑎, 𝑏, 𝑐 ∈ 𝐴 it holds that if 𝑎𝑅𝑏 and 𝑏𝑅𝑐 , then 𝑎𝑅𝑐 .
• This condition must hold for all triples a, b, c in the set. If there exists some triple 𝑎, 𝑏, 𝑐 ∈ 𝐴 such that
𝑎, 𝑏 ∈ 𝑅 and 𝑏, 𝑐 ∈ 𝑅 , but (a, c) ≠ 𝑅, then the relation is not transitive.
• Example:
STEP 1
03 STEP 2
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.2 PROPERTIES OF RELATIONS
Partial Order Relation
• Reflexive
• Antisymmetric
• Transitive
STEP 1
Equivalence Relation
STEP 2
• Reflexive
• Symmetric
03 STEP 3
• Transitive
STEP 4
03
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.2 PROPERTIES OF RELATIONS
EXAMPLE 1
The binary relation 𝑅 = { 𝑎, 𝑎 , 𝑎, 𝑏 , 𝑎, 𝑐 , 𝑏, 𝑏 , 𝑏, 𝑐 , 𝑐, 𝑐 , 𝑑, 𝑑 } is defined on the set 𝐴 = {𝑎, 𝑏, 𝑐, 𝑑}.
Determine whether R is reflexive, irreflexive, symmetric, antisymmetric and transitive.
Solutions:
The relation R is reflexive since it contains all 4 pairs 𝑎, 𝑎 , 𝑏, 𝑏 , 𝑐, 𝑐 , (𝑑, 𝑑) ∈ 𝑅
STEP 1
The relation R is reflexive, so it cannot be irreflexive.
R is not symmetric because 𝑎, 𝑏 ∈ 𝑅, 𝑏𝑢𝑡 𝑏, 𝑎 ∉ 𝑅.
STEP 2
The relation R is antisymmetric. It contains 3 non-reflexive elements: 𝑎, 𝑏 , 𝑎, 𝑐 , 𝑏, 𝑐 . For each of
the elements, its reverse does not belong to R.
STEP 3
R is transitive. There is only one non-reflexive overlapping pair: 𝑎, 𝑏 𝑎𝑛𝑑 𝑏, 𝑐 . We see that
𝑎, 𝑏 , 𝑏, 𝑐 ∈ 𝑅, 𝑎𝑛𝑑 (𝑎, 𝑐) ∈4𝑅.
STEP
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.2 PROPERTIES OF RELATIONS
EXAMPLE 2
For question a through g, if 𝐴 = {1,3,5,7}. State whether the relation is reflexive, irreflexive, symmetric,
antisymmetric and transitive. Then state whether the relation is partial order or equivalence relation.
a) 𝑅 = { 1,1 , 1,3 , 3,1 , 3,3 , 5,5 , 5,7 , 7,5 , 7,7 } b) 𝑅 = { 1,3 , 1,5 , 1,7 , 3,5 , 3,7 , 5,7 }
Solutions:
STEP 1
STEP 2
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.2 PROPERTIES OF RELATIONS
EXAMPLE 2
For question a through g, if 𝐴 = {1,3,5,7}. State whether the relation is reflexive, irreflexive, symmetric,
antisymmetric and transitive. Then state whether the relation is partial order or equivalence relation.
c) 𝑅 = { 1,5 , 1,1 , 5,1 , 1,3 , 5,5 , 7,7 } d) 𝑅 = { 1,1 , 3,3 , 5,5 }
Solutions:
STEP 1
STEP 2
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.2 PROPERTIES OF RELATIONS
EXAMPLE 2
For question a through g, if 𝐴 = {1,3,5,7}. State whether the relation is reflexive, irreflexive, symmetric,
antisymmetric and transitive. Then state whether the relation is partial order or equivalence relation.
e) 𝑅 = { 1,5 , 7,3 , 3,7 , 5,1 , 3,3 } f) 𝑅 = { 1,3 , 1,5 , 5,1 , 1,1 , 5,3 , 1,7 , 7,3 , 5,7 }
Solutions:
STEP 1
STEP 2
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
EXERCISES 3.2
If 𝐴 = {1,2,3} and R is a binary relation on A. State whether the relation is reflexive, irreflexive,
symmetric, antisymmetric and transitive. Then state whether the relation is partial order or equivalence
relation.
a) 𝑅1 = { 1,2 , 2,1 , 1,3 , 3,1 }
b) 𝑅2 = { 1,1 , 2,2 , 3,3 , 2,3 , 3,2 }
STEP 1
c) 𝑅3 = 1,1 , 2,2 , 3,3 , 2,3
d) 𝑅4 = { 1,1 , 2,2 , 3,3 }
STEP 2
e) 𝑅5 = { 1,1 , 2,3 , 3,3 }
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.3 EQUIVALENCE & PARTITION
Definition Equivalence Relation
• A binary relation is an equivalence relation on a nonempty set S if and only if the relation is reflexive
(R), symmetric (S), and transitive (T).
STEP 1
Definition Equivalence Class
• Given an equivalence relation R over a set S, for any 𝑎 ∈ 𝑆 the equivalence class of a is the set
STEP 2
03
STEP 4
03
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.3 EQUIVALENCE & PARTITION
EXAMPLE 1: Equivalence Relation
STEP 1
STEP 2
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.3 EQUIVALENCE & PARTITION
EXAMPLE 2: Equivalence Relation
STEP 1
STEP 2
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.3 EQUIVALENCE & PARTITION
Definition Partition
• Let A be a set and 𝐴1 , 𝐴2 , … , 𝐴𝑛 be a non-empty subsets. The subsets form a partition P of A if
STEP 1
STEP 2
03
STEP 4
• There is a direct link between equivalence classes and partitions. For any equivalence relation on a
set A, the set of all its equivalence classes is a partition of A
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.3 EQUIVALENCE & PARTITION
EXAMPLE 3
Which of the following collections of subsets are partitions of {0,1,2,3,4,5}?
STEP 1
STEP 2
03
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.3 EQUIVALENCE & PARTITION
EXAMPLE 4
List all the partitions of the following sets:
STEP 1
STEP 2
Solutions:
03
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.3 EQUIVALENCE & PARTITION
EXAMPLE 5
STEP 1
Solutions:
STEP 2
03
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.3 EQUIVALENCE & PARTITION
EXAMPLE 5
STEP 1
Solutions:
STEP 2
03
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.4 FUNCTIONS
What is a Function?
• A function relates an input to an output.
• Its like a machine that has an input and an output. And the output is related somehow to input.
STEP 1
STEP 2 03
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.4 FUNCTIONS
Input, Relationship, Output
STEP 1
03
STEP 2
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.4 FUNCTIONS
Names
STEP 1
03
STEP 2
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.4 FUNCTIONS
Names
EXAMPLE :
STEP 1
03
STEP 2
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.4 FUNCTIONS
STEP 1
STEP 2
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.4 FUNCTIONS
STEP 1
STEP 2
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.4 FUNCTIONS
EXAMPLE :
STEP 1
STEP 2
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.4 FUNCTIONS
EXAMPLE :
STEP 1
STEP 2
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.5 FLOOR, CEILING & TRUNC
FUNCTIONS
Floor & Ceiling Functions
STEP 1
STEP 2
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.5 FLOOR, CEILING & TRUNC
FUNCTIONS
STEP 1
STEP 2
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.5 FLOOR, CEILING & TRUNC
FUNCTIONS
STEP 1
STEP 2
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.5 FLOOR, CEILING & TRUNC
FUNCTIONS
STEP 1
STEP 2
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.5 FLOOR, CEILING & TRUNC
FUNCTIONS
EXAMPLE FLOOR FUNCTIONS
STEP 1
STEP 2
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.5 FLOOR, CEILING & TRUNC
FUNCTIONS
EXAMPLE CEILING FUNCTIONS
STEP 1
STEP 2
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
3.5 FLOOR, CEILING & TRUNC
FUNCTIONS
DefinitionTrunc Functions
• The function trunc (for truncation) is another integer. This function “throw away” the
fractional part of a real number.
STEP 1
Example 1: What is Trunc (3.65)?
So, Trunc (3.65) = 3
STEP 2
Example 2: What is Trunc (5)?
So, Trunc (5) = 5
STEP 3
Example 3: What is Trunc (-7.22)?
So, Trunc (-7.22) = - 7
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
EXERCISES 3.5
STEP 1
STEP 2
STEP 3
STEP 4
MADAM NOOR HANISAH BINTI MOHD GAZALI
MADAM NOOR HANISAH BINTI MOHD GAZALI
QUOTE
Example Text : Get a modern PowerPoint Presentation that is beautifully
FOR designed. I hope and I believe that this Template will your Time, Money
and Reputation.
I hope and I believe that this Template will your Time, Money and
TODAY
Reputation. Easy to change colors, photos and Text. You can simply
impress your audience and add a unique zing and appeal to your Reports
and Presentations with our Templates. Get a modern PowerPoint
Presentation that is beautifully designed. I hope and I believe that this
Template will your Time, Money and Reputation.
MADAM NOOR HANISAH BINTI MOHD GAZALI
THANK YOU
MADAM NOOR HANISAH BINTI MOHD GAZALI