Ch 4. Relations

4.4 Domain, Range, Field, and Graphical Representation of Relations

The domain and range describe the sets of elements that participate in a relation. The domain of a relation is the set of all its first elements. Given a relation [latex]R \subseteq A \times B[/latex], we write the domain of [latex]R[/latex] as

[latex]\text{Dom}(R) = \{ a \in A \mid \exists b \in B \text{ such that } (a, b) \in R \}[/latex]

The range of a relation is the set of all its second elements. We write the range of [latex]R[/latex] as

[latex]\text{Ran}(R) = \{b \in B \mid \exists a \in A \text{ such that } (a, b) \in R \}[/latex]

Example 4.62

Let [latex]R = \{ (1, 2), (2, 3), (3, 4) \}[/latex]. Then [latex]\text{Dom}(R) = \{ 1, 2, 3 \}[/latex] and [latex]\text{Ran}(R) = \{ 2, 3, 4 \}[/latex].

 

The field of a relation is the set of all elements that appear in any position in the ordered pairs of the relation. We write the field of [latex]R[/latex] as

[latex]\text{Field}(R) = \text{Dom}(R) \cup \text{Ran}(R)[/latex]

Example 4.63

Using the same relation as Example 4.62, we have [latex]\text{Field}(R) = \{ 1, 2, 3, 4 \}[/latex].

 

As discussed in Section 4.2, relations can be visualized using directed graphs. In a directed graph, each element of the set is represented as a vertex, and each ordered pair [latex](a, b) \in R[/latex] is represented as a directed edge from vertex [latex]a[/latex] to vertex [latex]b[/latex]. The visual representation helps identify properties such as reflexivity (loops), symmetry (bidirectional edges), and transitivity (paths).

Example 4.64

Let [latex]A = \{ 1, 2, 3 \}[/latex] and [latex]R = \{ (1, 2), (2, 3), (3, 1) \}[/latex]. The directed graph is shown in the figure below.

Directed graph diagram showing three nodes labeled 1, 2, and 3 connected in a cycle with arrows indicating direction from node 1 to 2, node 2 to 3, and node 3 back to 1. The structure highlights a simple cyclic relationship among the three elements.

This forms a cycle, showing that the relation is not reflexive (no loops), not symmetric (no reverse edges), but transitive in a circular sense.

 

Real-World Example 4.4: Social Media Mentions

If you are a user of a social media platform, you can mention other users in your posts and other users can also mention you. Let

[latex]U[/latex] = {Aiden, Benjamin, Chloe, Daniel}

Define the relation [latex]M \subseteq U \times U[/latex] where [latex](a, b) \in M[/latex] means user [latex]a[/latex] mentioned user [latex]b[/latex]. Suppose

[latex]M[/latex] = {(Aiden, Benjamin), (Benjamin, Chloe), (Chloe, Daniel)}

Then

[latex]\text{Dom}(M)[/latex] = {Aiden, Benjamin, Chloe}

[latex]\text{Ran}(M)[/latex] = {Benjamin, Chloe, Aiden}

[latex]\text{Field}(M)[/latex] = {Aiden, Benjamin, Chloe}

The directed graph in the figure below shows a cycle of mentions among three users.

Directed graph diagram showing relationships among three nodes labeled Aiden, Benjamin, and Chloe. Arrows indicate connections from Aiden to Benjamin, Benjamin to Chloe, and Chloe back to Aiden, forming a cyclic pattern.

Daniel is not involved in any mention, so he does not appear in the domain, range, or field.