Let \(A\) and \(B\) be sets. A relation \(R\) from \(A\) to \(B\) is a subset \(R \subseteq A \times B\text{.}\) If \(a\in A\) and \(b\in B\text{,}\) we write \(a R b\) if \((a, b)\in R\text{,}\) and \(a \notR b\) if \((a, b) \not\in R\text{.}\) A relation on \(A\) is a relation from \(A\) to \(A\text{.}\)
Example4.2.
Let \(P\) be the set of all people. Define a relation on \(P\) by having person \(x\) related to person \(y\) if and only if \(x\) and \(y\) have at least one parent in common.
The symbols < and \(\leq \) both represent relations on \(\R\text{.}\)
Let \(A\) be a set. The symbol “\(\subseteq \)” represents a relation on \(\cP (A)\text{,}\) where \(P\text{,}\)\(Q\in\cP (A)\) are related if and only if \(P \subseteq Q\text{.}\)
Proposition4.3.
Let \(f : A \to B\) be a function. Then \(f\) is defined by a subset of \(A \times B\) satisfying a certain condition. Hence \(f\) is also a relation from \(A\) to \(B\text{.}\)
The concept of a relation is therefore seen to be more general than the concept of a function.
Remark4.4.
In principle, it would have been logical to have the chapter on relations before the chapter on functions, and to view functions as a special case of relations. In practice, however, most mathematicians do not think of functions as special types of relations when they use functions on a daily basis, and therefore functions deserve their own treatment independent of the study of relations.
Definition4.5.
Let \(A\) and \(B\) be non-empty sets, let \(R\) be a relation from \(A\) to \(B\text{,}\) and let \(x\in A\text{.}\) The relation class of \(x\) with respect to \(R\text{,}\) denoted \(R [x]\text{,}\) is the set defined by
\begin{equation*}
R [x] = \{y\in B | x R y\}\text{.}
\end{equation*}
If the relation \(R\) is understood from the context, we will often write \([x]\) instead of \(R [x]\text{.}\)
Example4.6.
There are a number of distinct cases here, and we will examine a few of them. If \(x\) is the only child of each of her parents, then \([x] = \{x\}\text{,}\) where we observe that \(x\) has the same parents as herself. If \(y\) and \(z\) are the only two children of each of their parents, then \([y] = \{y, z\} = [z]\text{.}\) If \(a\) has one half-sibling \(b\) by her father, and another half-sibling \(c\) by her mother, and each of \(b\) and \(c\) has no other siblings or half-siblings, then \([a] = \{a, b, c\}\text{,}\) and \([b] = \{a, b\}\text{,}\) and \([c] = \{a, c\}\text{.}\)
For the relation <, we see that \([x] = (x, ∞)\) for all \(x\in\R\text{,}\) and for the relation \(\leq \text{,}\) we see that \([x] = [x, ∞)\) for all \(x\in\R\text{.}\)