Relations
This chapter is covers notes on relations.
- Binary Relations
- Homogenous Relations
- Heterogenous Relations
- Types of Relations
- The Empty Relation
- Reflexive Relations
- Irreflexive Relations
- Quasi-reflexive Relations
- Symmetric Relations
- Antisymmetric Relations
- Asymmetric Relations
- Transitive Relations
- Intransitive Relations
- Left-total Relations
- Right-total Relations
- Comparable Relations
- Connex Relations
- Incomparable Relations
- Right Euclidean Relation
- Left Euclidean Relation
- Equivalence Relations
- Partial Orders
- Weak Partial Orders
- Strong Partial Orders
- Total Order
- Preorders
- Posets
- Maps
In the previous chapter on tuples, we saw that, given some sets
we can encapsulate all the possible tuples
into a single set called the Cartesian product. But what if we want to specify just a part of the Cartesian product? For that, we use another special set called a relation. We'll start with the simplest type, the binary relation.
Binary Relations
A binary relation is defined as follows:
binary relation. A set of ordered pairs is called a relation.
Notice what this definition implies: is a set, whose members are always 2-tuples (ordered pairs). For example, the set:
is a relation. In some cases, the relation is actually a subset of a Cartesian product. For example, suppose we had the following sets:
The Cartesian product of these two sets is:
A binary relation is simply a subset of this Cartesian product. For example, this is a binary relation:
and so is this:
and this:
Notice that this is also the Cartesian product we specified earlier. The binary relation does not have to be a strict subset of the Cartesian product. It just has to be a subset. I.e., we can never have a tuple where and
Now that we've seen what a relation is, let's introduce some new notation.
relation notation. Let be a relation from to That is,
If we say " is related to by " and we write:
Otherwise, if we say " is not related to by " and write:
Relations Generally
Much like how the Cartesian product can be generalized to handle an number of sets, relations can be generalized for an number of sets.
general definition of a relation. Let be sets. An -ary relation on the sets is a subset of
and is the relation's degree, and are called the relation's projections.
Certain -ary relations have unique names. For example, when we have a ternary relation. When we have a quaternary relation. -ary relations are examined in closer detail at a later juncture. Until then, we'll use binary relations to explore the various properties of relations. Accordingly, we'll use the word "relation" to mean a binary relation, unless otherwise stated.
Relation Language
It's important to get used to some of the language associated with relations. Below are some common phrases often used in the study of relations.
Phrase | Symbolic Representation |
---|---|
is a relation on | |
is a relation in | |
is a relation from to | |
is related to by | , |
Homogenous Relations
Earlier, we saw the relation Notice that this is a relation from a set to itself. We call such relations homogenous relations.
homogenous relations. A relation on a set is a relation from to That is,
We call the set the domain of discourse of
For example, say we had the set:
The relation:
is a homogenous relation, since it consists of pairs where both elements are of the same set, Explicitly listing its members:
Other examples of homogenous relations include and Homogenous relations are particularly important because (1) they're the simplest relations to work with (the domain and the range are the same), and (2) they provide a medium for examining the properties of relations. Before we examine these properties, we introduce some special homogenous relations.
Heterogenous Relations
In contrast to homogenous relations, heterogenous relations are relations over two different sets and For these relations, we call the set the relation's domain, and the relation's codomain. Heterogenous relations introduce several new types of relations.
For the first few types of relations, we'll stick to homogenous relations. That is, a relation on a single set called the domain of discourse Starting with left-unique relations, we'll start using heterogenous relations, but it's important to keep in mind that for such relations, we can have
Types of Relations
We now examine the various types of relations. As it turns out, there are many different types.
The Empty Relation
Because relations are simply sets of tuples, it follows that relations are sets. As such, there's a special relation called the empty relation â the relation that contains no members.
empty relation. Let be a set. The empty relation on is defined as:
Reflexive Relations
The is equal to relation on the set of real numbers is an example of a reflexive relation â every real number is equal to to itself. Let's see a visual example. In the diagram below, the colored cells are members of a relation
The relation is an example of a reflexive relation â a relation containing all the pairs resulting from pairing each domain element with itself.
reflexive relation. A relation on a domain of discourse is a reflexive relation if, and only if:
Or, equivalently:
For all
Note that definition of reflexivity does not prevent a relation from having other pairs. For example, both of these relations are reflexive:
However, the moment we're missing one of self-pairs, the relation is no longer reflexive. For example, all of the relations below are not reflexive:
We can also visualize relations with graphs. For example, the graphs below are all visual representations of a reflexive relation:
Irreflexive Relations
In the diagram below, the red cells are elements that are not members of a relation called
As long as the relation has this property, we say that it's irreflexive. If someone tells us that a relation is irreflexive, then they're essentially saying, "No matter how hard you search through you'll never find an identity pair."
irreflexive relation. A relation on a domain of discourse is an irreflexive relation if, and only if:
Or, equivalently,
For all
Importantly, reflexivity and irreflexivity are not opposites of one another. For example, the following relation is neither reflexive nor irreflexive:
Why? Because (1) it's nonreflexive because it doesn't contain all the pairs whose elements relate to themselves, and (2) it's nonirreflexive because some of the relation's pairs are elements relating to themselves.
Below are two graphs of irreflexive relations. Notice for both graphs, there are no loops.
Quasi-reflexive Relations
Consider the following relation. To the left is its tabular representation, and to the right is its corresponding graph.
This is an example of a relation that's neither reflexive nor irreflexive. We call such relations quasi-reflexive relations â a relation where some of the elements relate to themselves, and others do not. There are two kinds of quasi-reflexive relations. Left-quasi-reflexive relations:
left-quasi-reflexive relation. A relation on a domain of discourse is left-quasi-reflexive if, and only if:
Or, equivalently,
For all if then
and right-quasi-reflexive relations:
right-quasi-reflexive relation. A relation on a domain of discourse is right-quasi-reflexive if, and only if:
Or, equivalently,
For all if then
Symmetric Relations
Below, the colored cells are members of a relation called
is an example of a symmetric relation. The basic idea is, if we reach into the relation and find:
then we can expect to later get:
Here's one definition:
symmetric relation. A relation on a domain of discourse is symmetric if, and only if:
Or, equivalently,
For all if then
Antisymmetric Relations
Beloow, the teal-colored cells are members of a relation called and the and the red-colored cells are members not in
This is an example of an antisymmetric relation. The idea is, if someone tells us that a relation is antisymmetric, then:
If we reach into the relation and find the pair:
and then we won't find a pair
Here's an explicit definition:
antisymmetric relation. A relation on a domain of discourse is antisymmetric if, and only if:
Or, equivalently,
For all if and then
Alternatively:
For all if and then
Asymmetric Relations
If a relation is both antisymmetric and irreflexive, we say that is an asymmetric relation.
asymmetric relation. A relation on a domain of discourse is asymmetric if, and only if:
Or, equivalently,
For all then or
Note that this is a very different type of relation from the antisymmetric relation. With the antisymmetric relation, we allow and provided that The asymmetric relation says if we have an we'd better not have a whether or not
Transitive Relations
When we see an argument of the form:
(1)
(2)
(3) and
(4) Therefore,
then we can deduce that is a transitive relation.
transitivite relation. A relation on a domain of discourse is transitive if, and only if:
Or, equivalently,
For all if and then
Intransitive Relations
Relations that are not transitive are called intransitive relations.
intransitive relation. A relation on a domain of discourse is intransitive if, and only if:
Or, equivalently,
For all if and then
Left-total Relations
A left-total relation is defined as follows:
left-total relation. Let and be sets, and a relation from to Then is a left-total relation if, and only if,
That is,
for all there exists a such that
Right-total Relations
A right-total relation is defined as follows:
right-total relation. Let and be sets, and a relation from to Then is a right-total relation if, and only if,
That is,
for all there exists an such that
Comparable Relations
If a relation has the property of comparability, we say that is a comparabe relation or a strongly-connected relation.
comparable relation. A relation on a domain of discourse is comparable if, and only if:
Or, equivalently,
For all or
Connex Relations
If a relation has the connex property, we say that is a connected relation or a connex relation.
connex. A relation on a domain of discourse is a connex relation if, and only if:
Or, equivalently,
For all if then or
Incomparable Relations
If a relation has the property of incomparability, we say that is incomparable.
incomparability relation. A relation on a domain of discourse is incomparable if, and only if:
Or, equivalently,
For all and
Right Euclidean Relation
A right Euclidean relation is defined as follows:
right euclidean relation. A relation on a domain of discourse is right Euclidean if, and only if,
Or, equivalently,
For all if and then
Left Euclidean Relation
A left Euclidean relation is defined as follows:
left euclidean relation. A relation on a domain of discourse is left Euclidean if, and only if,
Or, equivalently,
For all if and then
Equivalence Relations
Earlier, we saw the relations:
Both of these are examples of equivalence relations.
equivalence relation. A relation on a domain of discourse is an equivalence relation if, and only if:
- reflexivity,
- implies symmetry, and
- and implies transitivity.
Equivalence relations are a formalization of "sameness." Former U.S. presidents are all different people, but they're all equivalent (i.e., "the same") in terms of being former U.S. presidents. The equivalence relation between all of them is former U.S. president. Apples and oranges are the same in terms of being fruits.
Equivalence Class
If a object is related to an object by an equivalence relation, we say that and are equivalent, and write We say this earlier in our discussion of equivalence relations. Often, it's helpful to gather all the objects equivalent to some object into a single set. We call this set the equivalence class of
equivalence class. Let be an equivalence relation on the domain of discourse and Then the equivalence class of is defined as the set:
Given an element {c \in \class{a}_{\equiv},} is called a representative of the equivalence class. Note that some authors denote the equivalence class with the notation Because we use this notation in another area of mathematics â combinatorics â we instead use the notation {\class{a}_{\equiv}.}
Partial Orders
Below is the definition of a partial order. Note that there's some new notation being used here. The symbol is a generic symbol for a relation that can be replaced with etc. The symbol means "immediately precedes" and the notation means "immdiately succeeds." These are useful notations when we're discussing comparisons between objects that aren't necessarily numbers. For example, if we define the tuple
as the partial order of British kings by reign, then we may denote the relation as:
Such a relation would be read as, "George I immediately precedes George II, and George II immediately precess George III." We could, of course, write:
but it looks a bit awkward, given that the is commonly associated with numbers, the Georges aren't numbers (unless we define them as purely regnal numbers), and we risk offending some historian saying, "George I is less than George II ..." As such, we use the weaker symbol to denote some hint of order.
partial order. A relation on a domain of discourse is called a partial order if, and only if, for all
- If and then (transitivity), and
- If and then (antisymmetry).
Partial orders come in three subtypes: weak partial orders, strong partial orders, and full orders.
Weak Partial Orders
A weak partial order is defined as follows:
weak partial order. A relation on a domain of discourse is called a weak partial order if, and only if, for all
- If and then (transitivity), and
- If and then (antisymmetry).
As we can see from the definition, weak partial orders are what allow us to define the notion of "less than or equal to."
Strong Partial Orders
Strong partial orders are what give us the notion of less than and greater than:
strong partial order. A relation on a domain of discourse is called a strong partial order if, and only if, for all
- (irreflexivity),
- If then (asymmetry), and
- If and then (transitivity).
A classic example of the strong partial order is the relation.
Total Order
A total order is defined as follows:
total order. A relation on a domain of discourse is called a total order if, and only if, for all
- (transitivity),
- or (comparability),
- If and then (transitivity), and
- If and then (antisymmetry).
Preorders
Preorders are a particularly useful kind of relation that we'll use extensively later.
preorder. Let be relation on the domain of discourse Then is called a preorder if, and only if, for all
- (reflexivity), and
- If and then (transitivity).
The name preorder comes from the fact that preorders are "almost" partial orders. They have the property of transitivity, but not antisymmetry.
Posets
Partial orders lead to another kind of mathematical object called the poset. Posets are defined as a tuple where is domain of discourse, and is a relation. This is likely our first encounter with a definition of this form. As we'll see later (and throughout all of the volumes on this site), it is extremely common in mathematics to define objects as tuples:
In fact, there's an entire field of mathematics dedicated to studying the way we construct these definitions, called abstract algebra.
poset. Let be a partial order on a set Then the tuple is called a poset (or partially ordered set) if, and only if, for all
- (reflexivity),
- if and then (antisymmetry), and
- if and then (transitivity).
Posets are a much weaker notion of ordering (hence the name partial order). A poset can be ordered, but not necessarily. This is because posets impose no requirement for comparability.
Astute readers might have noticed something slightly off about posets. They're a bit, well, redundant. We could've just simply written:
When it comes to notation in mathematics, however,
Minimal and Maximal Elements
Below are the definitions of minimal and maximal elements. Minimals and maximals are much weaker notions of "minimum" and "maximum." A minimal , informally, is an element that does not precede any other element of That doesn't necessarily make it the smallest element. Why? Becuse posets, by definition, aren't necessarily comparable.
maximal element. Let be a poset. Then an element is a maximal element if, and only if,
there is no such that
If the above condition is satisfied, we write:
The definition of a minimal element:
minimal element. Let be a poset. Then an element is a minimal element if, and only if:
there is no such that
If the above condition is satisfied, we write:
Chains
Chains are a stronger form of the poset.
chain. Let be a partial order on a set Then the tuple is called a chain, if, and only if, for all
- or (comparability),
- (reflexivity),
- if and then (antisymmetry), and
- if and then (transitivity).
Like the poset, what we call a chain is simply the domain of a total order. Tradition, once again, calls upon us to use a specific term.
Lower Bound and Upper Bound
Here is the definition for lower bound:
lower bound. Let be a poset and If there exists an element such that:
for all
then is called the lower bound of which we denote as:
where is the set of all lower bounds of
And the definition of an upper bound:
upper bound. Let be a poset and If there exists an element such that:
for all
then is called the upper bound of which we denote as:
where is the set of all upper bounds of
Infimum and Supremum
From the definition of a lower bound, we get another relation called the infimum:
infimum. Let be a poset and If:
- there exists an element and
- for all
then we say the element is the infimum of To denote the infimum we may use any of the following notations:
The symbol is often called "big wedge" after its LaTeX command,
\bigwedge
. The benefit to using this notation is that it falls in line with
the using the notation which returns the infimum of
Those familiar with symbolic logic might recognize this as the and operator.
Indeed, when it
becomes apparent why is an attractive notation. Given
we get or
Likewise, the definition of an upper bound gives us another relation called the supremum.
supremum. Let be a poset and If:
- there exists an element and
- for all
then we say the element is the supremum of To denote the supremum we may use any of the following notations:
Mimimum and Maximum
The maximum of a set is defined as follows:
minimum. Let be a poset. If:
- there exists an element such that
- for all
then is the minimum of denoted:
and the minimum of a set
maximum. Let be a poset. If:
- there exists an element such that
- for all
then is the minimum of denoted:
Well-ordered Relations
Now that we have the definition of minimal and maximal elements, we can define an extremely useful relation called a well ordering.
well ordering. Let be a on the domain of discourse If, and only if,
- is a total order, and
- every non-empty subset of has a minimum,
then is a well-ordered relation.
Left-unique Relations
A left-unique relation is defined as follows:
left-unique relation. Let and be sets, and a relation from to Then is left-unique if, and only if,
That is,
For all and for all if and then
Right-unique Relations
A right-unique relation (also called a univalent relation), is defined as follows:
right-unique relation. Let and be sets, and a relation from to Then is right-unique if, and only if,
That is,
For all and for all if and then
As we'll see later, the right-unique relation is a key component in the definition of functions.
Maps
Another type of relation is the map; also called mapping, assignment, function, operation, or transformation. While the latter terms are often used interchangeably, we take a bit more care in using the words and distinguish them by definition. In these materials, we will say that map, assignment, and mapping are synonymous, but function, operation, and transformation are special kinds of maps.
map. Let and be sets, such that Then the triple:
is a map if, and only if
For each there is exactly one with
We write for this unique and call it the value of at (or the image of under ). We say that is the domain of the codomain of and the graph of We write:
to indicate that is a map from to
Visualizing the map relation as a graph, all of the following are maps:
But the following are not: