augustus de morgan - mathematics & statisticsfarlow/sec31.pdf · cartesian product of sets...
TRANSCRIPT
Section 3.1 Relations 1
"When two objects, qualities, classes, or attributes, viewed together by the mind, are
seen under some connection, that connection is called a relation."
… Augustus De Morgan
Section 3.1 Relations Section 3.1 Relations Section 3.1 Relations Section 3.1 Relations
Introduction Introduction Introduction Introduction
In mathematics the word relation is used to show the existence or
nonexistence of certain connections pairs of objects, taken in definite order,
as in
“is less than” “is a subset of”
“is perpendicular to” “divides”
“is greater than” “is congruent to”
“is parallel to” “is equivalent to”
There are several types of relations, such as order relations, equivalence
relations, functions, and graph/networks, all of which play important roles in
various areas of mathematics, and are studied in this chapter.
Cartesian Product of Sets Cartesian Product of Sets Cartesian Product of Sets Cartesian Product of Sets
Before formally defining a relation, we must introduce the concept of the
Cartesian product of two sets.
Example 1Example 1Example 1Example 1 Let { }1, 2A = and { }1,3,4B = , then
Purpose of SectionPurpose of SectionPurpose of SectionPurpose of Section To introduce the concept of a relationrelationrelationrelation between objects,
the objects being almost anything one can imagine. This section acts as the
backdrop for the three important relations studied in the following sections;
the order relation, the equivalence relation, function relation, and graphs.
Definition Definition Definition Definition Cartesian P Cartesian P Cartesian P Cartesian Product:roduct:roduct:roduct:
Let A and B be arbitrary sets. The Cartesian Cartesian Cartesian Cartesian pppproductroductroductroduct of A and B,
denoted A B× and read ” cross A B ” is the set of ordered pairs
( ){ }, : ,A B a b a A b B× = ∈ ∈ .
That is A B× is the set of all ordered pairs ( ),a b , where the first coordinate
a is taken from A and the second coordinate b is taken from B.
Section 3.1 Relations 2
( ) ( ) ( ) ( ) ( ) ( ){ }1,1 , 1,3 , 1, 4 , 2,1 , 2,3 , 2,4A B× =
If we represent the points ( ),a b as points in the xy -Cartesian plane, the
Cartesian product A B× consists of the points displayed in Figure 1.
Cartesian Product A B×
Figure 1
Order is important for Cartesian products. For the same sets ,A B , we have
( ) ( ) ( ) ( ) ( ) ( ){ }1,1 , 1, 2 , 3,1 , 3,2 , 4,1 , 4,2B A× =
which illustrates that in general A B B A× ≠ × . The points in the Cartesian
product B A× are reflections of the points in A B× through the line y x= .
Cartesian Product B A×
Figure 2
MarMarMarMargin Note: gin Note: gin Note: gin Note: Do not confuse the ordered pair ( )0,1 from the open interval on
the real line ( ) { }0,1 : 0 1x x= < < .
Section 3.1 Relations 3
Cartesian products on more than two sets are defined accordingly. For
instance, for three sets A, B, and C we would define
( ){ }, , : , ,A B C a b c a A b B c C× × = ∈ ∈ ∈ .
When the coordinates are real numbers, the ordered triple ( ), ,a b c can
interpreted as points in three-dimensional space.
The Cartesian product interacts with the union and intersection of sets
by the following properties.
Example Example Example Example 2222 If A, B and C are sets, then
( ) ( ) ( )
( ) ( ) ( )
( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
)
)
)
)
a A B C A B A C
b A B C A B A C
c A B C D A C B D
d A B C D A C B D
× ∪ = × ∪ ×
× ∩ = × ∩ ×
× ∩ × = ∩ × ∩
× ∪ × = ∪ × ∪
Proof:Proof:Proof:Proof:
We prove a). The proofs of b), c) and d) are left to the reader. To prove
part a) note that both sets ( )A B C× ∪ and ( ) ( )A B A C× ∪ × are sets of
ordered pairs, where their elements are of the form ( ),x y . Normally, a proof
showing the equality of two sets requires two separate proofs, where one
proves each set is a subset of the other, but in this case we can go “forward”
and “backwards” at the same time. Watch carefully.
( ) ( )
( )
( ) ( )
( ) ( )
( ) ( ) ( )
, and
and or
and or and
, or ,
, .
x y A B C x A y B C
x A y B y C
x A y B x A y C
x y A B x y A C
x y A B A C
∈ × ∪ ⇔ ∈ ∈ ∪
⇔ ∈ ∈ ∈
⇔ ∈ ∈ ∈ ∈
⇔ ∈ × ∈ ×
⇔ ∈ × ∪ ×
Margin Note: Margin Note: Margin Note: Margin Note: Cartesian products are also called ddddirect productsirect productsirect productsirect products or ccccross ross ross ross
productsproductsproductsproducts.
Section 3.1 Relations 4
Visualization of ( ) ( ) ( )A B C A B A C× ∪ = × ∪ ×
Figure 2
Since all the logical connectives in the proof are “if and only if” you can start
either at the top or bottom of the argument and work to the other end. Many
proofs showing the equality of sets work in this manner. Figure 2 provides a
visualization of this identity although in general , ,A B C need not be subsets of
the real numbers.
MargMargMargMargin Note:in Note:in Note:in Note: Readers are already familiar with the most popular Cartesian
product, which is 2≡ ×� � � , the Cartesian plane.
In Figure 3 we have drawn some typical Cartesian products.
Section 3.1 Relations 5
Typical Cartesian Products
Figure 3
RelationsRelationsRelationsRelations
A (binary) relationrelationrelationrelation is a function that assigns truth values (true or false) to
two individuals, which can be numbers, sets, functions and so on. When the
value assigned is true, we say the individuals are related, like if the relation
were “is less then” then the pair of numbers ( )2,3 would be assigned “true”
since 2 3< . The reader is already familiar with many relations, such as the
equal relation " "= which would assign a truth value to the pair ( )3,3 but not
the pair ( )3, 4 . Relations also occur outside of mathematics as the following
relations.
John is taller than Jerry
Susan is the daughter of John
Harry loves Susan
Des Moines is a city in Iowa
i
i
i
i
Section 3.1 Relations 6
Relations can be between numbers and themselves, like 2 3< , between people
and themselves, and between a city and a state.
John Jerry "is taller than"
2 3 " "
Susan John "is the daughter of "
R R
R R
R R
=
= <
=
i
i
i
This motivates the general definition of a relation.
DefinitionDefinitionDefinitionDefinition:::: RelationRelationRelationRelation
Let A and B be sets and A B× the Cartesian product. A binarybinarybinarybinary relationrelationrelationrelation
from the set A to the set B , which we denote by R , is a subset of A B× . If
( , )x y R∈ we denote this by writing xRy , where we say “ x and y are related
( relative to )R . If ( ),x y R∉ we say that x and y are not related, this denote
this by xRy . In case A B= a relation from A to A is called a relation on A.
The elements in a relation R is called the graphgraphgraphgraph of the relation.
You can think of a binary relation as an operation that assigns either T or
F (or 1 or 0) to the pair of objects. If the value is true we say the objects are
related, if the value is false the objects are not related.
Margin Note:Margin Note:Margin Note:Margin Note: The definition of a relation can be a bit confusing at first,
thinking of a relation as both a set (i.e. subset of a Cartesian product) and as
a relation between things, like “=”, “<”, “loves” and so on.. Just realize that if
a point ( ),x y R∈ then we often denote this by writing xRy .
Margin Note:Margin Note:Margin Note:Margin Note: ( ) if and only if ,xRy x y R∈
The following examples will familiarize you with relations.
Example Example Example Example 3 (Typical Relation)3 (Typical Relation)3 (Typical Relation)3 (Typical Relation)
Consider a set A of five students and a set B of four movies:
{ }
{ }
Mary, John, Ann, Sally, Jim
Crash, Batman, Star Wars III, Sin City
A
B
=
=
and consider the relation R A B⊆ × defined by
Section 3.1 Relations 7
likes movie yxRy x=
and consists of the 10 x ’s drawn in the 20 boxes in Table 1. The elements of
R describe those students who like a certain movie. Since
( )John, Sin City R∈ , this means John likes the movie Sin City. Since
( )Ann, Star Wars IX R∉ , this means Ann does not like Star Wars IX. The
subset R A B⊆ × is a relation on A B× (read “relation from A to B ”).
Sin CitySin CitySin CitySin City x x
Star Wars IXStar Wars IXStar Wars IXStar Wars IX x x x
BatmanBatmanBatmanBatman x x
CrashCrashCrashCrash x x x
MaryMaryMaryMary JohnJohnJohnJohn AnnAnnAnnAnn SallySallySallySally JimJimJimJim
Relation “likes movie” on { } { }Students Movies×
Table 1
Example Example Example Example 4444 Identify the Relation Identify the Relation Identify the Relation Identify the Relation
The Cartesian product of { } { }1,2 , 1,3,4A B= = consists of the 2 3 6⋅ =
pairs of points
( ) ( ) ( ) ( ) ( ) ( ){ }1,1 , 1, 2 , 1,3 , 2,1 , 2, 2 , 2,3A B× =
A relation on A B× is any one of the 62 64= subsets of A B× . A popular
relation (do you recognize it?) from A to B would be
( ) ( ) ( ){ }1,2 , 1,3 , 2,3R A B= ⊆ ×
In other words, “1 is related to 2”, 1 is related to 3” and “2 is related to 3”.
Do you recognize the relation now? We would also denote this relation by
writing
( )
( )
( )
1 2 since 1,2 more commonly (1 2)
1 3 since 1,3 more commonly (1 3)
2 3 since 2,3 more commonly (2 3)
R R
R R
R R
∈ <
∈ <
∈ <
In this example the relation R is the relation “is strictly less than” which we
normally denote by " "< . We also write1 R1 or 1< 1 (1 is not related to itself)
since 1 is not strictly less than 1. The relation is illustrated by a “directed
graph” drawn in Figure 4.
Section 3.1 Relations 8
Graphical Representations of the Relation " "< on A B× .
Figure 4
Example 5 Subset and Membership RelationsExample 5 Subset and Membership RelationsExample 5 Subset and Membership RelationsExample 5 Subset and Membership Relations
The subset " "⊆ is a relation on the power set ( )P A of a set A , and
" "∈ is a relation from the set A to its power set ( )P A .
Example Example Example Example 6666 A A A A More More More More Familiar RelationFamiliar RelationFamiliar RelationFamiliar Relation
Often A and B are subsets of the real numbers � such as
{ } [ ]: 0 1 0,1A B x x= = ∈ ≤ ≤ =�
Here the Cartesian product is the unit square
[ ] [ ] ( ){ }0,1 0,1 ( , : 0 1,0 1x y x y× = ≤ ≤ ≤ ≤
which is shaded in Figure 5. A common relation from [ ]0,1 to itself is
[ ] [ ]{ }2( , ) 0,1 0,1 :R x y y x= ∈ × =
which the reader will recognize as the graph of the parabola 2y x= drawn in
Figure 5. We would call this relation the “squaring” relation and since
( )1/ 2,1/ 4 R∈ we would say 1/ 2 is related to 1/ 4 , the denote this relationship
Section 3.1 Relations 9
by 2(1/ 2) 1/ 4= . Later, we will denote function relations by , ,...f g and so
this relation would be denoted by
( ) [ ] [ ]{ }2, 0,1 0,1 :f x y y x= ∈ × = .
A Function Relation
Figure 5
Margin Note:Margin Note:Margin Note:Margin Note: A relation R from the real numbers � to itself is a subset of
the Cartesian plane ×� � . For any point ( ),x y R∈ we say that the first
coordinate x is related to the second coordinate y .
Inconsistency in Notation: Inconsistency in Notation: Inconsistency in Notation: Inconsistency in Notation: Although relations are sets, we often do not
“think” of them that way. For instance, we express the inequality relation ≤
by writing xRy as in 2 3≤ . The equivalent set notation for ≤ would be the
awkward looking ( )2,3 ∈ ≤ . (You would probably scratch you head if
inequalities were written like that!) Also, we seldom use the xRy “form” to
express function relations. They have their own notion. For example, we
normally write functions like 2( )y f x x= = . This relation written as xRy
would be 2xfx , again an awkward looking expression for most of us.
Sometimes, however, it is convenient to express functions in set notation, as
when we write ( )2,x x f∈ . This notation has merit since it interprets a
function in terms of what we normally call the graph of the function.
Higher Order Higher Order Higher Order Higher Order RelationsRelationsRelationsRelations:::: In set theory and logic a nnnn----ary ary ary ary is a relation that assigns
a truth value (true or false) to k members of a given set. A ternaryternaryternaryternary relation is
a relation ( ), ,R a b c that assigns a truth value to three members. For example
the statement that for nonzero integers , ,a b c
Section 3.1 Relations 10
3 3 3a b c+ =
is a ternary relation on � , which according to Andrew Wiles1 is false.
.
Domain and Range of a RelationDomain and Range of a RelationDomain and Range of a RelationDomain and Range of a Relation
Two important aspects of relations are the domain and range of a
relation.
DefinitionDefinitionDefinitionDefinition: Domain and Range: Domain and Range: Domain and Range: Domain and Range Let R be a relation from A to B . The domaindomaindomaindomain
of the relation is the set
( ) { }Dom : such that .R x A y B xRy= ∈ ∃ ∈
The rangerangerangerange of the relation R is
( ) { }Range : such that .R y B x A xRy= ∈ ∃ ∈
In Plain English: The domain of a relation R from to A B is the set of first
coordinates of the ordered pairs in R . The range of a relation R is the set of
second coordinates of the ordered pairs of R . By definition, we have
( ) ( )Dom , RangeR A R B⊆ ⊆ .
Example Example Example Example 7777 Let A B= = � (real numbers). We define a relation on � � by
( ){ }2 2, : 1R x y x y= ∈ × + ≤� � which are points on and inside the unit circle in
the Cartesian plane. Here
( ) { }
( ) { }
Dom : 1 1
Range : 1 1
R x x
R y y
= ∈ − ≤ ≤
= ∈ − ≤ ≤
�
�
.
Margin Note:Margin Note:Margin Note:Margin Note: If ( ),a b R∈ , then
i) ( )Doma R∈
ii) ( )Rangeb R∈
iii) is related to a b
See Figure 6.
1 English mathematician Andew Wildes verified Format’s Last Theorem in the affirmative by proving that
among nonzero integers , ,a b c the equation n n n
a b c+ = has no solutions for integers 3n ≥ .
Section 3.1 Relations 11
Relation ( ){ }2 2, : 1R x y x y= + ≤
Figure 6
Inverses and Compositions Inverses and Compositions Inverses and Compositions Inverses and Compositions
Two common ways to construct new relations from old ones are inverse inverse inverse inverse
relationsrelationsrelationsrelations and compositioncompositioncompositioncomposition of relations.
DefinitionDefinitionDefinitionDefinition If R is a relation from A to B , then the inverseinverseinverseinverse of R is defined as
( ) ( ){ }1 , : ,R y x x y R−
= ∈ .
For example the inverse of ( ) ( ) ( ){ }1,2 , 3,5 , 4,1R = is ( ) ( ) ( ){ }1 2,1 , 5,3 , 1, 4R−
= .
Example Example Example Example 8888
Let { }1,2,3, 4A = with a relation on A given by
( ) ( ) ( ) ( ){ }1,2 , 1,3 , 2,4 , 3, 4R = .
The inverse of R is ( ) ( ) ( ) ( ){ }1 2,1 , 3,1 , 4, 2 , 4,3R−
= . Both R and 1R− are drawn
in Figure 7. Note that the graph of 1R− is the mirror image or reflection of R
across the line y x= .
Section 3.1 Relations 12
Graphs of R and 1R−
Figure 7
Example Example Example Example 9999 (Inverse of a Curve) (Inverse of a Curve) (Inverse of a Curve) (Inverse of a Curve)
Given the relation on � defined by ( ){ }2, :R x y y x= = the inverse is
( ){ }1 2, :R x y x y−= = which we have drawn in Figure 8.
Graphs of R and 1R−
Figure 8
Composition of RelationsComposition of RelationsComposition of RelationsComposition of Relations
The composition of two (or more) relations is similar to the composition
of functions of which the reader is familiar. Recall that the composition of
functions ( )f x and ( )g x , written f g� , is defined by ( )( ) ( )( )f g x f g x=� for
all x in the domain of g and ( )g x in the domain of f . The generalization of
this definition to relations is as follows.
Section 3.1 Relations 13
Definition:Definition:Definition:Definition: Let R be a relation from A to B (i.e. a subset of A B× ) and S a
relation from B to C (i.e. a subset of B C× ). The compositecompositecompositecomposite (or compositioncompositioncompositioncomposition)
of R and S is the relation
( ) ( ) ( ){ }, : there exists a such that , and ,S R a c b B a b R b c S= ∈ ∈ ∈� .
Example Example Example Example 10101010 (Composition of Relations) (Composition of Relations) (Composition of Relations) (Composition of Relations)
Let { } { }1,2,3, 4 , , , , {cat, dog, horse}A B a b c C= = = and define the relations
( ) ( ) ( ) ( ) ( ){ }
( ) ( ) ( ) ( ) ( ){ }
1, , 1, , 2, , 3, , 4,
,dog , ,horse , ,cat , ,dog , ,horse
R a c a b b
S a b b c c
=
=
which are illustrated in Figure 9. The composition S R� in this diagram
consists of all “paths” starting from A and ending at C , which are
( ) ( ) ( ) ( )( ) ( ){ }1,dog , 2,dog , 3,cat , 3,horse 4,cat , 4,horseS R =�
Composition S R�
Figure 9
Section 3.1 Relations 14
ProblemsProblemsProblemsProblems
1. 1. 1. 1. (Four Basic Cartesian Products)(Four Basic Cartesian Products)(Four Basic Cartesian Products)(Four Basic Cartesian Products) Let { } { }1,2,3 , ,A B a b= = . Find the
following Cartesian products.
a) A B×
b) B A×
c) A A×
d) B B×
2. . . . (Cartesian Products)(Cartesian Products)(Cartesian Products)(Cartesian Products) For each pair of sets A and B find the Cartesian
products and A B B A× × .
a) { } { }0, 2 , 1,0,1A B= = −
b) { } { }, , , ,A a b B a b c= =
c) ,A B= =� �
d) ,A B= =� �
e) { }, 1,0,1A B= = −�
f) ,A B= =� �
3. (Graphing a Relation)(Graphing a Relation)(Graphing a Relation)(Graphing a Relation) Sketch the following relations.
a) ( ){ }2 2, : 1R x y x y= ∈ × + =� �
b) ( ){ }, : sinR x y y x= ∈ × =� �
c) ( ){ }2, :R x y x y= ∈ × =� �
d) ( ){ }, : 1, 1R x y x y= ∈ × ≤ ≥� �
e) ( ) ( ) ( ){ }, : 0 mod3 , 1 mod3R x y x y= ∈ × ≡ ≡� �
f) ( ){ }, : divides R x y x y= ∈ ×� �
4. (Algebra of Relations)(Algebra of Relations)(Algebra of Relations)(Algebra of Relations) Suppose [ ] [ ] [ ]0,3 , 2,5 , 1, 4A B C= = = are closed
intervals on the real � . Sketch the following relations on � � .
a) ( )A B C∪ ×
b) ( )A B C∩ ×
c) ( ) ( )A B A C× ∪ ×
d) ( )A A C× ∩
e) ( )A A B× ∩
Section 3.1 Relations 15
5. (Naming a Relation)(Naming a Relation)(Naming a Relation)(Naming a Relation) Find the inverse relations of the following relations on
{ }1,2,3A = . Plot the points of the relation and give each relation a name which
best describes it.
a) ( ) ( ) ( ){ }1,1 , 2, 2 , 3,3R =
b) ( ) ( ) ( ){ }1,2 , 1,3 , 2,3R =
c) ( ) ( ) ( ) ( ) ( ) ( ){ }1,1 , 1,2 , 1,3 , 2, 2 , 2,3 , 3,3R =
d) ( ) ( ) ( ){ }2,1 , 3,1 , 3, 2R =
6. (Inverse Relations on (Inverse Relations on (Inverse Relations on (Inverse Relations on � )))) Find and graph the inverse relations of the
following relations on � .
a) ( ){ }, : logaR x y y x= =
b) ( ){ }, : 2 0R x y x y= + =
c) ( ){ }, : 1R x y xy= =
d) ( ){ }, : 1R x y x y= + ≤
e) ( ){ }, : 1R x y x y= − ≤
f) ( ){ }, : 1R x y x y= + ≤
7. (Cartesian Product Identities)(Cartesian Product Identities)(Cartesian Product Identities)(Cartesian Product Identities) Prove the following.
( ) ( ) ( )
( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
)
)
)
a A B C A B A C
b A B C D A C B D
c A B C D A C B D
× ∩ = × ∩ ×
× ∩ × = ∩ × ∩
× ∪ × = ∪ × ∪
8. (N(N(N(Number of Relationumber of Relationumber of Relationumber of Relations)s)s)s) If a set A has m elements and B has n elements
then show there are 2mn distinct relations from A to B.
9. (I(I(I(Identity Relatiodentity Relatiodentity Relatiodentity Relation)n)n)n) For any set A, the set { }( , ) :AI x x x A= ∈ is called the
identity relation on A. For the set { }1,2,3, 4A = , what is the domain and range
of A
I and draw its graph.
10 (Properties of Relations)(Properties of Relations)(Properties of Relations)(Properties of Relations) Determine whether the following relations are
reflexive, anti symmetric, or transitive.
a) ( ), the greatest common divisor of and is 1x y R x y∈ ⇔
Section 3.1 Relations 16
b) ( ),x y R x y∈ ⇔ <
c) ( ), 5 divides x y R x y∈ ⇔ −
d) ( ),x y R x y∈ ⇔ ≥
11. Give examples of relations on the { }1,2,2,4,5A = having the following
properties.
a) Reflexive, antisymmetric, not transitive
b) Reflexive, symmetric, not transitive
c) Reflexive, antisymmetric, transitive
d) Not reflexive, symmetric, transitive