Set 02 Online
Set 02 Online
Speaking
Mathematically
Relations and Functions
What is a relation?
Notation:
• 𝑥 𝑅 𝑦 means that 𝑥, 𝑦 ∈ 𝑅 (i.e., 𝑥 is related to 𝑦)
• 𝑥 𝑅 𝑦 means that 𝑥, 𝑦 ∉ 𝑅 (i.e., 𝑥 is not related to 𝑦)
A Relation as a subset
Example 1
Let 𝐴 = 1,2,3 , 𝐵 = 2,4 , and 𝑅 = 1,2 , 2,2 , 2,4 , 3,4 .
Is 𝑅 a relation from 𝐴 to 𝐵?
• Example 2
• Let 𝐴 = 1,2,3 and 𝐵 = 2,4 and 𝑆 to be a relation from 𝐴 to 𝐵
such that 𝑥, 𝑦 ∈ 𝑆 if and only if 𝑥 < 𝑦.
• Write the elements of 𝐴 × 𝐵.
• 𝐴 × 𝐵 = {(1,2), (1,4), (2,2), (2,4), (3,2), (3,4)}
• b. Write the elements of 𝑆.
• S = {(1,2), (1,4), (2,4), (3,4)}
A Relation as a subset
Example 3
Let 𝐻 be a relation from ℝ to ℝ such that 𝑥, 𝑦 ∈ 𝐻 provided 𝑥 2 + 𝑦 2 = 4.
a. Solve for 𝑦 for the following values of 𝑥: 𝑥 = −2, 𝑥 = −1, 𝑥 = 0, 𝑥 = 1,
𝑥 = 2.
If x = - 2: −2 2 + 𝑦 2 = 4, 𝑠𝑜 4 + 𝑦 2 = 4, 𝑡ℎ𝑒𝑛 𝑦 2 = 4 − 4 = 0; (−2,0)
If x = - 1: −1 2 + 𝑦 2 = 4, 𝑠𝑜 1 + 𝑦 2 = 4, 𝑡ℎ𝑒𝑛 𝑦 2 = 4 − 1 = 3; (−1, 3),
(−1, − 3)
If x = 0: 0 2 + 𝑦 2 = 4, 𝑠𝑜 0 + 𝑦 2 = 4, 𝑡ℎ𝑒𝑛 𝑦 2 = 4 − 0 = 4; (0,2), (0, −2)
If x = 1: 1 2 + 𝑦 2 = 4, 𝑠𝑜 1 + 𝑦 2 = 4, 𝑡ℎ𝑒𝑛 𝑦 2 = 4 − 1 = 3; (1, 3), (1, − 3)
2
If x = 2: 2 + 𝑦 2 = 4, 𝑠𝑜 4 + 𝑦 2 = 4, 𝑡ℎ𝑒𝑛 𝑦 2 = 4 − 4 = 0; (2,0)
H = {(−2,0), (−1, 3), (−1, − 3), (0, −2), (0,2), (1, 3), (1, − 3) , (2,0)}
A Relation as a subset
Example 3
Let 𝐻 be a relation from ℝ to ℝ such that 𝑥, 𝑦 ∈ 𝐻 provided 𝑥 2 + 𝑦 2 = 4.
b. Graph the resulting ordered pairs.
H = {(−2,0), (−1, 3), (−1, − 3), (0, −2), (0,2), ; (1, 3), (1, − 3) , (2,0)}
A Relation as a subset
Exercise
Let 𝐺 be a relation from 𝐶 = {−2, −1, 0, 1, 2} to 𝐷 = {−2, −1, 0, 1, 2}
such that 𝑥, 𝑦 ∈ 𝐺 provided 𝑦 = 𝑥 + 1.
What are the elements of 𝐺?
G = {(-2, -1), (-1, 0), (0, 1), (1, 2)}
Definition of a Function
Notation:
Functions and Relations on Finite Sets
Example 4.
Consider the relation 𝐻 from 𝐴 = {−2, −1, 0, 1, 2} to 𝐵 = {−2, −1, 0, 1, 2}
such that 𝑥, 𝑦 ∈ 𝐻 provided 𝑥 2 + 𝑦 2 = 4.
Is 𝐻 a function? If not, which condition is violated?
H = {(−2,0), (−1, 3), (−1, − 3), (0, −2), (0,2), (1, 3), (1, − 3) , (2,0)}
Not Function (prop. 2)
Example 5.
Let 𝐺 be a relation from 𝐶 = {−2, −1, 0, 1, 2} to 𝐷 = {−2, −1, 0, 1, 2}
such that 𝑥, 𝑦 ∈ 𝐺 provided 𝑦 = 𝑥 + 1.
a. Write the elements of 𝐺.
b. Determine whether G is a function or not. State the condition that
fails to hold if G is not a function.
G = {(-2, -1), (-1, 0), (0, 1), (1, 2)}
Not Function (prop 1)
Functions and Relations on Finite Sets
Example 6.
Let 𝐺 be a relation from 𝐶 = {−2, −1, 0, 1, 2} to 𝐷 = {−2, −1, 0, 1, 2}
with 𝐺 = −2,0 , −1,0 , 0,1 , 1,2 , 2, −1 .
a. Determine whether 𝐺 is a function or not. (Yes)
b. Draw an arrow diagram for 𝐺.
Relations and Functions as Graphs
Recall:
Vertical Line Test
Examples