Nour Bachir University Center logo
Nour Bachir University Center, El Bayadh, AlgeriaSciences Institute · Mathematics Department

Relations

Let \(A\) and \(B\) be sets. A relation from \(A\) to \(B\) is a subset \(R \subseteq A \times B\). Elements \(a \in A\) and \(b \in B\) are said to be related if \((a,b) \in R\). Moreover, we often write a relation using infix notation as \(a \, R \, b\).

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

Note that any set of ordered pairs from \(A\) and \(B\) is a relation. Most of them are not particularly interesting, but others are incredibly important. 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 \[R = \{(1,2),(1,4),(2,3),(2,5),(3,2),(3,1)\}.\] Then \(2 \, R \, 3\), \(3 \, R \, 2\), and \(1 \, R \, 2\), but \(2 \not R 1\). Moreover, \(1 \, R \, 4\), but saying \(4 \, R \, 1\) or \(4 \not R 1\) does not even make sense, since \(4 \notin A\) and hence \((4,1) \notin A \times B\).

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

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

Let \(R\) be a relation from \(A\) to \(B\). The domain of \(R\) is the subset of \(A\) defined by \[\operatorname{dom}(R) = \{x \in A \mid (\exists y \in B)(x \, R \, y)\}.\] Similarly, the range of \(R\) is the subset of \(B\) defined by \[\operatorname{rng}(R) = \{y \in B \mid (\exists x \in A)(x \, R \, y)\}.\]

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

If \(R\) is a relation from \(A\) to \(B\), the inverse relation \(R^{-1}\) is the relation from \(B\) to \(A\) defined by \[R^{-1} = \{(b,a) \in B \times A \mid a \, R \, b\}.\] Note that \((R^{-1})^{-1} = R\).

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

Consider a relation \(R\) on \(\mathbb{R}\). Since \(R \subseteq \mathbb{R}^2\), we can view it as a 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 that whatever the geometric transformation is, applying it twice should give the original set back, since \((R^{-1})^{-1} = R\).

Let \(R\) be a relation. Then:

  1. \(\operatorname{dom}(R^{-1}) = \operatorname{rng}(R)\);

  2. \(\operatorname{rng}(R^{-1}) = \operatorname{dom}(R)\).

Given relations \(R\) and \(S\) from \(A\) to \(B\) and from \(B\) to \(C\), respectively, the composite relation \(S \circ R\) from \(A\) to \(C\) is defined by \[S \circ R = \{(a,c) \in A \times C \mid (\exists b \in B)(a \, R \, b \land b \, S \, c)\}.\]

Let \(A,B,C,D\) be sets with relations \(R\), \(S\), and \(T\) from \(A\) to \(B\), from \(B\) to \(C\), and from \(C\) to \(D\), respectively. Then:

  1. \((R^{-1})^{-1} = R\);

  2. \(T \circ (S \circ R) = (T \circ S) \circ R\);

  3. \(I_B \circ R = R\) and \(R \circ I_A = R\);

  4. \((S \circ R)^{-1} = R^{-1} \circ S^{-1}\).

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

Equivalence relations

A relation \(R\) on \(A\) is said to be reflexive if \(x \, R \, x\) for all \(x \in A\). Analogously, \(R\) is said to be irreflexive if \(x \not R x\) for all \(x \in A\).

A relation \(R\) on \(A\) is said to be symmetric if for all \(x,y \in A\), \[x \, R \, y \iff y \, R \, x.\]

A relation \(R\) on \(A\) is said to be transitive if for all \(x,y,z \in A\), \[(x \, R \, y \land y \, R \, z) \implies x \, R \, z.\]

A relation \(R\) on a set \(A\) is said to be antisymmetric if for all \(x,y \in A\), whenever \(x \, R \, y\) and \(y \, R \, x\), then \(x = y\).

Let us consider a few examples:

Let \(\sim\) be an equivalence relation on a set \(A\). For \(x \in A\), the equivalence class of \(x\) is \[[x] := \{y \in A \mid x \sim y\}.\] The set of all equivalence classes of elements of \(A\) is denoted by \(A/\!\sim\).

A partition of a set \(A\) is a collection \(\mathcal{P}\) of subsets of \(A\) that are pairwise disjoint and whose union is \(A\).

Let \(\sim\) be an equivalence relation on a set \(A\). Then the set of equivalence classes \(A/\!\sim\) forms a partition of \(A\).

Proof. Since \(\sim\) is reflexive, for every \(x \in A\) we have \(x \sim x\), and therefore \(x \in [x] \in A/\!\sim\). Hence the union of all elements of \(A/\!\sim\) is \(A\).

Now suppose that \([x],[y] \in A/\!\sim\) and that \([x] \cap [y] \neq \varnothing\). Then there exists some \(z \in [x] \cap [y]\), so \(x \sim z\) and \(z \sim y\) by definition and symmetry of \(\sim\). By transitivity, it follows that \(x \sim y\).

Let \(w \in [x]\). Then \(w \sim x\), and since \(x \sim y\), transitivity implies \(w \sim y\), and hence \(w \in [y]\). Thus \([x] \subseteq [y]\). A symmetric argument shows that \([y] \subseteq [x]\), and therefore \([x] = [y]\).

We have shown that equivalence classes are either disjoint or identical. Hence \(A/\!\sim\) is a pairwise disjoint collection whose union is \(A\), and thus forms a partition of \(A\). ◻

Let \(\mathcal{P}\) be a partition of a set \(A\). Define a relation \(\sim\) on \(A\) by declaring that \(x \sim y\) if and only if there exists some \(P \in \mathcal{P}\) such that \(x,y \in P\). Then \(\sim\) is an equivalence relation on \(A\).

Proof. Exercise. A complete solution appears on the review sheet. ◻

Order Relations

A relation \(R\) on a set \(A\) is called a partial order if it is reflexive, antisymmetric, and transitive. A partial order is called a total order if for all \(x,y \in A\), either \(x \, R \, y\) or \(y \, R \, x\).

Some authors require partial orders to be irreflexive instead of reflexive. This can be achieved by deleting the diagonal from the relation. Essentially, everything that can be proven about partial orders in one formulation can also be proven in the other. A relation that is irreflexive, antisymmetric, and transitive is often called a strict partial order.

Let \(\prec\) be a partial order on a set \(A\). An element \(x \in A\) is said to be minimal with respect to \(\prec\) if for every \(y \in A\), \(y \not\prec x\). In other words, there are no elements smaller than \(x\). Maximal elements are defined analogously.

An element \(x \in A\) is said to be a minimum if for all \(y \in A\), \(x \prec y\). Maximum elements are defined analogously.

A total order \(\prec\) on a set \(A\) is said to be a well order if every nonempty subset of \(A\) has a minimum element with respect to \(\prec\).

On \(\mathbb{N}\), we know that \(<\) is a well order. This is precisely the content of the Well-Ordering Principle.

Is \(<\) a well order on \(\mathbb{R}\), \(\mathbb{Q}\), or \(\mathbb{Z}\)? Do you think \(\mathbb{R}\), \(\mathbb{Q}\), and \(\mathbb{Z}\) admit well orders of some form or another?

Every set can be well ordered.

This theorem may seem counterintuitive. What does a well order of \(\mathbb{R}\) look like? The short answer is that we do not know. In fact, it is impossible to explicitly write down a formula for such an order. The proof of this theorem, and hence the existence of a well order on any set, is a consequence of the Axiom of Choice. This axiom was originally one of the most highly contested axioms of early set theory, but it is now almost ubiquitously accepted. The reason is that it makes many powerful theorems true (although it also leads to some counterintuitive results). We will state the Axiom of Choice after discussing functions.

Let \(\prec\) be a partial order on a set \(A\), and let \(a \in A\) be a minimum element. Then \(a\) is the unique minimal element of \(A\).

Proof. We first show that \(a\) is minimal. For any \(b \in A\), since \(a\) is a minimum, we have \(a \prec b\). If \(a \neq b\), then by antisymmetry it follows that \(b \not\prec a\), and hence \(a\) is minimal.

Now suppose that \(c \in A\) is minimal. Since \(a\) is a minimum, we have \(a \prec c\). By the minimality of \(c\), this can only occur if \(a = c\). Thus, \(a\) is the unique minimal element. ◻

There is an analogue of the previous theorem for maximum and maximal elements.


Algebra I Courses · Mathematics Department · University Center of El Bayadh Nour El Bachir · 2025/2026