- Virtual Laboratories
- 0. Foundations
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9

Suppose that
$S$ and
$T$ are sets. A relation from
$S$ to
$T$ is a subset of the product set
$S\times T$.
As the name suggests, a relation
$R$ from
$S$ into
$T$ is supposed to define a *relationship* between the elements of
$S$ and the elements of
$T$, and so we usually use the more suggestive notation
$R(x, y)$
when
$\left(\begin{array}{c}x\\ y\end{array}\right)\in R$.
The domain of
$R$ is the set of first coordinates and the range of
$R$ is the set of second coordinates.

A relation from a set $S$ to itself is said to be a relation on $S$.

Suppose that $S$ is a set and recall that $(S)$ denotes the power set of $S$, the collection of all subsets of $S$. The membership relation $$ from $S$ to $(S)$ is perhaps the most important and basic relationship in mathematics. Indeed, for us, it's a primitive (undefined) relationship--given $x$ and $A$, we assume that we understand the meaning of the statement $x\in A$.

Another basic primitive relation is the equality relation $$ on a given set of objects $S$. That is, given two objects $x$ and $y$, we assume that we understand the meaning of the statement $x=y$.

Other basic relations that you have seen are

- The subset relation $$ on $(S)$
- The order relation $$ on $\mathbb{R}$

Note that a function $f$ from $S$ into $T$ is a special type of relation. To compare the two types of notation (relation and function), note that $f(x, y)$ means that $y=f(x)$.

Since a relation is just a set of ordered pairs, the set operations can be used to build new relations from existing ones. Specifically, if $Q$ and $R$ are relations from $S$ to $T$, then so are $Q\cup R$, $Q\cap R$, and $Q\setminus R$. If $R$ is a relation from $S$ to $T$ and $Q\subseteq R$, then $Q$ is a relation from $S$ to $T$.

Suppose that $Q$ and $R$ are relations from $S$ to $T$. Note that

- $(Q\cup R)(x, y)$ if and only if $Q(x, y)$ or $R(x, y)$.
- $(Q\cap R)(x, y)$ if and only if $Q(x, y)$ and $R(x, y)$.
- $(Q\setminus R)(x, y)$ if and only if $Q(x, y)$ but not $R(x, y)$.
- If $Q\subseteq R$ then $Q(x, y)$ implies $R(x, y)$.

If $R$ is a relation on $S$ and $A$ is a subset of $S$ then $R_{A}=R\cap (A\times A)$ is a relation on $A$, called the restriction of $R$ to $A$.

If $R$ is a relation from $S$ to $T$, the inverse of $R$ is the relation from $T$ to $S$ defined by

$$R^{(-1)}(y, x)\text{\hspace{0.5em}if and only if \hspace{0.5em}}R(x, y)$$Equivalently,
$R^{(-1)}=\{\left(\begin{array}{c}y\\ x\end{array}\right)\colon \left(\begin{array}{c}x\\ y\end{array}\right)\in R\}$.
Note that any function
$f$ from
$S$ into
$T$ has an inverse *relation*, but only when the
$f$ is one-to-one is the inverse relation also a function.

Suppose that $Q$ is a relation from $S$ to $T$ and that $R$ is a relation from $T$ to $U$. The composition $Q\circ R$ is the relation from $S$ to $U$ defined as follows: for $x\in S$ and $z\in U$, $(Q\circ R)(x, z)$ if and only if there exists $y\in T$ such that $Q(x, y)$ and $R(y, z)$. Note that the notation is inconsistent with the notation used for composition of functions, essentially because relations are read from left to right, while functions are read from right to left. Hopefully, the inconsistency will not cause confusion, since we will always use function notation for functions.

The important classes of relations that we will study in the next couple of sections are characterized by certain basic properties. Suppose that $R$ is a relation on $S$.

- $R$ is reflexive if $R(x, x)$ for all $x\in S$.
- $R$ is irreflexive if no $x\in S$ satisfies $R(x, x)$
- $R$ is symmetric if $R(x, y)$ implies $R(y, x)$ for all $x\in S$ and $y\in S$.
- $R$ is anti-symmetric if $R(x, y)$ and $R(y, x)$ implies $x=y$ for all $x\in S$ and $y\in S$.
- $R$ is transitive if $R(x, y)$ and $R(y, z)$ implies $R(x, z)$ for all $x\in S$, $y\in S$, $z\in S$

Suppose that $R$ is a relation on $S$. Show that $R$ is reflexive if and only if the equality relation $$ on $S$ is a subset of $R$.

Suppose that $R$ is a relation on $S$. Show that $R$ is symmetric if and only if $R^{(-1)}=R$

Suppose that $R$ is a relation on $S$. Show that $R$ is transitive if and only if $(R\circ R)\subseteq R$.

Suppose that $R$ is a relation on $S$. Show that $R$ is antisymmetric if and only if $R\cap R^{(-1)}$ is a subset of the equality relation $$ on $S$.

Suppose that $Q$ and $R$ are a relations on $S$. For each property below, show that if both $Q$ and $R$ have the property, then so does $Q\cap R$.

- reflexive
- symmetric
- transitive

Suppose that $R$ is a relations on a set $S$.

- Give an explicit definition for the property
*$R$ is not reflexive*. - Give an explicit definition for the property
*$R$ is not irreflexive*. - Are any of the properties
*$R$ is reflexive*,*$R$ is not reflexive*,*$R$ is irreflexive*,*$R$ is not irreflexive*equivalent?

Suppose that $R$ is a relations on a set $S$.

- Give an explicit definition for the property
*$R$ is not symmetric*. - Give an explicit definition for the property
*$R$ is not antisymmetric*. - Are any of the properties
*$R$ is symmetric*,*$R$ is not symmetric*,*$R$ is antisymmetric*,*$R$ is not antisymmetric*equivalent?

Let $R$ be the relation defined on $\mathbb{R}$ by $R(x, y)$ if and only if $\sin x=\sin y$. Determine if $R$ has each of the following properties:

- reflexive
- symmetric
- transitive
- irreflexive
- antisymmetric

The relation $R$ in the previous exercise is a member of an important class of equivalence relations.