Week 2
Week 2
Relations
INTRODUCTION
• The reader is familiar with many relations such
as “less than,” “is parallel to,” “is a subset of,”
and so on.
• In a certain sense, these relations consider the
existence or nonexistence of a certain
connection between pairs of objects taken in a
definite order. Formally, we define a relation in
terms of these “ordered pairs.”
• 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)
A × B = {(a, b) | a ∈ A and b ∈ B}
–A1 × A2 × ・ ・ ・ ×An
Definition
• Definition 1: Let A and B be sets. A binary relation
or, simply, relation from A to B is a subset of A × B.
• Suppose R is a relation from A to B. Then R is a set
of ordered pairs where each first element comes
from A and each second element comes from B.
• That is, for each pair a ∈ A and b ∈ B, exactly one
of the following is true:
(i) (a, b) ∈ R; we then say “a is R-related to b”,
written aRb.
(ii) (a, b) !∈ R; we then say “a is not R-related to b”,
written a!Rb.
• If R is a relation from a set A to itself, that is, if
R is a subset of A2 = A×A, then we say that R is
a relation on A.
• The domain of a relation R is the set of all first
elements of the ordered pairs which belong to
R, and the range is the set of second elements.
• EXAMPLE 1
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!Rx, 2!Rx, 2!Ry, 2!Rz, 3!Rx, 3!
Rz
• The domain of R is {1, 3} and the range is {y, 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}
•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