The Language of Relations Functions
The Language of Relations Functions
Example.
1. To each person there corresponds an age.
2. To each item in a store there corresponds a price.
3. To each automobile there corresponds a license number.
RELATIONS
◼ A relation 𝑟 between a set 𝐴 and 𝐵is any subset of the cartesian product 𝐴 × 𝐵. Thus, every element of 𝑟 is
an ordered pair.
◼ The domain of 𝑟, denoted by 𝑑𝑟 , is
𝑑𝑟 = {𝑥: (𝑥, 𝑦) ∈ 𝑟}
and the image of 𝑟, denoted by 𝑖𝑟 , is
𝑖𝑟 = {𝑦: (𝑥, 𝑦) ∈ 𝑟}
◼ If 𝑑𝑟 = 𝐴, we say that 𝑟 is a relation from 𝐴 to 𝐵. The set 𝐵 is called the range of 𝑟. If (𝑥, 𝑦) ∈ 𝑟 we say that
𝑥 ∈ 𝐴 is associated with 𝑦 ∈ 𝑩, or 𝑥 corresponds to 𝑦 under 𝑟.
Example.
H K C D P Q
r t s
a 0 2 1 -1 0
b 1 4 3 0 1
c 2 6 5 1 2
d 3 7 2 3
4
Example 2
Example 1 Example 3
𝐶 = {2,4,6} and 𝐷 = {1,3,5,7}
𝐻 = 𝑎, 𝑏, 𝑐, 𝑑 , 𝐾 = {0,1,2,3}, 𝑃 = {−1,0,1,2} and 𝑄 = 0,1,2,3,4
.𝑡 = { 2,3 , 2,5 , 2,7 , 4,5 , 4,7 , 6,7 }
𝑟 = { 𝑎, 1 , 𝑏, 2 , 𝑐, 3 }. 𝑠 = −1,1 , 0,0 , 1,1 , and (2,4).
.
FUNCTIONS
H K C D P Q
r t s
a 0 2 1 -1 0
b 1 4 3 0 1
c 2 6 5 1 2
d 3 7 2 3
4
H K C D P Q
r t s
a 0 2 1 -1 0
b 1 4 3 0 1
c 2 6 5 1 2
d 3 7 2 3
4
Example 2
Example 1 Example 3
𝐶 = {2,4,6} and 𝐷 = {1,3,5,7}
𝐻 = 𝑎, 𝑏, 𝑐, 𝑑 , 𝐾 = {0,1,2,3}, 𝑃 = {−1,0,1,2} and 𝑄 = 0,1,2,3,4
.𝑡 = { 2,3 , 2,5 , 2,7 , 4,5 , 4,7 , 6,7 }
𝑟 = { 𝑎, 1 , 𝑏, 2 , 𝑐, 3 }. 𝑠 = −1,1 , 0,0 , 1,1 , and (2,4).
.
FUNCTIONAL NOTATION
◼ We use symbol 𝑓: 𝐴 → 𝐵 to indicate that 𝑓 is a function from 𝐴 to 𝐵. For each 𝑥 ∈ 𝐴, we denote by 𝑓(𝑥) the
unique element of 𝐵 to which 𝑥 corresponds.
◼ We say that 𝑓(𝑥) is the value of 𝑓 at 𝑥
𝐴 𝐵
𝑓
x f(x)
Example.
Suppose 𝑔 𝑥 = 2𝑥 + 1, ℎ 𝑥 = 𝑥.
Then,
𝑔 25 = 2 25 + 1 = 51
𝑔 3𝑡 = 2 3𝑡 + 1 = 6𝑡 + 1
𝑔 ℎ 𝑥 = 2ℎ 𝑥 + 1 = 2 𝑥 + 1
ℎ 25 = 25 = 5
ℎ 3𝑡 = 3𝑡
4
ℎ ℎ 𝑥 = ℎ(𝑥) = 𝑥= 𝑥
◼ Given 𝑓: 𝐴 → 𝐵, if (𝑥, 𝑦) ∈ 𝑓, we write 𝑦 = 𝑓(𝑥)
◼ We say that 𝑦 or 𝑓(𝑥) is the image of 𝑥 under 𝑓, and that 𝑥 is a preimage or domain of 𝑦 under 𝑓. The image
𝑖𝑓 of 𝑓 is the set of all images of the elements of the domain; that is,
𝑖𝑓 = {𝑓 𝑥 : 𝑥 ∈ 𝐴}
Example.
We say that functions 𝑓: 𝐴 → 𝐵 and 𝑔: 𝐴 → 𝐵 are equal, that is, 𝑓 = 𝑔, if 𝑓 𝑥 = 𝑔(𝑥) for all 𝑥 ∈ 𝐴.
𝑔 𝑥 = 𝑥+1
ℎ 𝑥 =𝑥+1
Since 𝑥+1 2 = 𝑥 + 1 for all 𝑥
Then,
𝑓 𝑥 = 𝑔(𝑥) for all 𝑥 ∈ ℜ
Hence,
𝑓=𝑔
However, 𝑓 ≠ ℎ
Since there are values of 𝑥 for which 𝑓(𝑥) ≠ ℎ(𝑥).
For instance , 𝑥 = −2
𝑓 −2 = (−2 + 1)2 = (−1)2 = 1 = 1
ℎ −2 = −2 + 1 = −1
Thus, 𝑓(−2) ≠ ℎ(−2)
EVALUATION AND OPERATIONS OF FUNCTIONS