Skip to main content
\(\require{mathrsfs}\newcommand{\abs}[1]{\left| #1 \right|} \renewcommand{\emptyset}{\varnothing} \DeclareMathOperator{\dom}{dom} \DeclareMathOperator{\range}{rng} \DeclareMathOperator{\perm}{perm} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section3.1Relations

Definition3.1.1Relation

For sets \(A,B\text{,}\) a relation from \(A\) to \(B\) is a subset \(R\) of the Cartesian product \(A \times B\text{.}\) Elements \(a \in A\) and \(b \in B\) are said to be related if \((a,b) \in R\text{.}\) Moreover, we often write a relation with infix notation, as \(a\,R\,b\text{.}\)

When \(A=B\text{,}\) which is perhaps more common, we just call \(R\) a relation on \(A\).

Note that any set of ordered pairs from \(A\) and \(B\) is a relation. Most of them we don't find particularly interesting, but others are incredibly interesting. Soon we will study some properties of interesting relations.

Let \(A = \{1,2,3\}\) and \(B = \{1,2,3,4,5\}\) and consider the relation \(R\) from \(A\) to \(B\) given by

\begin{equation*} R = \{ (1,2), (1,4), (2,3), (2,5), (3,2), (3,1) \}. \end{equation*}

Then, \(2\,R\,3\text{,}\) \(3\,R\,2\text{,}\) \(1\,R\,2\) but \(2\,\not R\,1\text{.}\) Moreover, \(1\,R\,4\text{,}\) but saying \(4\,R\,1\) or \(4\,\not R\,1\) doesn't even make sense since \(4 \notin A\) and hence \((4,1) \notin A \times B\text{.}\)

The “less than” relation \(\lt\) is a relation on \(\mathbb{R}\text{,}\) with which you are undoubtedly familiar. You probably aren't used to thinking of this as a subset of the plane \(\mathbb{R}^2\text{,}\) but it can be. In particular, \(x \lt y\) if and only if the point \((x,y)\) lies above the line \(y = x\) in the plane. The reason we need to recognize things like less than as a set is because we are using set theory as the foundation of mathematics.

Here is an example of a relation on \(\mathbb{Z}\text{,}\) which is called the divides relation. Given \(a,b \in \mathbb{Z}\text{,}\) we say \(a\) divides \(b\) and write \(a \mid b\text{,}\) if there exists some integer \(k\) so that \(b = ak\text{.}\) Note, although technically \(\mid\) is a subset of \(\mathbb{Z}^2\text{,}\) we almost never think of it that way, and it would look kind of weird to write \((2,6) \in \mid\) as opposed to \(2 \mid 6\text{.}\)

Definition3.1.5Domain, Range

The domain of a relation \(R\) from \(A\) to \(B\) is the subset of \(A\) given by

\begin{equation*} \dom(R) = \{ x \in A \mid (\exists y \in B) (x\,R\,y) \}. \end{equation*}

Similarly, the range of \(R\) is the subset of \(B\) given by

\begin{equation*} \range(R) = \{ y \in B \mid (\exists x \in A) (x\,R\,y) \}. \end{equation*}
Definition3.1.6Identity relation

The identity relation on a set \(A\) is the relation \(I_A := \{ (x,x) \mid x \in A \}\text{.}\) In other words, a pair of elements from \(A\) are related if and only if they are equal. This could also be called the equality relation.

Definition3.1.7Inverse relation

If \(R\) is a relation from \(A\) to \(B\text{,}\) the inverse relation \(R^{-1}\) is the relation from \(B\) to \(A\) given by

\begin{equation*} R^{-1} = \{ (b,a) \in B \times A \mid a\,R\,b \}. \end{equation*}

Note that \((R^{-1})^{-1} = R.\)

What is the inverse of the less than relation on \(\mathbb{R}\text{?}\)

Consider a relation \(R\) on \(\mathbb{R}\text{.}\) Since \(R \subseteq \mathbb{R}^2\text{,}\) we can think of this as some geometric subset of the plane. Describe how \(R\) and \(R^{-1}\) are related geometrically.

Hint

If you are having trouble, consider a few very simple examples along with the less than relation. Remember, whatever the geometric transformation is, applying it twice should give you the original set back since \((R^{-1})^{-1} = R.\)

Definition3.1.11Relation Composition

Given relations \(R,S\) from \(A\) to \(B\) and from \(B\) to \(C\text{,}\) respectively, we can form the composite relation \(S \circ R\) from \(A\) to \(C\) as

\begin{equation*} \{ (a,c) \in A \times C \mid (\exists b \in B)( a\,R\,b \wedge b\,R\,c ) \}. \end{equation*}

Left as an exercise for the reader. These follow directly from the definitions.