Chapter 2 Relations: Product Sets
Chapter 2 Relations: Product Sets
An ordered pair of elements a and b, where a is designated as the first element and b as the second element, is denoted
by (a, b). In particular,
(a, b) = (c, d)
if and only if a = c and b = d. Thus (a, b) ≠ (b, a) unless a = b. This contrasts with sets where the order of elements is
irrelevant; for example, {3, 5} = {5, 3}.
PRODUCT SETS
Consider two arbitrary sets A and B. The set of all ordered pairs (a, b) where a ∈ A and b ∈ B is called the product, or
Cartesian product, of A and B. A short designation of this product is A × B, which is read “A cross B.” By definition,
A × B = {(a, b) | a ∈ A and b ∈ B}
BINARY RELATION
Let A and B be two sets. A binary relation from A to B is a subset of a Cartesian product A x B.
• Let R ⊆ A x B means R is a set of ordered pairs of the form (a, b) where a ∈ A and b ∈ B.
• We use the notation a R b to denote (a, b) ∈ R and a R b to denote (a, b) ∉ R. If a R b, we say a is related to
b by R.
Example
Let A = {a, b, c} and B = {1, 2, 3}.
• Is R = {(a, 1), (b, 2), (c, 2)} a relation from A to B? Yes.
• Is Q = {(1, a), (2, b)} a relation from A to B? No.
• Is P = {(a, a), (b, c), (b, a)} a relation from A to A? Yes.
Example
Let A = {0, 1, 2}, B = {u, v} and R = { (0, u), (0, v), (1, v), (2, u) }
Note: R ⊆ A x B.
Graph:
Representing binary relations
We can represent a binary relation R by a table showing (marking) the ordered pairs of R.
Example
Let A = {0, 1, 2}, B = {u, v} and R = {(0, u), (0, v), (1, v), (2, u)}
Table:
Another example
A = (1, 2, 3) and B = {x, y, z}, and let R = {(1, y), (1, z), (3, y)}. Then R is a relation from A to B since R is a subset of A
× B. With respect to this relation,
1Ry, 1Rz, 3Ry, but 1Ꞧx, 2Ꞧ, 2Ꞧy, 2Ꞧz, 3Ꞧx, 3Ꞧz
INVERSE RELATION
Let R be any relation from a set A to a set B. The inverse of R, denoted by R −1, is the relation from B to A which consists
of those ordered pairs which, when reversed, belong to R; that is,
R−1 = {(b, a) | (a, b) R}
For example, let A = {1, 2, 3} and B = {x, y,z}. Then the inverse of
R = {(1, y), (1, z), (3, y)} is R−1 = {(y, 1), (z, 1), (y, 3)}
COMPOSITION OF RELATIONS
Let A, B and C be sets, and let R be a relation from A to B and let S be a relation from B to C. That is, R is a subset of A ×
B and S is a subset of B × C. Then R and S give rise to a relation from A to C denoted by R○S and defined by:
a(R○S) c if for some b B we have a R b and b S c.
That is,
R○S = {(a, c) | there exists b B for which (a, b) R and (b, c) S}
The relation R○S is called the composition of R and S; it is sometimes denoted simply by RS.
Suppose R is a relation on a set A, that is, R is a relation from a set A to itself. Then R○R, the composition of R with itself,
is always defined. Also, R○R is sometimes denoted by R2. Similarly, R3 = R2○R = R○R○R, and so on. Thus, Rn is defined for
all positive n.
Warning: Many texts denote the composition of relations R and S by S○R rather than R○S. This is done in order to conform
with the usual use of g○f to denote the composition of f and g where f and g are functions. Thus, the reader may have to
adjust this notation when using this text as a supplement with another text. However, when a relation R is composed with
itself, then the meaning of R◦R is unambiguous.
EXAMPLE
Let A = {1, 2, 3, 4}, B = {a, b, c, d}, C = {x, y, z} and let
R = {(1, a), (2, d), (3, a), (3, b), (3,d)} and S = {(b, x), (b, z), (c, y), (d, z)}
Consider the arrow diagrams of R and S shown in the figure below. Observe that there is an arrow from 2 to d
which is followed by an arrow from d to z. We can view these two arrows as a “path” which “connects” the element
2 A to the element z C. Thus:
2(R○S) z since 2Rd and dSz
The nonzero entries in this matrix tell us which elements are related by R○S. Thus M = MRMS and MR○S have the same
nonzero entries.
TYPES OF RELATIONS
Reflexive Relations
A relation R on a set A is reflexive if aRa for every a ∈ A, that is, if (a, a) ∈ R for every a ∈ A. Thus, R is not reflexive if
there exists a ∈ A such that (a, a) ∉ R.
EXAMPLE 1
Consider the following five relations on the set A = {1, 2, 3, 4}:
R1 = {(1, 1), (1, 2), (2, 3), (1, 3), (4, 4)}
R2 = {(1, 1), (1, 2), (2, 1), (2, 2), (3, 3), (4, 4)}
R3 = {(1, 3), (2, 1)}
R4 = ∅, the empty relation
R5 = A × A, the universal relation
Determine which of the relations are reflexive.
Since A contains the four elements 1, 2, 3, and 4, a relation R on A is reflexive if it contains the four pairs (1, 1),
(2, 2), (3, 3), and (4, 4). Thus, only R2 and the universal relation R5 = A × A are reflexive. Note that R1, R3, and
R4 are not reflexive since, for example, (2, 2) does not belong to any of them.
EXAMPLE 2
Consider the following five relations:
(1) Relation ≤ (less than or equal) on the set Z of integers.
(2) Set inclusion ⊆ on a collection C of sets.
(3) Relation ⊥ (perpendicular) on the set L of lines in the plane.
(4) Relation ǁ (parallel) on the set L of lines in the plane.
(5) Relation | of divisibility on the set N of positive integers. (Recall x |y if there exists z such that
xz = y.)
Determine which of the relations are reflexive.
The relation (3) is not reflexive since no line is perpendicular to itself. Also (4) is not reflexive since no line is
parallel to itself. The other relations are reflexive; that is, x ≤ x for every x ∈ Z, A ⊆ A for any set A ∈ C, and n |
n for every positive integer n ∈ N.
A relation R on a set A is antisymmetric if whenever aRb and bRa then a = b, that is, if a ≠ b and aRb then bꞦa.
Thus, R is not antisymmetric if there exist distinct elements a and b in A such that aRb and bRa.
EXAMPLE
(a) Determine which of the relations in Example 1 are antisymmetric.
R2 is not antisymmetric since (1, 2) and (2, 1) belong to R 2, but 1 ≠ 2. Similarly, the universal
relation R3 is not antisymmetric. All the other relations are antisymmetric.
(b) Determine which of the relations in Example 2 are antisymmetric.
The relation ≤ is antisymmetric since whenever a ≤ b and b ≤ a then a = b. Set inclusion ⊆ is
antisymmetric since whenever A ⊆ B and B ⊆ A then A = B. Also, divisibility on N is antisymmetric
since whenever m | n and n | m then m = n. (Note that divisibility on Z is not antisymmetric since
3 | −3 and −3 | 3 but 3 ≠ −3.) The relations ⊥ and ǁ are not antisymmetric.
Remark: The properties of being symmetric and being antisymmetric are not negatives of each other. For example,
the relation R = {(1, 3), (3, 1), (2, 3)} is neither symmetric nor antisymmetric. On the other hand, the relation R’
= {(1, 1), (2, 2)} is both symmetric and antisymmetric.
Transitive Relations
A relation R on a set A is transitive if whenever aRb and bRc then aRc, that is, if whenever (a, b), (b, c) ∈ R then (a, c) ∈
R. Thus, R is not transitive if there exist a, b, c ∈ R such that (a, b), (b, c) ∈ R but (a, c) ∉R.
EXAMPLE
(a) Determine which of the relations in Example 1 are transitive.
The relation R3 is not transitive since (2, 1), (1, 3) ∈ R3 but (2, 3) ∉ R3. All the other relations are
transitive.
(b) Determine which of the relations in Example 2 are transitive.
The relations ≤, ⊆, and | are transitive, but certainly not ⊥. Also, since no line is parallel to itself,
we can have a ǁ b and b ǁ a, but a ǁa. Thus, ǁ is not transitive. (We note that the relation “is parallel
or equal to” is a transitive relation on the set L of lines in the plane.)
EQUIVALENCE RELATIONS
Consider a nonempty set S. A relation R on S is an equivalence relation if R is reflexive, symmetric, and transitive. That is,
R is an equivalence relation on S if it has the following three properties:
(1) For every a ∈ S, aRa.
(2) If aRb, then bRa.
(3) If aRb and bRc, then aRc.
The general idea behind an equivalence relation is that it is a classification of objects which are in some way “alike.” In
fact, the relation “=” of equality on any set S is an equivalence relation; that is:
(1) a = a for every a ∈ S.
(2) If a = b, then b = a.
(3) If a = b, b = c, then a = c.
Other equivalence relations follow.
EXAMPLE
(a) Let L be the set of lines and let T be the set of triangles in the Euclidean plane.
(i) The relation “is parallel to or identical to” is an equivalence relation on L.
(ii) The relations of congruence and similarity are equivalence relations on T.
(b) The relation ⊆ of set inclusion is not an equivalence relation. It is reflexive and transitive, but it is not
symmetric since A ⊆ B does not imply B ⊆ A.
(c) Let m be a fixed positive integer. Two integers a and b are said to be congruent modulo m, written
a ≡ b (mod m)
since 4 divides 11 − 3 = 8 and 4 divides 22 − 6 = 16. This relation of congruence modulo m is an important
equivalence relation.