s1 1relintro
s1 1relintro
Relations
B is the codomain of R.
Notation.
We recall the basic definitions and terminology associated with the concept of
a relation from a set A to a set B. You should review the notes from MAD 2104
whenever you wish to see more examples or more discussion on any of the topics we
review here.
Discussion
0 1 2
3 6 4 5
Discussion
Recall the connection matrix for a finite relation is a method for representing a
relation using a matrix.
Remark 1.4.1. The ordering of the elements in A and B is important. If the
elements are rearranged the matrix would be different! If there is a natural order to
the elements of the sets (like numerical or alphabetical) you would expect to use this
order when creating connection matrices.
To find this matrix we may use a table as follows. First we set up a table labeling
the rows and columns with the vertices.
e f g h
a
b
c
1. RELATIONS AND THEIR PROPERTIES 11
Since (a, e) ∈ R we put a 1 in the row a and column e and since (c, g) ∈ R we put
a 1 in row c and column g.
e f g h
a 1
b
c 1
Fill in the rest of the entries with 0’s. The matrix may then be read straight from
the table.
Discussion
The inverse of a relation R is the relation obtained by simply reversing the ordered
pairs of R. The inverse of a relation is also called the converse of a relation.
Example 1.5.1. Let A = {a, b, c} and B = {1, 2, 3, 4} and let R = {(a, 1), (a, 2), (c, 4)}.
Then R−1 = {(1, a), (2, a), (4, a)}.
Exercise 1.5.1. Suppose 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)].
1. RELATIONS AND THEIR PROPERTIES 12
(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
The definition above recalls six special properties that a relation may (or may
not) satisfy. Notice that the definitions of reflexive and irreflexive relations are not
complementary. That is, a relation on a set may be both reflexive and irreflexive or
it may be neither. The same is true for the symmetric and antisymmetric properties,
as well as the symmetric and asymmetric properties.
The terms reflexive, symmetric, and transitive is generally consistent from author
to author. The rest are not as consistent in the literature
Exercise 1.6.1. Before reading further, find a relation on the set {a, b, c} that is
neither
• reflexive
• not irreflexive
• symmetric
• not antisymmetric
• not asymmetric
• transitive
Example 1.7.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
1. RELATIONS AND THEIR PROPERTIES 13
• not symmetric
• antisymmetric
• not asymmetric
• not transitive
Example 1.7.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
• 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.
• 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
1. RELATIONS AND THEIR PROPERTIES 14
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.
Exercise 1.7.1. Verify the assertions made about the relation in Example 1.7.1
in Section 1.7.
Exercise 1.7.2. Verify the assertions made about the relation in Example 1.7.3
in Section 1.7.
Exercise 1.7.3. Suppose R ⊂ Z+ × Z+ is the relation defined by (m, n) ∈ R if
and only if m|n. Prove that R is
(a) reflexive.
(b) not irreflexive.
(c) not symmetric.
(d) antisymmetric.
(e) not asymmetric.
(f ) transitive.
Discussion
Connection matrices may be used to test if a finite relation has certain properties
and may be used to determine the composition of two finite relations.
1. RELATIONS AND THEIR PROPERTIES 15
0 0 1 0
1 0 0 0
.
0 0 0 1
0 1 0 0
1 1 1 0
1 0 0 0
.
1 0 0 1
0 0 1 0
Discussion
Notice that when we combine two relations using one of the binary set operations
we are combining sets of ordered pairs.
Notice that R and S are both transitive (vacuously, since there are no two elements
satisfying the hypothesis of the conditions of the property). However R ∪ S is not
transitive. If it were it would have to have (1, 1) and (2, 2) in R ∪ S.
Discussion
The solution to Example 1.10.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. The question, however,
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 suppose (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.
As it turns out, the intersection of any two relations satisfying one of the properties
in Section 1.6 also has that property. As the following exercise shows, sometimes even
more can be proved.
Exercise 1.10.1. Suppose R and S are relations on a set A.
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.
1. RELATIONS AND THEIR PROPERTIES 18
Discussion
It can help to consider the following type of diagram when discussing composition
of relations, such as the ones in Example 1.12.1 shown here.
a 1 I
2 II
b
3 III
c 4 IV
Example 1.12.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−1
(e) Rn , n ≥ 2
Exercise 1.12.3. Suppose R and S are relations on a set A that are symmetric.
Prove or disprove the relation obtained by combining R and S in one of the following
ways is symmetric.
(a) R⊕S
(b) R−S
(c) R◦S
(d) R−1
(e) Rn , n ≥ 2
Exercise 1.12.4. Suppose R and S are relations on a set A that are transitive.
Prove or disprove the relation obtained by combining R and S in one of the following
ways is transitive.
(a) R⊕S
(b) R−S
(c) R◦S
(d) R−1
(e) Rn , n ≥ 2
Assume (x, y), (y, z) ∈ R. The definition of composition implies (x, z) ∈ R2 . But
R2 ⊆ R, so (x, z) ∈ R. Thus R is transitive.
Discussion