DM - CH 02
DM - CH 02
DM - CH 02
Basic Structures
Dr. Bashar Khassawneh
ellipses (…)
[𝑎, 𝑏] = {𝑥 | 𝑎 ≤ 𝑥 ≤ 𝑏}
[𝑎, 𝑏) = {𝑥 | 𝑎 ≤ 𝑥 < 𝑏}
(𝑎, 𝑏] = {𝑥 | 𝑎 < 𝑥 ≤ 𝑏}
(𝑎, 𝑏) = {𝑥 | 𝑎 < 𝑥 < 𝑏}
𝑆 = {𝑎, 𝑏, 𝑐, 𝑑}
𝑆 =4
𝐴 = {1, 2, 3, 7, 9}
∅=
𝑆 = {𝑎, 𝑏, 𝑐, 𝑑}
𝑆 =4
𝐴 = {1, 2, 3, 7, 9}
𝐴 =5
∅=
|∅| = 0
𝑆 = 𝑎, 𝑏, 𝑐, 𝑑, 2
𝑆 =
𝐴 = {1, 2, 3, {2,3}, 9}
𝐴 =
{∅} = { }
∅ =
𝑆 = 𝑎, 𝑏, 𝑐, 𝑑, 2
𝑆 =5
𝐴 = {1, 2, 3, {2,3}, 9}
𝐴 =5
{∅} = { }
∅ =1
𝐴 ⊆ 𝐵 ↔ ∀𝑥(𝑥 ∈ 𝐴 → 𝑥 ∈ 𝐵)
𝐴 ⊂ 𝐵 ↔ ∀𝑥 𝑥 ∈ 𝐴 → 𝑥 ∈ 𝐵 𝖠 ∃𝑥 𝑥 ∈ 𝐵 𝖠 𝑥 ∉ 𝐴
1,2,3,4
1, 2 , 3, 4
1,2, 1,3
3, 7 0, 5, 9
Universal Set
𝑆 = 1,2,3
𝑷 𝑺 = 𝟐𝟑 = 𝟖 𝐞𝐥𝐞𝐦𝐞𝐧𝐭𝐬
𝑃 𝑆 = 2𝑆
= ∅, 1 , 2 , 3 , 1,2 , 1,3 , 2,3 , 1,2,3
𝐴×𝐵 = 𝐴 ∗ 𝐵 =2∗3=6
𝐴×𝐵 = 𝐴 ∗ 𝐵 =2∗3=6
Find 𝐵 × 𝐴 ?
𝐴∩𝐵 =∅
𝐴 = 1,3,5 , 𝐵 = 1,2,3
𝐴−𝐵= 5
𝑈 = 1,2,3,4,5 , 𝐴 = 1,3
𝐴ҧ = 2,4,5
Domain: 𝐴
Co-Domain: 𝐵
𝑓 𝑎 =𝑏
𝑏 is the image of 𝑎
𝑎 is a preimage of 𝑏
1 Domain = 𝑎, 𝑏, 𝑐, 𝑑, 𝑒
𝑎 2
𝑏 3 Co-Domain = 1,2,3,4,5,6,7
𝑐 4 Range = {1,3,4,5,7}
𝑑 5
𝑒 6
7
𝑨 → 𝑩
𝑓1 + 𝑓2 𝑥 = 𝑓1 𝑥 + 𝑓2 𝑥 = 𝑥 2 + 𝑥 − 𝑥 2 = 𝑥,
𝑓1𝑓2 𝑥 = 𝑓1 𝑥 𝑓2 𝑥 = 𝑥 2 𝑥 − 𝑥 2 = 𝑥 3 − 𝑥 4 .
𝑆 = 𝑏, 𝑐, 𝑑 ⊆ 𝐴
The image of the subset 𝑆 = {𝑏, 𝑐, 𝑑} is the set 𝑓(𝑆) = {1, 4}
1 𝑓 𝑎 =1
𝑎 2
𝑏 3 𝑓 𝑏 =3
𝑐 4 𝑓 𝑐 =7
𝑑 5
𝑒 6 𝑓 𝑑 =4
7 𝑓 𝑒 =5
𝑨 → 𝑩
1 𝑓 𝑎 =1
𝑎 2
𝑏 3 𝑓 𝑏 =1
𝑐 4 𝑓 𝑐 =7
𝑑 5
𝑒 6 𝑓 𝑑 =4
7
𝑓 𝑒 =5
𝑨 → 𝑩
𝑓 𝑎 =1
𝑎
1
𝑏 𝑓 𝑏 =1
2
𝑐
3 𝑓 𝑐 =4
𝑑
4
𝑒 𝑓 𝑑 =2
Co-Domain = 1,2,3,4
𝑓 𝑒 =3
𝑨 → 𝑩 Range = {1,2,3,4}
𝑓 𝑎 =1
𝑎
1
𝑏 𝑓 𝑏 =1
2
𝑐
3 𝑓 𝑐 =4
𝑑
4
𝑒 𝑓 𝑑 =1
Co-Domain = 1,2,3,4
𝑓 𝑒 =3
𝑨 → 𝑩 Range = {1,3,4}
𝑓 𝑎 =1
𝑎 1
𝑏 2 𝑓 𝑏 =3
𝑐 3
𝑓 𝑐 =5
𝑑 4
𝑒 5 𝑓 𝑑 =2
Co-Domain = 1,2,3,4,5
𝑓 𝑒 =4
𝑨 → 𝑩 Range = {1,2,3,4,5}
𝑓 𝑎 =1
𝑎 1
𝑏 2 𝑓 𝑏 =3 NOT one-to-one
𝑐 3
𝑓 𝑐 =5 NOT onto
𝑑 4
𝑒 5 𝑓 𝑑 =1
Co-Domain = 1,2,3,4,5
𝑓 𝑒 =4
𝑨 → 𝑩 Range = {1,3,4,5}
𝑓 𝑎 =1
𝑎 1
𝑏 2 𝑓 𝑏 =2 Onto
𝑐 3
𝑓 𝑐 =3 NOT one-to-one
𝑑 4
𝑒 𝑓 𝑑 =1
Co-Domain = 1,2,3,4
𝑓 𝑒 =4
𝑨 → 𝑩 Range = {1,2,3,4}
𝑓 𝑎 =1
𝑎 1
𝑏 2 𝑓 𝑏 =3 One-to-one
𝑐 3
𝑓 𝑐 =5 NOT onto
𝑑 4
5 𝑓 𝑑 =2
Co-Domain = 1,2,3,4,5
𝑨 → 𝑩 Range = {1,2,3,5}
𝑨 → 𝑩
One-to-one
NOT onto
𝑨 → 𝑩
𝑨 → 𝑩
NOT One-to-one
Onto
𝑨 → 𝑩
𝑨 → 𝑩
One-to-one
Onto
∴ bijection
𝑨 → 𝑩
𝑨 → 𝑩
NOT One-to-one
NOT Onto
𝑨 → 𝑩
𝑨 → 𝑩
NOT a function
from 𝑨 to 𝑩
𝑨 → 𝑩
Answer:
The function 𝑓 is invertible because it is a one-to-one correspondence.
The inverse function 𝑓−1 reverses the correspondence given by 𝑓, so
𝑎𝑟 𝑛 , 𝑛 = 0,1,2, …
𝑎=1
𝑟 = −1
𝑎𝑟 𝑛 , 𝑛 = 0,1,2, …
𝑎=2
𝑟=5
𝑎𝑟 𝑛 , 𝑛 = 0,1,2, …
𝑎=6
𝑟 = 1/3
Find 𝒂, 𝒓? 𝟑 ∗ 𝟒𝒏 , 𝒏 = 𝟎, 𝟏, 𝟐, …
𝑎𝑟 𝑛 , 𝑛 = 0,1,2, …
𝑎=3
𝑟=4
Find 𝒂, 𝒓? 𝟑 ∗ 𝟒𝒏 , 𝒏 = 𝟏, 𝟐, 𝟑, …
𝑎 = 12
𝑟=4
𝑎 + 𝑛𝑑 , 𝑛 = 0,1,2, …
𝑎 = −1
𝑑=4
𝑎 + 𝑛𝑑 , 𝑛 = 0,1,2, …
𝑎=7
𝑑 = −3
0, 1, 1, 2, 3, 5, 8, …
Answer
100
1/𝑛
𝑛=1
Answer
Find
Find
A B A+B 1
4
@Ahmed Hagag BS102 Discrete Mathematics 140
Dr.Bashar Khassawneh Discrete Mathematics 0
Note: matrices of different sizes
Matrix Arithmetic (Sum.) can not be added.
A B A+B 1
4
@Ahmed Hagag BS102 Discrete Mathematics 141
Dr.Bashar Khassawneh Discrete Mathematics 1
Matrix Arithmetic (Product/Multiplication)
1
4
Dr.Bashar Khassawneh Discrete Mathematics 142 2
Matrix Arithmetic (Product/Multiplication)
1
4
Dr.Bashar Khassawneh Discrete Mathematics 143 3
Example1 (1/2)
1 1 2 1 2
𝐀3×3 = 1 2 3 𝐌3×2 = 3 −1
1 3 −1 3×3 1 1 3×2
1 2
1
1 1 2 1 2
2 1 2 3 × 3 −1 =
3 1 3 −1 1 1
1
4
Dr.Bashar Khassawneh Discrete Mathematics 144 4
Example1 (2/2)
1 1 2 1 2
𝐀3×3 = 1 2 3 𝐌3×2 = 3 −1
1 3 −1 3×3 1 1 3×2
1
4
Dr.Bashar Khassawneh Discrete Mathematics 147 7
Example2 (2/2)
1
4
Dr.Bashar Khassawneh Discrete Mathematics 148 8
Identity matrix (𝐈𝒏)
The identity matrix of order 𝑛 is the 𝑛 × 𝑛 matrix
𝐈𝑛 = [𝛿𝑖𝑗], where 𝛿𝑖𝑗 = 1 if 𝑖 = 𝑗 and 𝛿𝑖𝑗 = 0 if 𝑖 ≠ 𝑗.
1 0 0
𝐈3 = 0 1 0
0 0 1 3×3
1
4
Dr.Bashar Khassawneh Discrete Mathematics 149 9
Powers of square matrices (𝐀𝒓)
1
5
Dr.Bashar Khassawneh Discrete Mathematics 150 0
Transpose of 𝐀 (𝐀𝒕)
Interchanging the rows and columns of 𝐀
𝐀
𝐀𝒕
1
5
Dr.Bashar Khassawneh Discrete Mathematics 151 1
Transpose of 𝐀 (𝐀𝒕)
Interchanging the rows and columns of 𝐀
𝐀
𝐀𝒕
1
5
Dr.Bashar Khassawneh Discrete Mathematics 152 2
Symmetric
A square matrix 𝐀 is called symmetric if 𝐀 = 𝐀𝒕
𝐀 𝐀𝒕
1
5
Dr.Bashar Khassawneh Discrete Mathematics 153 3
Symmetric
A square matrix 𝐀 is called symmetric if 𝐀 = 𝐀𝒕
1
5
Dr.Bashar Khassawneh Discrete Mathematics 154 4
Zero–One Matrices
A matrix all of whose entries are either 𝟎 or 𝟏
1
5
Dr.Bashar Khassawneh Discrete Mathematics 155 5
join and meet (Zero–One Matrices)
meet
join
1
5
Dr.Bashar Khassawneh Discrete Mathematics 156 6
Example (1/3)
1
5
Dr.Bashar Khassawneh Discrete Mathematics 157 7
Example (2/3)
1
5
Dr.Bashar Khassawneh Discrete Mathematics 158 8
Example (3/3)
1
5
Dr.Bashar Khassawneh Discrete Mathematics 159 9
1
6
Dr.Bashar Khassawneh Discrete Mathematics 0