Introduction To Relations
Introduction To Relations
Introduction To Relations
Introduction to Relations
B is the codomain of R.
Notation:
Discussion
Often the relations in our examples do have special properties, but be careful not to
assume that a given relation must have any of these properties.
1.2. Examples.
Example 1.2.1. Let A = {a, b, c} and B = {1, 2, 3, 4}, and let R1 = {(a, 1), (a, 2), (c, 4)}.
Example 1.2.2. Let R2 ⊂ N × N be defined by (m, n) ∈ R2 if and only if m|n.
Example 1.2.3. Let A be the set of all FSU students, and B the set of all courses
offered at FSU. Define R3 as a relation from A to B by (s, c) ∈ R3 if and only if s is
enrolled in c this term.
Discussion
There are many different types of examples of relations. The previous examples
give three very different types of examples. Let’s look a little more closely at these
examples.
Example 1.2.2. This relation is one you will see more frequently. The set R2 is
an infinite set, so it is impossible to list all the elements of R2 , but here are some
elements of R2 :
(2, 6), (4, 8), (5, 5), (5, 0), (6, 0), (6, 18), (2, 18).
Equivalently, we could also write
2R2 6, 4R2 8, 5R2 5, 5R2 0, 6R2 0, 6R2 18, 2R2 18.
Here are some elements of N × N that are not elements of R2 :
(6, 2), (8, 4), (2, 5), (0, 5), (0, 6), (18, 6), (6, 8), (8, 6).
Example 1.2.4. Let A and B be sets and let f : A → B be a function. The graph
of f , defined by graph(f ) = {(x, f (x))|x ∈ A}, is a relation from A to B.
Notice the previous example illustrates that any function has a relation that is
associated with it. However, not all relations have functions associated with them.
Exercise 1.2.1. Suppose f : R → R is defined by f (x) = bx/2c.
Exercise 1.2.3. Let n be a positive integer. How many binary relations are there
on a set A if |A| = n? [Hint: How many elements are there in |A × A|?]
Discussion
a 1
2
b
3
c 4
Discussion
0 1 2
3 6 4 5
Discussion
The inverse of a relation R is simply the relation obtained by reversing the ordered
pairs of R. The inverse relation is also called the converse relation.
Example 1.4.1. Recall Example 1.2.1 A = {a, b, c} and B = {1, 2, 3, 4} and
R1 = {(a, 1), (a, 2), (c, 4)}. Then R−1 = {(1, a), (2, a), (4, c)}.
Exercise 1.4.1. Recall Example 1.2.4. A and B are sets and f : A → B is a
function. The graph of f , graph(f ) = {(x, f (x))|x ∈ A} is a relation from A to B.
(1) R is reflexive if
∀x[(x ∈ A) → ((x, x) ∈ R)].
(2) R is irreflexive if
∀x[(x ∈ A) → ((x, x) 6∈ R)].
(3) R is symmetric if
∀x∀y[((x, y) ∈ R) → ((y, x) ∈ R)].
(4) R is antisymmetric if
∀x∀y[([(x, y) ∈ R] ∧ [(y, x) ∈ R]) → (x = y)].
(5) R is asymmetric if
∀x∀y[((x, y) ∈ R) → ((y, x) 6∈ R)].
(6) R is transitive if
∀x∀y∀z[([(x, y) ∈ R] ∧ [(y, z) ∈ R]) → ((x, z) ∈ R)].
Discussion
Study the definitions of the definitions of the properties given above. You must
know these properties, be able to recognize whether or not a relation has a particular
property, and be able to prove that a relation has or does not have a particular
property. Notice that the definitions of reflexive and irreflexive relations are not
complementary. In fact, a relation on a set may be neither reflexive nor irreflexive.
The same is true for the symmetric and antisymmetric properties, as well as the
symmetric and asymmetric properties. Some texts use the term antireflexive for
irreflexive.
Exercise 1.5.1. Before reading further, find a relation on the set {a, b, c} that is
neither
• reflexive
• not irreflexive
• symmetric
• not antisymmetric
1. RELATIONS AND THEIR PROPERTIES 209
• not asymmetric
• transitive
Example 1.6.2. Suppose T is the relation on the set of integers given by xT y if
2x − y = 1. This relation is. . .
• not reflexive
• not irreflexive
• not symmetric
• antisymmetric
• not asymmetric
• not transitive
Example 1.6.3. Suppose A = {a, b, c, d} and R is the relation {(a, a)}. This
relation is. . .
• not reflexive
• not irreflexive
• symmetric
• antisymmetric
• not asymmetric
• transitive
Discussion
The examples above illustrate three rather different relations. Some of the rela-
tions have many of the properties defined on Section 1.5, whereas one has only one
of the property. It is entirely possible to create a relation with none of the properties
given in Section 1.5.
Exercise 1.6.1. Give an example of a relation that does not satisfy any property
given in Section 1.5.
• not reflexive
Proof. 2 is an integer and 2 · 2 − 2 = 2 6= 1. This shows that ∀x[x ∈
Z → (x, x) ∈ T ] is not true.
• not irreflexive
Proof. 1 is an integer and 2 · 1 − 1 = 1. This shows that ∀x[x ∈ Z →
(x, x) 6∈ T ] is not true.
1. RELATIONS AND THEIR PROPERTIES 210
• not symmetric
Proof. Both 2 and 3 are integers, 2 · 2 − 3 = 1, and 2 · 3 − 2 = 4 6= 1.
6 2; that is, ∀x∀y[(x, y) ∈ Z → (y, x) ∈ T ] is not
This shows 2R3, but 3 R
true.
• antisymmetric
Proof. Let m, n ∈ Z be such that (m, n) ∈ T and (n, m) ∈ T . By the
definition of T , this implies both equations 2m − n = 1 and 2n − m = 1
must hold. We may use the first equation to solve for n, n = 2m − 1, and
substitute this in for n in the second equation to get 2(2m − 1) − m = 1. We
may use this equation to solve for m and we find m = 1. Now solve for n
and we get n = 1.
This shows that the only integers, m and n, such that both equations
2m − n = 1 and 2n − m = 1 hold are m = n = 1. This shows that
∀m∀n[((m, n) ∈ T ∧ (n, m) ∈ T ) → m = n].
• not asymmetric
Proof. 1 is an integer such that (1, 1) ∈ T . Thus ∀x∀y[((x, y) ∈ T →
(b, a) 6∈ T ] is not true (counterexample is a = b = 1).
• not transitive
Proof. 2, 3, and 5 are integers such that (2, 3) ∈ T , (3, 5) ∈ T , but
(2, 5) 6∈ T . This shows ∀x∀y∀z[(x, y) ∈ T ∧ (y, z) ∈ T → (x, z) ∈ T ] is not
true.
Example 1.7.2. Recall Example 1.2.2: R2 ⊂ N × N was defined by (m, n) ∈ R2
if and only if m|n.
• reflexive
Proof. Since n|n for all integers, n, we have nR2 n for every integer.
This shows R2 is reflexive.
• not irreflexive
Proof. 1 is an integer and clearly 1R2 1. This shows R2 is not irreflexive.
(you could use any natural number to show R2 is not irreflexive).
• not symmetric
Proof. 2 and 4 are natural numbers with 2|4, but 4 6 |2, so 2R2 4, but
6 2 2. This shows R2 is not reflexive.
4R
• antisymmetric
Proof. Let n, m ∈ N be such that nR2 m and mR2 n. By the definition
of R2 this implies n|m and m|n. Hence we must have m = n. This shows R2
is antisymmetric.
1. RELATIONS AND THEIR PROPERTIES 211
• not asymmetric
Proof. Let m = n be any natural number. Then nR2 m and mR2 n,
which shows R2 is not asymmetric. (You may use a particular number to
show R2 is not asymmetric.
• transitive
Proof. Let p, q, r ∈ N and assume pR2 q and qR2 r. By the definition of
R2 this means p|q and q|r. We have proven in Integers and Division that
this implies p|r, thus pR2 r. This shows R2 is transitive.
Discussion
Exercise 1.7.2. Prove whether or not each of the properties in Section 1.5 holds
for the relation in Example 1.6.1.
Exercise 1.7.3. Prove whether or not each of the properties in Section 1.5 holds
for the relation in Example 1.6.3.
Notice that R1 and R2 are both transitive (vacuously, since there are no two ele-
ments satisfying the conditions of the property). However R1 ∪ R2 is not transitive.
If it were it would have to have (1, 1) and (2, 2) in R1 ∪ R2 .
Discussion
Example 1.9.1 gives a counterexample to show that the union of two transitive
relations is not necessarily transitive. Note that you could find an example of two
transitive relations whose union is transitive. However, the question asks if the given
property holds for two relations must it hold for the binary operation of the two
relations. This is a general question and to give the answer “yes” we must know it is
true for every possible pair of relations satisfying the property.
Solution: Yes.
Proof. Assume R and S are both transitive and let (a, b), (b, c) ∈ R ∩ S. Then
(a, b), (b, c) ∈ R and (a, b), (b, c) ∈ S. It is given that both R and S are transitive,
so (a, c) ∈ R and (a, c) ∈ S. Therefore (a, c) ∈ R ∩ S. This shows that for arbitrary
(a, b), (b, c) ∈ R ∩ S we have (a, c) ∈ R ∩ S. Thus R ∩ S is transitive.
1.10. Composition.
Definitions 1.10.1.
(1) Let
• R1 be a relation from A to B, and
• R2 be a relation from B to C.
1. RELATIONS AND THEIR PROPERTIES 213
Discussion
Notice that if there is no element of B such that (a, b) ∈ R1 and (b, c) ∈ R2 for
some a ∈ A and c ∈ C, then the composition is empty.
Discussion
It can help to consider the following type of diagram when discussing composition
of relations, such as the ones in Example 1.11.1 as shown here.
1. RELATIONS AND THEIR PROPERTIES 214
a 1 I
2 II
b
3 III
c 4 IV
Example 1.11.2. If R and S are transitive binary relations on A, is R ◦ S tran-
sitive?
(a) R ∪ S
(b) R ∩ S
(c) R ⊕ S
(d) R − S
(e) R ◦ S
(f ) R−1
(g) Rn
(3) P is the transitive property.
(a) R ∪ S
(b) R ∩ S
(c) R ⊕ S
(d) R − S
(e) R ◦ S
(f ) R−1
(g) Rn
Assume (x, y), (y, z) ∈ R. But by the definition of composition, this implies
(x, z) ∈ R2 . But R2 ⊆ R, so (x, z) ∈ R. This shows R is transitive.
Discussion
1. RELATIONS AND THEIR PROPERTIES 216