Section3.1Relations
¶
Definition3.1.1Relation
For sets A,B, a relation from A to B is a subset R of the Cartesian product A×B. Elements a∈A and b∈B are said to be related if (a,b)∈R. Moreover, we often write a relation with infix notation, as aRb.
When A=B, 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
dom(R)={x∈A∣(∃y∈B)(xRy)}.
Similarly, the range of R is the subset of B given by
rng(R)={y∈B∣(∃x∈A)(xRy)}.
Definition3.1.6Identity relation
The identity relation on a set A is the relation IA:={(x,x)∣x∈A}. 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, the inverse relation R−1 is the relation from B to A given by
R−1={(b,a)∈B×A∣aRb}.
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.
HintIf 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.\)
Theorem3.1.10
Given a relation R, we have
- dom(R−1)=rng(R);
- rng(R−1)=dom(R).
Definition3.1.11Relation Composition
Given relations R,S from A to B and from B to C, respectively, we can form the composite relation S∘R from A to C as
{(a,c)∈A×C∣(∃b∈B)(aRb∧bRc)}.
Theorem3.1.12
Let A,B,C,D be sets with relations R,S,T from A to B, B to C, and C to D, respectively. Then
- (R−1)−1=R;
- T∘(S∘R)=(T∘R)∘S;
- IB∘R=R and R∘IA=R;
- (S∘R)−1=R−1∘S−1.
Left as an exercise for the reader. These follow directly from the definitions.