cartesian product cross product a and b a b a b f a b j a ...stacho/macm101.pdf · de nition 1 the...
TRANSCRIPT
Definition 1
The Cartesian product (or cross product) of A and B , denoted byA× B , is the set
A× B = {(a, b) | a ∈ A and b ∈ B}
1. the elements (a, b) of A× B are ordered pairs
2. for pairs (a, b), (c , d) we have
(a, b) = (c , d) ⇐⇒ a = c and b = d
Definition 2
The n-fold product of sets A1, A2, . . . , An is the set of n-tuples
A1 × A2 × . . .× An = {(a1, a2, . . . , an) | ai ∈ Ai for all 1 ≤ i ≤ n}
() October 30, 2007 1 / 12
Definition 1
The Cartesian product (or cross product) of A and B , denoted byA× B , is the set
A× B = {(a, b) | a ∈ A and b ∈ B}
1. the elements (a, b) of A× B are ordered pairs
2. for pairs (a, b), (c , d) we have
(a, b) = (c , d) ⇐⇒ a = c and b = d
Definition 2
The n-fold product of sets A1, A2, . . . , An is the set of n-tuples
A1 × A2 × . . .× An = {(a1, a2, . . . , an) | ai ∈ Ai for all 1 ≤ i ≤ n}
() October 30, 2007 1 / 12
Definition 1
The Cartesian product (or cross product) of A and B , denoted byA× B , is the set
A× B = {(a, b) | a ∈ A and b ∈ B}
1. the elements (a, b) of A× B are ordered pairs
2. for pairs (a, b), (c , d) we have
(a, b) = (c , d) ⇐⇒ a = c and b = d
Definition 2
The n-fold product of sets A1, A2, . . . , An is the set of n-tuples
A1 × A2 × . . .× An = {(a1, a2, . . . , an) | ai ∈ Ai for all 1 ≤ i ≤ n}
() October 30, 2007 1 / 12
Definition 1
A× B = {(a, b) | a ∈ A and b ∈ B}
A = {2, 3, 4}B = {4, 5}
a) A×B = {(2, 4), (2, 5), (3, 4), (3, 5), (4, 4), (4, 5)}b) B×A = {(4, 2), (4, 3), (4, 4), (5, 2), (5, 3), (5, 4)}OO
//
2 3 4
4
5
◦◦◦◦◦◦
A× B
A
B
() October 30, 2007 2 / 12
Definition 1
A× B = {(a, b) | a ∈ A and b ∈ B}
A = {2, 3, 4}B = {4, 5}
a) A×B = {(2, 4), (2, 5), (3, 4), (3, 5), (4, 4), (4, 5)}b) B×A = {(4, 2), (4, 3), (4, 4), (5, 2), (5, 3), (5, 4)}OO
//
2 3 4
4
5
◦◦◦◦◦◦
A× B
A
B
() October 30, 2007 2 / 12
Definition 1
A× B = {(a, b) | a ∈ A and b ∈ B}
A = {2, 3, 4}B = {4, 5}
a) A×B = {(2, 4), (2, 5), (3, 4), (3, 5), (4, 4), (4, 5)}b) B×A = {(4, 2), (4, 3), (4, 4), (5, 2), (5, 3), (5, 4)}OO
//
2 3 4
4
5
◦◦◦◦◦◦
A× B
A
BOO
//
2
3
4
4 5
◦ ◦◦ ◦◦ ◦
B × A
B
A
() October 30, 2007 2 / 12
B = {4, 5}a) B2 = B × B = {(4, 4), (4, 5), (5, 4), (5, 5)}b) B3 = B × B × B = {(4, 4, 4), (4, 4, 5), (4, 5, 4), (4, 5, 5),
(5, 4, 4), (5, 4, 5), (5, 5, 4), (5, 5, 5)}OO
//
4
5
4 5
◦◦◦◦
B × B
B
B
() October 30, 2007 3 / 12
B = {4, 5}a) B2 = B × B = {(4, 4), (4, 5), (5, 4), (5, 5)}b) B3 = B × B × B = {(4, 4, 4), (4, 4, 5), (4, 5, 4), (4, 5, 5),
(5, 4, 4), (5, 4, 5), (5, 5, 4), (5, 5, 5)}OO
//
4
5
4 5
◦◦◦◦
B × B
B
B
() October 30, 2007 3 / 12
B = {4, 5}a) B2 = B × B = {(4, 4), (4, 5), (5, 4), (5, 5)}b) B3 = B × B × B = {(4, 4, 4), (4, 4, 5), (4, 5, 4), (4, 5, 5),
(5, 4, 4), (5, 4, 5), (5, 5, 4), (5, 5, 5)}
OO
//
::tttttttttttttttttttttttttttttt
4444
4
5
4 5
45
◦◦◦◦◦◦◦◦
B × B × B
B
B
B
() October 30, 2007 3 / 12
{4, �} × {x , y} × {♥,♠,♣}Tree Diagram
()
(4)
(�)
(4, x)
(4, y)
(�, x)
(�, y)
(4, x ,♥)
(4, x ,♠)
(4, x ,♣)
(4, y ,♥)
(4, y ,♠)
(4, y ,♣)
(�, x ,♥)
(�, x ,♠)
(�, x ,♣)
(�, y ,♥)
(�, y ,♠)
(�, y ,♣)
������������
????????????
oooooo
OOOOOO
oooooo
OOOOOO
gggggg
WWWWWW
gggggg
WWWWWW
gggggg
WWWWWW
gggggg
WWWWWW
() October 30, 2007 4 / 12
Definition 3
A (binary) relation from A to B is a subset of A× B .A (binary) relation on A is a subset of A× A.
A = {2, 3, 4} and B = {4, 5}
a) R1 = {(2, 4), (3, 5)}b) R2 = {(2, 4), (3, 4), (4, 4)}c) R3 = {(2, 4), (2, 5), (4, 4), (4, 5)}d) R4 = ∅
OO
//
2 3 4
4
5
◦◦
R1
A
B
() October 30, 2007 5 / 12
Definition 3
A (binary) relation from A to B is a subset of A× B .A (binary) relation on A is a subset of A× A.
A = {2, 3, 4} and B = {4, 5}
a) R1 = {(2, 4), (3, 5)}b) R2 = {(2, 4), (3, 4), (4, 4)}c) R3 = {(2, 4), (2, 5), (4, 4), (4, 5)}d) R4 = ∅
OO
//
2 3 4
4
5
◦◦
R1
A
B
() October 30, 2007 5 / 12
Definition 3
A (binary) relation from A to B is a subset of A× B .A (binary) relation on A is a subset of A× A.
A = {2, 3, 4} and B = {4, 5}
a) R1 = {(2, 4), (3, 5)}b) R2 = {(2, 4), (3, 4), (4, 4)}c) R3 = {(2, 4), (2, 5), (4, 4), (4, 5)}d) R4 = ∅
OO
//
2 3 4
4
5
◦ ◦ ◦
R2
A
B
() October 30, 2007 5 / 12
Definition 3
A (binary) relation from A to B is a subset of A× B .A (binary) relation on A is a subset of A× A.
A = {2, 3, 4} and B = {4, 5}
a) R1 = {(2, 4), (3, 5)}b) R2 = {(2, 4), (3, 4), (4, 4)}c) R3 = {(2, 4), (2, 5), (4, 4), (4, 5)}d) R4 = ∅
OO
//
2 3 4
4
5
◦◦
◦◦
R3
A
B
() October 30, 2007 5 / 12
Definition 3
A (binary) relation from A to B is a subset of A× B .A (binary) relation on A is a subset of A× A.
A = {2, 3, 4} and B = {4, 5}
a) R1 = {(2, 4), (3, 5)}b) R2 = {(2, 4), (3, 4), (4, 4)}c) R3 = {(2, 4), (2, 5), (4, 4), (4, 5)}d) R4 = ∅
OO
//
2 3 4
4
5
R4
A
B
() October 30, 2007 5 / 12
Relation R = {(x , y) ∈ Z× Z | 1 ≤ x ≤ y ≤ 4} == {(1, 1), (1, 2), (1, 3), (1, 4), (2, 2), (2, 3), (2, 4), (3, 3), (3, 4), (4, 4)}
OO
//
1 2 3 4
1
2
3
4
◦◦◦◦
◦◦◦◦◦ ◦
R Notation
(x , y) ∈ R
m
xRy
(think of R as ≤)
() October 30, 2007 6 / 12
Relation R = {(x , y) ∈ Z× Z | 1 ≤ x ≤ y ≤ 4} == {(1, 1), (1, 2), (1, 3), (1, 4), (2, 2), (2, 3), (2, 4), (3, 3), (3, 4), (4, 4)}
OO
//
1 2 3 4
1
2
3
4
◦◦◦◦
◦◦◦◦◦ ◦
R Notation
(x , y) ∈ R
m
xRy
(think of R as ≤)
() October 30, 2007 6 / 12
Relation R = {(x , y) ∈ Z× Z | 1 ≤ x ≤ y ≤ 4} == {(1, 1), (1, 2), (1, 3), (1, 4), (2, 2), (2, 3), (2, 4), (3, 3), (3, 4), (4, 4)}
OO
//
1 2 3 4
1
2
3
4
◦◦◦◦
◦◦◦◦◦ ◦
R Notation
(x , y) ∈ R
m
xRy
(think of R as ≤)
() October 30, 2007 6 / 12
{Justin, Joey , Kevin, Nick} × {Britney , Christina, Jessica, Kelly , Sarah}
Justin
Joey
Kevin
Nick
Britney
Christina
Jessica
Kelly
Sarah
ddddddddddddddddd
ZZZZZZZZZZZZZZZZZ
OOOOOOOOOOOOOOOOOOO
DDDDDDDDDDDDDDDDDDDDDD
::::::::::::::::::::::::::
ooooooooooooooooooddddddddddddddddd
ZZZZZZZZZZZZZZZZZ
OOOOOOOOOOOOOOOOOO
DDDDDDDDDDDDDDDDDDDDDD
zzzzzzzzzzzzzzzzzzzzzz
oooooooooooooooooooddddddddddddddddd
ZZZZZZZZZZZZZZZZZ
OOOOOOOOOOOOOOOOOOO
�������������������������
zzzzzzzzzzzzzzzzzzzzzz
oooooooooooooooooooddddddddddddddddd
ZZZZZZZZZZZZZZZZZ
() October 30, 2007 7 / 12
Who dated whom? {(Ju, Br), (Ju, Je), (Jo, Ke), (Jo, Sa),(Ke, Br), (Ke, Ch), (Ni , Ch), (Ni , Ke), (Ni , Sa)}
Justin
Joey
Kevin
Nick
Britney
Christina
Jessica
Kelly
Sarah
dddddddddddddddddddddddddddddddddd
OOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOO
DDDDDDDDDDDDDDDDDDDDDD
DDDDDDDDDDDDDDDDDDDDDD
zzzzzzzzzzzzzzzzzzzzzz
zzzzzzzzzzzzzzzzzzzzzz
ooooooooooooooooooo
ooooooooooooooooooo
zzzzzzzzzzzzzzzzzzzzzz
zzzzzzzzzzzzzzzzzzzzzzdddddddddddddddddddddddddddddddddd
ZZZZZZZZZZZZZZZZZ
ZZZZZZZZZZZZZZZZZ
() October 30, 2007 8 / 12
Who is dating whom? {(Ju, Je), (Ke, Br), (Ni , Ch), (Ni , Ke)}
Justin
Joey
Kevin
Nick
Britney
Christina
Jessica
Kelly
Sarah
() October 30, 2007 9 / 12
Theorem 4
For any set A, we have A× ∅ = ∅ ( and ∅ × A = ∅)
Proof. If (a, b) ∈ A× ∅, then a ∈ A and b ∈ ∅, impossible. �
Theorem 5
For any sets A, B , C
a) A× (B ∩ C ) = (A× B) ∩ (A× C )
b) A× (B ∪ C ) = (A× B) ∪ (A× C )
c) (A ∩ B)× C = (A× C ) ∩ (B × C )
d) (A ∪ B)× C = (A× C ) ∪ (B × C )
Proof. a) (a, b) ∈ A× (B ∩ C ) ⇐⇒ a ∈ A and b ∈ B ∩ C ⇐⇒a ∈ A and b ∈ B and b ∈ C ⇐⇒ (a, b) ∈ A× B and(a, b) ∈ A× C ⇐⇒ (a, b) ∈ (A× B) ∩ (A× C ) �
() October 30, 2007 10 / 12
Theorem 4
For any set A, we have A× ∅ = ∅ ( and ∅ × A = ∅)
Proof. If (a, b) ∈ A× ∅, then a ∈ A and b ∈ ∅, impossible. �
Theorem 5
For any sets A, B , C
a) A× (B ∩ C ) = (A× B) ∩ (A× C )
b) A× (B ∪ C ) = (A× B) ∪ (A× C )
c) (A ∩ B)× C = (A× C ) ∩ (B × C )
d) (A ∪ B)× C = (A× C ) ∪ (B × C )
Proof. a) (a, b) ∈ A× (B ∩ C ) ⇐⇒ a ∈ A and b ∈ B ∩ C ⇐⇒a ∈ A and b ∈ B and b ∈ C ⇐⇒ (a, b) ∈ A× B and(a, b) ∈ A× C ⇐⇒ (a, b) ∈ (A× B) ∩ (A× C ) �
() October 30, 2007 10 / 12
Observation 6
For any two sets A, B, the number of elements in A× B is
|A× B | = |A| · |B |
Hence there are exactly |P(A× B)| = 2|A×B| = 2|A|·|B| differentrelations from A to B.
() October 30, 2007 11 / 12
Observation 6
For any two sets A, B, the number of elements in A× B is
|A× B | = |A| · |B |
Hence there are exactly |P(A× B)| = 2|A×B| = 2|A|·|B| differentrelations from A to B.
() October 30, 2007 11 / 12
Exercises:
5.1.7 - If A = {1, 2, 3, 4, 5} and B = {w , x , y , z}, how manyelements are there in P(A× B). Answer: 220 = 1, 048, 576
5.1.3 - For A = {1, 2, 3} and B = {2, 4, 5}a) |A× B | =? Answer: 9
b) # of relations from A to B ? Answer: 29 = 512
c) # of relations on A ? Answer: 29 = 512
d) # of relations from A to Bthat contain (1, 2) and (1, 5) ? Answer: 27 = 128
e) # of relations from A to Bthat contain exactly five ordered pairs ? Answer:
(95
)= 126
f) # of relations on A thatcontain at least seven elements ? Answer:
(97
)+
(98
)+
(99
)= 121
() October 30, 2007 12 / 12
Exercises:
5.1.7 - If A = {1, 2, 3, 4, 5} and B = {w , x , y , z}, how manyelements are there in P(A× B). Answer: 220 = 1, 048, 576
5.1.3 - For A = {1, 2, 3} and B = {2, 4, 5}a) |A× B | =? Answer: 9
b) # of relations from A to B ? Answer: 29 = 512
c) # of relations on A ? Answer: 29 = 512
d) # of relations from A to Bthat contain (1, 2) and (1, 5) ? Answer: 27 = 128
e) # of relations from A to Bthat contain exactly five ordered pairs ? Answer:
(95
)= 126
f) # of relations on A thatcontain at least seven elements ? Answer:
(97
)+
(98
)+
(99
)= 121
() October 30, 2007 12 / 12
Exercises:
5.1.7 - If A = {1, 2, 3, 4, 5} and B = {w , x , y , z}, how manyelements are there in P(A× B). Answer: 220 = 1, 048, 576
5.1.3 - For A = {1, 2, 3} and B = {2, 4, 5}a) |A× B | =? Answer: 9
b) # of relations from A to B ? Answer: 29 = 512
c) # of relations on A ? Answer: 29 = 512
d) # of relations from A to Bthat contain (1, 2) and (1, 5) ? Answer: 27 = 128
e) # of relations from A to Bthat contain exactly five ordered pairs ? Answer:
(95
)= 126
f) # of relations on A thatcontain at least seven elements ? Answer:
(97
)+
(98
)+
(99
)= 121
() October 30, 2007 12 / 12
Exercises:
5.1.7 - If A = {1, 2, 3, 4, 5} and B = {w , x , y , z}, how manyelements are there in P(A× B). Answer: 220 = 1, 048, 576
5.1.3 - For A = {1, 2, 3} and B = {2, 4, 5}a) |A× B | =? Answer: 9
b) # of relations from A to B ? Answer: 29 = 512
c) # of relations on A ? Answer: 29 = 512
d) # of relations from A to Bthat contain (1, 2) and (1, 5) ? Answer: 27 = 128
e) # of relations from A to Bthat contain exactly five ordered pairs ? Answer:
(95
)= 126
f) # of relations on A thatcontain at least seven elements ? Answer:
(97
)+
(98
)+
(99
)= 121
() October 30, 2007 12 / 12
Exercises:
5.1.7 - If A = {1, 2, 3, 4, 5} and B = {w , x , y , z}, how manyelements are there in P(A× B). Answer: 220 = 1, 048, 576
5.1.3 - For A = {1, 2, 3} and B = {2, 4, 5}a) |A× B | =? Answer: 9
b) # of relations from A to B ? Answer: 29 = 512
c) # of relations on A ? Answer: 29 = 512
d) # of relations from A to Bthat contain (1, 2) and (1, 5) ? Answer: 27 = 128
e) # of relations from A to Bthat contain exactly five ordered pairs ? Answer:
(95
)= 126
f) # of relations on A thatcontain at least seven elements ? Answer:
(97
)+
(98
)+
(99
)= 121
() October 30, 2007 12 / 12
Exercises:
5.1.7 - If A = {1, 2, 3, 4, 5} and B = {w , x , y , z}, how manyelements are there in P(A× B). Answer: 220 = 1, 048, 576
5.1.3 - For A = {1, 2, 3} and B = {2, 4, 5}a) |A× B | =? Answer: 9
b) # of relations from A to B ? Answer: 29 = 512
c) # of relations on A ? Answer: 29 = 512
d) # of relations from A to Bthat contain (1, 2) and (1, 5) ? Answer: 27 = 128
e) # of relations from A to Bthat contain exactly five ordered pairs ? Answer:
(95
)= 126
f) # of relations on A thatcontain at least seven elements ? Answer:
(97
)+
(98
)+
(99
)= 121
() October 30, 2007 12 / 12
Exercises:
5.1.7 - If A = {1, 2, 3, 4, 5} and B = {w , x , y , z}, how manyelements are there in P(A× B). Answer: 220 = 1, 048, 576
5.1.3 - For A = {1, 2, 3} and B = {2, 4, 5}a) |A× B | =? Answer: 9
b) # of relations from A to B ? Answer: 29 = 512
c) # of relations on A ? Answer: 29 = 512
d) # of relations from A to Bthat contain (1, 2) and (1, 5) ? Answer: 27 = 128
e) # of relations from A to Bthat contain exactly five ordered pairs ? Answer:
(95
)= 126
f) # of relations on A thatcontain at least seven elements ? Answer:
(97
)+
(98
)+
(99
)= 121
() October 30, 2007 12 / 12
Exercises:
5.1.7 - If A = {1, 2, 3, 4, 5} and B = {w , x , y , z}, how manyelements are there in P(A× B). Answer: 220 = 1, 048, 576
5.1.3 - For A = {1, 2, 3} and B = {2, 4, 5}a) |A× B | =? Answer: 9
b) # of relations from A to B ? Answer: 29 = 512
c) # of relations on A ? Answer: 29 = 512
d) # of relations from A to Bthat contain (1, 2) and (1, 5) ? Answer: 27 = 128
e) # of relations from A to Bthat contain exactly five ordered pairs ? Answer:
(95
)= 126
f) # of relations on A thatcontain at least seven elements ? Answer:
(97
)+
(98
)+
(99
)= 121
() October 30, 2007 12 / 12
Exercises:
5.1.7 - If A = {1, 2, 3, 4, 5} and B = {w , x , y , z}, how manyelements are there in P(A× B). Answer: 220 = 1, 048, 576
5.1.3 - For A = {1, 2, 3} and B = {2, 4, 5}a) |A× B | =? Answer: 9
b) # of relations from A to B ? Answer: 29 = 512
c) # of relations on A ? Answer: 29 = 512
d) # of relations from A to Bthat contain (1, 2) and (1, 5) ? Answer: 27 = 128
e) # of relations from A to Bthat contain exactly five ordered pairs ? Answer:
(95
)= 126
f) # of relations on A thatcontain at least seven elements ? Answer:
(97
)+
(98
)+
(99
)= 121
() October 30, 2007 12 / 12
Exercises:
5.1.7 - If A = {1, 2, 3, 4, 5} and B = {w , x , y , z}, how manyelements are there in P(A× B). Answer: 220 = 1, 048, 576
5.1.3 - For A = {1, 2, 3} and B = {2, 4, 5}a) |A× B | =? Answer: 9
b) # of relations from A to B ? Answer: 29 = 512
c) # of relations on A ? Answer: 29 = 512
d) # of relations from A to Bthat contain (1, 2) and (1, 5) ? Answer: 27 = 128
e) # of relations from A to Bthat contain exactly five ordered pairs ? Answer:
(95
)= 126
f) # of relations on A thatcontain at least seven elements ? Answer:
(97
)+
(98
)+
(99
)= 121
() October 30, 2007 12 / 12
Exercises:
5.1.7 - If A = {1, 2, 3, 4, 5} and B = {w , x , y , z}, how manyelements are there in P(A× B). Answer: 220 = 1, 048, 576
5.1.3 - For A = {1, 2, 3} and B = {2, 4, 5}a) |A× B | =? Answer: 9
b) # of relations from A to B ? Answer: 29 = 512
c) # of relations on A ? Answer: 29 = 512
d) # of relations from A to Bthat contain (1, 2) and (1, 5) ? Answer: 27 = 128
e) # of relations from A to Bthat contain exactly five ordered pairs ? Answer:
(95
)= 126
f) # of relations on A thatcontain at least seven elements ? Answer:
(97
)+
(98
)+
(99
)= 121
() October 30, 2007 12 / 12
Exercises:
5.1.7 - If A = {1, 2, 3, 4, 5} and B = {w , x , y , z}, how manyelements are there in P(A× B). Answer: 220 = 1, 048, 576
5.1.3 - For A = {1, 2, 3} and B = {2, 4, 5}a) |A× B | =? Answer: 9
b) # of relations from A to B ? Answer: 29 = 512
c) # of relations on A ? Answer: 29 = 512
d) # of relations from A to Bthat contain (1, 2) and (1, 5) ? Answer: 27 = 128
e) # of relations from A to Bthat contain exactly five ordered pairs ? Answer:
(95
)= 126
f) # of relations on A thatcontain at least seven elements ? Answer:
(97
)+
(98
)+
(99
)= 121
() October 30, 2007 12 / 12
Exercises:
5.1.7 - If A = {1, 2, 3, 4, 5} and B = {w , x , y , z}, how manyelements are there in P(A× B). Answer: 220 = 1, 048, 576
5.1.3 - For A = {1, 2, 3} and B = {2, 4, 5}a) |A× B | =? Answer: 9
b) # of relations from A to B ? Answer: 29 = 512
c) # of relations on A ? Answer: 29 = 512
d) # of relations from A to Bthat contain (1, 2) and (1, 5) ? Answer: 27 = 128
e) # of relations from A to Bthat contain exactly five ordered pairs ? Answer:
(95
)= 126
f) # of relations on A thatcontain at least seven elements ? Answer:
(97
)+
(98
)+
(99
)= 121
() October 30, 2007 12 / 12
Exercises:
5.1.7 - If A = {1, 2, 3, 4, 5} and B = {w , x , y , z}, how manyelements are there in P(A× B). Answer: 220 = 1, 048, 576
5.1.3 - For A = {1, 2, 3} and B = {2, 4, 5}a) |A× B | =? Answer: 9
b) # of relations from A to B ? Answer: 29 = 512
c) # of relations on A ? Answer: 29 = 512
d) # of relations from A to Bthat contain (1, 2) and (1, 5) ? Answer: 27 = 128
e) # of relations from A to Bthat contain exactly five ordered pairs ? Answer:
(95
)= 126
f) # of relations on A thatcontain at least seven elements ? Answer:
(97
)+
(98
)+
(99
)= 121
() October 30, 2007 12 / 12