100% found this document useful (1 vote)
64 views27 pages

Relations: by Dr. Mugabi Francis (PHD)

The document discusses relations and ordered pairs. It defines an ordered pair as having a first and second element, denoted (a,b). The Cartesian product of two sets A and B, written A × B, is the set of all ordered pairs with the first element from A and the second from B. It provides examples of calculating Cartesian products and discusses properties like A × B being equal to B × A. Compositions of relations R and S going from set A to B and B to C, written R ◦ S, are defined as the relation from A to C where a is related to c if there is a b where a is related to b by R and b is related to c by S.

Uploaded by

Abdullahi Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
64 views27 pages

Relations: by Dr. Mugabi Francis (PHD)

The document discusses relations and ordered pairs. It defines an ordered pair as having a first and second element, denoted (a,b). The Cartesian product of two sets A and B, written A × B, is the set of all ordered pairs with the first element from A and the second from B. It provides examples of calculating Cartesian products and discusses properties like A × B being equal to B × A. Compositions of relations R and S going from set A to B and B to C, written R ◦ S, are defined as the relation from A to C where a is related to c if there is a b where a is related to b by R and b is related to c by S.

Uploaded by

Abdullahi Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

RELATIONS

By

Dr. Mugabi Francis (PhD)


1
Ordered pair
 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}.
E.g: R denotes the set of real numbers and so R2= R×R is
the set of ordered pairs of real numbers. 2
Product sets
 Consider 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}
 One frequently writes A2 instead of A × A.

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)}

 Also, A × A = {(1, 1), (1, 2), (2, 1), (2, 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.

 Using n(S) for the number of elements in a set S, we


have:
n(A × B) = 6 = 2(3) = n(A)n(B).

5
Notes

 For any sets A1,A2, . . . , An, the set of all ordered n-


tuples (a1, a2, . . . , an) where a1 ∈ A1, a2 ∈ A2, . . . ,
an ∈ An is called the product of the sets A1, . . . , An
and is denoted by A1 × A2 ×・ ・ ・×An or

 Just as we write instead of A × A, so we write
instead of A × A×・ ・ ・×A, where there are n factors
all equal to A.
 For example, R3 = R × R × R denotes the usual three-
dimensional space.
6
Exe
1. Given: A = {1, 2}, B = {x, y, z}, and C = {3, 4}. Find:
A × B × C.

2. Find x and y given (2x, x + y) = (6, 2).

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.

 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.

8
Relations
 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) we then say “a is not R-related to b”,


written

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.

 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.

10
Relations…
 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 1Rx, 2Rx, 2Ry, 2Rz, 3Rx, 3Rz

 The domain of R is {1, 3} and the range is {y, z}.

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.

 First we write down the elements of the set, and then


we draw an arrow from each element x to each element
y whenever x is related to y.

 This diagram is called the directed graph of the


relation. 13
Pictorial representations of
relations…

 The figure below, shows the directed graph of the


following relation R on the set A = {1, 2, 3, 4}:

 R = {(1, 2), (2, 2), (2, 4), (3, 2), (3, 4), (4, 1), (4, 3)}

 Observe that there is an arrow from 2 to itself, since 2


is related to 2 under R.

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.

(i) Form a rectangular array (matrix) whose rows are


labeled by the elements of A and whose columns are
labeled by the elements of B.

Put a 1 or 0 in each position of the array according as a


∈ A is or is not related to b ∈ B.
This array is called the matrix of the relation. 16
Pictures of relations on a finite set…
(ii) Write down the elements of A and the elements of B
in two disjoint disks, and then draw an arrow from
a ∈ A to b ∈ B whenever a is related to b.

 This picture will be called the arrow diagram of the


relation.

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.

 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 aRb and bSc.

19
Composition of relations

 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.

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)}

 Consider the arrow diagrams of R and S as in Fig. 2-4.


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. 21
Example…

 Thus: 2(R ◦ S)z since 2Rd and dSz

 Similarly there is a path from 3 to x and a path from 3


to z. Hence, 3(R◦S)x and 3(R◦S)z

 No other element of A is connected to an element of C.


Accordingly,
 R ◦ S = {(2, z), (3, x), (3, z)}
22
Example…

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.

 (b) Find the matrices MR, MS, and MR ◦S of the respective


relations R, S, and R◦S, and compare MR ◦S to the product
MR MS. 26
The End

GOD BLESS YOU!!!

27

You might also like