13 Relations
Relations
Now that we have studied sets, we begin to relate elements in sets. The elements can be related between across multiple or between different sets, as well as linked on its own. In all cases are called relations. To define a relation from set to set
, the concept of cartesian product or cross product is needed. Let us explore.
Definition. (Cartesian/Cross Product)
Let and
be sets. The cartesian product or cross product of
and
is
Definition. (Relation)
Let and
be sets. The relation from
to
is defined as a subset of
. To denote
is
-related or related to
, we write
Suppose there is a relation from to
, where
and
are nonempty sets. As
is defined as a subset of
, considering all subsets, not all elements have to be related. In other words, there will be some elements related in
, as well as in
. Formally, they are defined as
Definition. (Domain and Range)
The domain of the relation from
to
is the set
The range of the relation from
to
is the set
Note that by definition, and
.
Now, let us consider some special cases. A relation can also be defined from set to
itself. If so, it is called a relation on
. Further, if each element
of
is related to the same element
itself, it is called the identity relation on
, and denoted
Also, we can define the relation, the inverse of , whose element pairs are reversed, i.e.
Naturally, the following theorem is borne.
Theorem.
For any relation from
to
,
*
*
We can also consider a relation where multiple sets are involved. For example, when is a relation from
to
, and
is a relation from
to
, the composite of
and
is
Note that the order of the composite is from right to left, not from left to right.
Some useful theorems are as follows:
Theorem.
*
*
i.e. composition of relations is associative.
*
We conclude this chapter with some examples.
In fact, the familiar linear function , with slope
, can be viewed as the identity relation
of
on
. Indeed,
.
Let be the relation on
given by
iff
.
Then, the inverse of is obtained by switching
and
, i.e.
Then,
Note that and
.
Equivalence Relations
While exploring relations, we can discover a few traits of relations, namely, reflexivity, symmetry, and transitivity. We define an equivalence relation as a relation that is reflexive, symmetric, and transitive. Let us examine each trait as follows.
Definition. (Equivalence Relation)
A relation on
is an equivalence relation with the following attributes:
1. Reflexivity
for all
.
2. Symmetry
for all
.
3. Transitivity
for all
.
Let us illustrate with an example.
Example. Determine whether given by “
” on
is an equivalence relation.
Let given by “
” be a relation on
.
Then, this relation is in fact , and thus an equivalence relation. To verify,
1. Reflexivity
for all
.
2. Symmetry
In fact, is the only form found in
, i.e. there does not exist
such that
.
Therefore, is symmetric, since
for all
.
3. Transitivity
Again, since is the only form found in
,
is transitive.
In fact, the concept of an equivalence relation entails another important concept, the equivalence class, partitioning the set into disjoint sets.
Definition. (Equivalence Relation and Equivalence Class)
Let be an equivalence relation on a set
. Then, the equivalence class of
determined by
is
with alternative names of “the class of modulo
” or “
mod
“.
The set of all equivalence classes of over
is called
modulo
, denoted
Let us illustrate with an example.
Example. Identify all equivalence classes of the relation
on the set .
Note
Therefore,
We can see each element of is mutually disjoint and thus partitions the original set
.
Ordering Relations
So far we have discussed sets and set theory; and building a relation by linking elements across sets. Now we turn our focus to the order or hierarchy of elements contained in a given set. To begin with, let us introduce a concept, antisymmetry.
Definition. (Antisymmetry)
Given a relation on a set
, antisymmetry is defined as
Definition. (Partial Ordering)
A set is a partially ordered set or poset, if the relation
on the set
is reflexive, antisymmetric, and transitive.
The only difference with an equivalence relation is antisymmetry vs symmetry. Note that antisymmetry is not .
Extending the idea of partial ordering, now we introduce the supremum, or least upper bound, and the infimum, or greatest lower bound.
Definition
For a partial order for a set
and
,
* is an upper bound for
if
for all
.
* is a lower bound for
if
for all
.
* is a supremum for
, denoted
, if
1. is an upper bound for
, and
2. for every upper bound
for
* is an infimum for
, denoted
, if
1. is a lower bound for
, and
2. for every lower bound
for
Let us illustrate with an example.
Example. Show that if exists, it is unique, where
is a partial order for a set
and
.
Proof.
Let both and
be least upper bounds for
.
Then, both and
are upper bounds.
Then, by definition of supremum, .
Then, by antisymmetry.