Relations: by Dr. Mugabi Francis (PHD)
Relations: by Dr. Mugabi Francis (PHD)
By
3
Example
Let A = {1, 2} and B = {a, b, c}. Then
A × B = {(1, a), (1, b), (1, c), (2, a), (2, b), (2, c)}
B × A = {(a, 1), (b, 1), (c, 1), (a, 2), (b, 2), (c, 2)}
4
Notes
A×B = B ×A. The Cartesian product deals with ordered
pairs, so naturally the order in which the sets are
considered is important.
5
Notes
7
Relations
Definition: Let A and B be sets. A binary relation or,
simply, relation from A to B is a subset of A × B.
8
Relations
That is, for each pair a ∈ A and b ∈ B, exactly one of
the following is true:
9
Relations…
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.
10
Relations…
A = (1, 2, 3) and B = {x, y, z}, and let
R = {(1, y), (1, z), (3, y)}.
11
Inverse relations
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}
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)}
Clearly, if R is any relation, then (R−1)-1 = R.
Also, the domain and range of R−1 are equal, respectively,
to the range and domain of R. Moreover, if R is a relation
on A, then R−1 is also a relation on A. 12
Pictorial representations of relations
Directed Graphs of Relations on Sets
There is an important way of picturing a relation R on
a finite set.
R = {(1, 2), (2, 2), (2, 4), (3, 2), (3, 4), (4, 1), (4, 3)}
14
Pictorial representations of
relations…
15
Pictures of relations on a finite set
Suppose A and B are finite sets. There are two ways of
picturing a relation R from A to B.
17
Figures
18
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.
19
Composition of relations
That is ,
R ◦ S = {(a, c) | there exists b ∈ B for which (a, b) ∈ R and
(b, c) ∈ S}
20
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)}
23
Compositions of relations and
matrices
There is another way of finding R◦S. Let MR and MS
Denote, respectively the matrix representations of the
relations R and S. Then
24
Compositions of relations and
matrices…
25
Exe
Let A = {1, 2, 3},B = {a, b, c}, and C = {x, y, z}. Consider
the following relations R and S from A to B and from B
to C, respectively.
R = {(1, b), (2, a), (2, c)} and S = {(a, y), (b, x), (c, y), (c, z)}
(a) Find the composition relation R◦S.
27