1 2 Quantifiers 9 2015
1 2 Quantifiers 9 2015
1 2 Quantifiers 9 2015
Copyright © 2013, 2005, 2001 Pearson Education, Inc. Section 2.2, Slide
1-1 1
Section 2.2
Relations
Copyright © 2013, 2005, 2001 Pearson Education, Inc. Section 2.2, Slide
1-2 2
In listing the elements of a set, the order is not important. So, {1, 3} = {3, 1}.
When we wish to indicate that a set of two elements a and b is ordered, we enclose the
elements in parentheses: (a, b). Then a is called the first element and b is called the second.
The important property of ordered pairs is that
(a, b) = (c, d ) iff a = c and b = d.
Definition 2.2.1
The ordered pair (a, b) is the set whose members are {a, b} and {a}. In symbols
we have (a, b) = {{a}, {a, b}}, where we have written the singleton set first.
The acceptability of this definition depends on the ordered pairs actually having the
property expected of them. This we prove in the following theorem.
Copyright © 2013, 2005, 2001 Pearson Education, Inc. Section 2.2, Slide
1-3 3
Definition: (a, b) = {{a}, {a, b}} and (c, d) = {{c}, {c, d}}
Theorem 2.2.2: (a, b) = (c, d) iff a = c and b = d.
Copyright © 2013, 2005, 2001 Pearson Education, Inc. Section 2.2, Slide
1-4 4
Definition: (a, b) = {{a}, {a, b}} and (c, d) = {{c}, {c, d}}
Theorem 2.2.2: (a, b) = (c, d) iff a = c and b = d.
On the other hand, if a b, then from the preceding argument it follows that c d.
Since (a, b) = (c, d), we must have
{a} {{c}, {c, d}},
which means that {a} = {c} or {a} = {c, d}.
In either case, we have c {a}, so a = c. Again, since (a, b) = (c, d), we must have
Thus {a, b} = {c} or {a, b} = {c, d}. But {a, b} has two distinct members and
{a, b} = {c, d}.
{c} has only one, so we must have
Now a = c, a b and b {c, d}, which implies that b = d.
Copyright © 2013, 2005, 2001 Pearson Education, Inc. Section 2.2, Slide
1-5 5
Definition 2.2.4
If A and B are sets, then the Cartesian product (or cross product) of A and B,
written A B, is the set of all ordered pairs (a, b) such that a A and b B.
In symbols, A B = {(a, b) : a A and b B}.
Example 2.2.5
If A and B are intervals of real numbers, then in the Cartesian coordinate system with
A on the horizontal axis and B on the vertical axis, A B is represented by a rectangle.
For example, if A is the interval [1, 4) and B is the interval (2, 4], then A B is the
rectangle shown below:
y
Note: The solid lines indicate the
4 left and top edges are included.
[
A
[ )
1 4 x
Copyright © 2013, 2005, 2001 Pearson Education, Inc. Section 2.2, Slide
1-6 6
A relation between two objects a and b is a condition involving a and b that is either
true or false. When it is true, we say a is related to b; otherwise, a is not related to b.
For example, “less than” is a relation between positive integers.
When considering a relation between two objects, it is necessary to know which object
comes first. For instance, 1 < 3 is true but 3 < 1 is false. So it is natural for the formal
definition of a relation to depend on the concept of an ordered pair.
Definition 2.2.7
The first set A is referred to as the domain of the relation and denoted by dom R.
If B = A, then we speak of a relation R A A being a relation on A.
Copyright © 2013, 2005, 2001 Pearson Education, Inc. Section 2.2, Slide
1-7 7
Example 2.2.8
Returning to Example 2.2.5 where A = [1, 4) and B = (2, 4], the relation a R b given by
“a < b” is graphed as the portion of A B that lies to the left of the line x = y.
y
AB x=y
4
[
B R
2
)
A
[ )
1 4 x
x=1 x=3
Copyright © 2013, 2005, 2001 Pearson Education, Inc. Section 2.2, Slide
1-8 8
Certain relations are singled out because they possess the properties naturally associated
with the idea of equality.
Definition 2.2.9
A relation R on a set S is an equivalence relation if it has the following properties
for all x, y, z in S:
(a) x R x (reflexive property)
(b) If x R y, then y R x. (symmetric property)
(c) If x R y and y R z, then x R z. (transitive property)
Copyright © 2013, 2005, 2001 Pearson Education, Inc. Section 2.2, Slide
1-9 9
Given an equivalence relation R on a set S, it is natural to group together all the elements
that are related to a particular element.
More precisely, we define the equivalence class (with respect to R ) of x S to be the set
Ex = { y S : y R x}.
Since R is reflexive, each element of S is in some equivalence class.
Furthermore, two different equivalence classes must be disjoint. That is, if two
equivalence classes overlap, they must be equal. To see this, suppose that w Ex Ey.
Ex Ey
x
w y
x
We claim that Ex = Ey. For any x Ex we have x R x. But w Ex, so w R x
and, by symmetry, x R w. Also, w Ey, so w R y. Using transitivity twice, we have x R y.
This implies x Ey and Ex Ey. The reverse inclusion follows in a similar manner.
Thus we see that an equivalence relation R on a set S breaks S into disjoint pieces in
a natural way. These pieces are an example of a partition of the set.
Copyright © 2013, 2005, 2001 Pearson Education, Inc. Section 2.2, Slide
1-10 10
Definition 2.2.12
artition of a set S is a collection P of nonempty subsets of S such that
(a) Each x S belongs to some subset A P .
(b) For all A, B P , if A B, then A B = .
ember of P is called a piece of the partition.
Example 2.2.13
Let S = {1, 2, 3}. Then the collection P = {{1}, {2}, {3}} is a partition of S.
The the collection P = {{1, 2}, {3}} is also a partition of S.
S 1 S 1
2 3 2 3
The collection P = {{1, 2}, {2, 3}} is not a partition of S because {1, 2} and {2, 3}
are not disjoint.
Copyright © 2013, 2005, 2001 Pearson Education, Inc. Section 2.2, Slide
1-11 11
Not only does an equivalence relation on a set S determine a partition of S,
but the partition can be used to determine the relation.
Theorem 2.2.17
Let R be an equivalence relation on a set S. Then { Ex : x S} is a partition of S.
The relation “belongs to the same piece as” is the same as R.
Conversely, if P is a partition of S, let P be defined by x P y iff x and y are in the same
piece of the partition. Then P is an equivalence relation and the corresponding partition
into equivalence classes is the same as P .
Proof: Let R be an equivalence relation on S. We have already shown that {Ex : x S}
is a partition of S. Now suppose that P is the relation “belongs to the same piece
(equivalence class) as.” Then
xPy iff x, y Ez for some z S.
iff x R z and y R z for some z S.
iff x R z and z R y for some z S.
iff xRy
Thus, P and R are the same relation.
Copyright © 2013, 2005, 2001 Pearson Education, Inc. Section 2.2, Slide
1-12 12
Not only does an equivalence relation on a set S determine a partition of S,
but the partition can be used to determine the relation.
Theorem 2.2.17
Let R be an equivalence relation on a set S. Then {Ex : x S} is a partition of S.
The relation “belongs to the same piece as” is the same as R.
Conversely, if P is a partition of S, let P be defined by x P y iff x and y are in the same
piece of the partition. Then P is an equivalence relation and the corresponding partition
into equivalence classes is the same as P .
Proof:
Conversely, suppose that P is a partition of S and let P be defined by x P y iff x and y
are in the same piece of the partition. Clearly, P is reflexive and symmetric.
To see that P is transitive, suppose that x P y and y P z. Then y Ex Ez.
But this implies that Ex = Ez by the contrapositive of 2.2.12(b), so x P z.
Finally, the equivalence classes of P correspond to the pieces of P because of the way
P was defined.
Copyright © 2013, 2005, 2001 Pearson Education, Inc. Section 2.2, Slide
1-13 13