8.1 Relations on Sets
Definition: Relation
Let A and B be sets. A relation R from A to B is a subset
of A ⨯ B. Given an ordered pair (x,y) in A ⨯ B,
x is related to y by R, written x R y, if and only if,
(x, y) is in R. The set A is called the domain of R and the set B
is called its co-domain.
- x R y means that (x, y) ∈ R
Examples
- Less-than Relation (defined from R to R): x L y ↔ x < y
- Congruence Modulo 2 Relation (defined from Z to Z): m E n ↔ m - n is even
Definition: Inverse Relation
Let R be a relation from A to B. Define the inverse relation R-1
from B to A as follows:
- R-1 = {(y, x) ∈ B ⨯ A | (x, y) ∈ R}
Definition: Relation on a Set
A relation on a set A is a relation from A to A.
In Class Exercises
- 3. The congruence modulo 3 relation, T, is defined from Z to Z
as follows: For all integers m and n, m T n ↔ 3 | (m - n)
- Is 10 T 1? Is 1 T 10? Is (2, 2) ∈ T? Is (8, 1) ∈ T?
- List 3 integers n such that n T 0.
- 11. Let A = {3, 4, 5} and B = {4, 5, 6} and let S be the "divides"
relation. That is, for every ordered pair (x, y) ∈ A ⨯ B,
x S y ↔ x | y. State explicitly which ordered pairs
are in S and S-1.
- 15. Let A = {2, 3, 4, 5, 6, 7, 8} and define a relation R on A
as follows: For every x, y ∈ A, x R y ↔ x | y.
Draw the directed graph of the relation defined by R.
- 19. Let A = {2, 4} and B = {6, 8, 10} and define relations
R and S from A to B as follows: For every (x, y) ∈ A ⨯ B,
- x R y ↔ x | y and
- x S y ↔ y - 4 = x
State explicitly which ordered pairs are in A ⨯ B, R, S, R ∪ S
and R ∩ S.