Relations Built from Ordered Pairs
A relation joins members of one set to members of another. Take \( X = \{1, 2, 3, 4\} \) and \( Y = \{3, 4, 5, 6, 7\} \). The Cartesian product \( X \times Y \) holds every ordered pair whose first member comes from X and whose second member comes from Y. Here that is \( 4 \times 5 = 20 \) pairs. A relation does not take all of them. It keeps only the pairs that obey a rule, so every relation from X to Y is a subset of \( X \times Y \).
Suppose the rule is "y is 2 more than x". The relation is written:
\[ R = \{(x, y) : y = x + 2,\ x \in X,\ y \in Y\} \]
Try each member of X in turn. 1 goes with 3, 2 goes with 4, 3 goes with 5 and 4 goes with 6. So the relation, listed pair by pair, is:
\[ R = \{(1, 3), (2, 4), (3, 5), (4, 6)\} \]
In every pair the first member is taken from X and the second member is the one it is joined to in Y. The whole of this topic grows from those two positions: what sits first, and what sits second.
Domain and Range of a Relation
Collect the first members of the pairs in R above and you get 1, 2, 3 and 4. Collect the second members and you get 3, 4, 5 and 6. These two collections have names.
Domain: Let A and B be two non-empty sets and R a relation from A to B. The domain of R is the set of first elements of the ordered pairs in R. It is written \( R_d \).
Range: The range of a relation R from A to B is the set of second elements of the ordered pairs in R. It is written \( R_r \).
In set builder form, the two definitions are:
\[ R_d = \{x : (x, y) \in R\} \]
\[ R_r = \{y : (x, y) \in R\} \]
For the relation \( R = \{(1, 3), (2, 4), (3, 5), (4, 6)\} \), the domain is \( \{1, 2, 3, 4\} \) and the range is \( \{3, 4, 5, 6\} \). Look at 7. It belongs to Y, but no member of X is joined to it, so it is not in the range.
The domain is always a subset of the first set, and the range is always a subset of the second set. The range can be smaller than the second set, because only the members that are actually reached count.
A set never lists a member twice. If 3 is the first member of two different pairs, it is written once in the domain. The domain of \( \{(2, 3), (3, 4), (3, 5)\} \) is \( \{2, 3\} \), not \( \{2, 3, 3\} \).
Finding Domain and Range from a List of Pairs
Worked example 1. Find the domain and range of the relation below.
Step 1: The relation given is:
\[ R_1 = \{(2, 3), (3, 4), (3, 5), (4, 5), (5, 6)\} \]
Step 2: Collecting the first member of every pair, and writing 3 only once because it opens two pairs:
\[ R_d = \{x : (x, y) \in R_1\} = \{2, 3, 4, 5\} \]
Step 3: Collecting the second member of every pair, and writing 5 only once because it closes two pairs:
\[ R_r = \{y : (x, y) \in R_1\} = \{3, 4, 5, 6\} \]
The members of a relation do not have to be numbers. Worked example 2 uses letters in the second place.
Step 1: The relation given is:
\[ R_2 = \{(1, p), (2, q), (3, r)\} \]
Step 2: Collecting the first members gives the domain:
\[ R_d = \{1, 2, 3\} \]
Step 3: Collecting the second members gives the range:
\[ R_r = \{p, q, r\} \]
Reading Domain and Range from a Graph
When a relation is drawn on a graph, every plotted point \( (x, y) \) is one ordered pair. The x-coordinate of the point is a member of the domain and the y-coordinate is a member of the range. So the domain is read off the X-axis and the range off the Y-axis.

This graph shows the relation \( R = \{(x, y) : x < y\} \) from \( A = \{1, 3, 5\} \) to \( B = \{2, 4, 6\} \).
Step 1: Writing each point as an ordered pair:
\[ \begin{aligned} R = \{&(1, 2), (1, 4), (1, 6), \\ &(3, 4), (3, 6), (5, 6)\} \end{aligned} \]
Step 2: Reading the x-coordinates. Three points stand above 1 and two above 3, but each number is written once:
\[ R_d = \{1, 3, 5\} \]
Step 3: Reading the y-coordinates:
\[ R_r = \{2, 4, 6\} \]
Reading Domain and Range from an Arrow Diagram
In an arrow diagram, each arrow is one ordered pair. The tail of the arrow sits on a member of the first set and the head points to a member of the second set. A member with an arrow leaving it belongs to the domain. A member with an arrow arriving at it belongs to the range.

The arrows here go from 1 to 5, from 2 to 6, from 3 to 6 and from 4 to 7.
Step 1: Writing each arrow as an ordered pair:
\[ R = \{(1, 5), (2, 6), (3, 6), (4, 7)\} \]
Step 2: Every member of A sends out an arrow, so the domain is:
\[ R_d = \{1, 2, 3, 4\} \]
Step 3: Listing the members of B that receive an arrow. Two arrows land on 6, and it is written once:
\[ R_r = \{5, 6, 7\} \]
Finding the Range from a Rule
Often you are given the domain and a rule, and you have to produce the range. Put each member of the domain into the rule, one at a time, and collect the answers. W stands for the set of whole numbers, \( \{0, 1, 2, 3, \ldots\} \).
Worked example 3. Find the range of \( R = \{(x, y) : y = x^2 + 2,\ 0 \le x \le 3,\ x \in W\} \).
Step 1: Listing the domain. x is a whole number from 0 to 3:
\[ R_d = \{0, 1, 2, 3\} \]
Step 2: Substituting each value of x into \( y = x^2 + 2 \):
\[ \begin{aligned} x = 0 &: y = 0 + 2 = 2 \\ x = 1 &: y = 1 + 2 = 3 \\ x = 2 &: y = 4 + 2 = 6 \\ x = 3 &: y = 9 + 2 = 11 \end{aligned} \]
Step 3: Writing the relation as ordered pairs:
\[ R = \{(0, 2), (1, 3), (2, 6), (3, 11)\} \]
Step 4: Collecting the second members gives the range:
\[ R_r = \{2, 3, 6, 11\} \]
Worked example 4. The domain of a relation is \( \{1, 2, -3, -4\} \), and the second element of each pair is 3 less than the first. Find the range.
Step 1: Writing the rule as an equation:
\[ y = x - 3 \]
Step 2: Substituting each member of the domain:
\[ \begin{aligned} 1 - 3 &= -2 \\ 2 - 3 &= -1 \\ -3 - 3 &= -6 \\ -4 - 3 &= -7 \end{aligned} \]
Step 3: Collecting the results gives the range:
\[ R_r = \{-2, -1, -6, -7\} \]
Relations on a Single Set
A relation can join a set to itself. A relation from A to A is called a relation on A, written \( R : A \to A \), and it is a subset of \( A \times A \). The four types of relation below are all about relations of this kind. For \( A = \{1, 2, 3\} \):
\[ \begin{aligned} A \times A = \{&(1, 1), (1, 2), (1, 3), \\ &(2, 1), (2, 2), (2, 3), \\ &(3, 1), (3, 2), (3, 3)\} \end{aligned} \]
We write \( xRy \) as a short way of saying \( (x, y) \in R \), which is read "x is related to y".
Reflexive Relation
Reflexive relation: A relation R on a set A is reflexive if every element of A is related to itself, that is, \( (x, x) \in R \) for every \( x \in A \).
\[ xRx \text{ for every } x \in A \]
On \( A = \{1, 2, 3\} \), the relation \( R = \{(1, 1), (2, 2), (3, 3)\} \) is reflexive, because 1, 2 and 3 each appear paired with themselves. Extra pairs do not spoil it: \( \{(1, 1), (2, 2), (3, 3), (1, 2)\} \) is reflexive too.
Now test \( \{(1, 1), (2, 2), (1, 3)\} \). The pair \( (3, 3) \) is missing, so 3 is not related to itself and the relation is not reflexive.
Having some pairs like \( (1, 1) \) is not enough. Reflexive means EVERY element of the set has its pair with itself. One missing pair breaks it.
Symmetric Relation
Symmetric relation: A relation R on a set A is symmetric if whenever \( (x, y) \in R \), the reversed pair \( (y, x) \) is also in R.
\[ xRy \Rightarrow yRx \]
On \( A = \{1, 2, 3\} \), the relation \( \{(1, 2), (2, 1), (1, 3), (3, 1), (2, 3), (3, 2)\} \) is symmetric. Every pair has its reverse in the set: \( (1, 2) \) with \( (2, 1) \), \( (1, 3) \) with \( (3, 1) \), \( (2, 3) \) with \( (3, 2) \).
The relation \( \{(1, 2), (2, 1), (2, 3)\} \) is not symmetric, because \( (2, 3) \) is in it but \( (3, 2) \) is not. A pair like \( (2, 2) \) is its own reverse, so it never causes trouble.
Transitive Relation
Transitive relation: A relation R on a set A is transitive if whenever \( (x, y) \in R \) and \( (y, z) \in R \), then \( (x, z) \in R \).
\[ xRy \text{ and } yRz \Rightarrow xRz \]
Think of it as a chain. If x is linked to y, and y is linked to z, then x must be linked straight to z. The relation \( \{(1, 2), (2, 3), (1, 3)\} \) is transitive. The only chain is \( (1, 2) \) followed by \( (2, 3) \), and the shortcut \( (1, 3) \) is present. No other pair can be followed by a pair starting with its second member, so there is nothing more to check.
The relation \( \{(1, 2), (2, 3)\} \) is not transitive, because the chain from 1 through 2 to 3 needs \( (1, 3) \), which is missing.
One relation can have one property and lack the others. "Is less than" on \( \{1, 2, 3\} \) gives \( \{(1, 2), (1, 3), (2, 3)\} \). It is transitive, but it is not reflexive, since no number is less than itself, and it is not symmetric, since \( (1, 2) \) is in it and \( (2, 1) \) is not.
Equivalence Relation
Equivalence relation: A relation R on a set A is an equivalence relation if it is reflexive, symmetric and transitive, all three at once.
"Is equal to" on \( \{1, 2, 3\} \) gives \( \{(1, 1), (2, 2), (3, 3)\} \). It is reflexive, because every number equals itself. It is symmetric, because each pair is its own reverse. It is transitive, because the only chains are like \( (1, 1) \) followed by \( (1, 1) \), and they lead back to a pair already there. So it is an equivalence relation.
Everyday life has equivalence relations too. Among the students of a school, "is in the same class as" works. Every student is in the same class as themselves. If Sita is in the same class as Ram, then Ram is in the same class as Sita. If Sita is with Ram and Ram is with Hari, then Sita is with Hari.
| Type | Condition | Fails when |
| Reflexive | \( (x, x) \in R \) for every x in A | some element is not paired with itself |
| Symmetric | \( (x, y) \in R \Rightarrow (y, x) \in R \) | a pair is present but its reverse is not |
| Transitive | \( (x, y), (y, z) \in R \Rightarrow (x, z) \in R \) | a chain exists but its shortcut is missing |
| Equivalence | all three of the above | any one of the three fails |
Building Each Type on One Set
Worked example 5. Let \( A = \{4, 5, 6\} \). Find \( A \times A \), a reflexive relation \( R_1 \), a symmetric relation \( R_2 \), a transitive relation \( R_3 \), and two relations \( R_4 \) and \( R_5 \) on A that are inverse to each other.
(a) Pairing every member of A with every member of A:
\[ \begin{aligned} A \times A = \{&(4, 4), (4, 5), (4, 6), \\ &(5, 4), (5, 5), (5, 6), \\ &(6, 4), (6, 5), (6, 6)\} \end{aligned} \]
(b) A reflexive relation needs each member paired with itself:
\[ R_1 = \{(x, x) : x \in A\} = \{(4, 4), (5, 5), (6, 6)\} \]
(c) A symmetric relation. Every pair chosen is put in together with its reverse:
\[ R_2 = \{(4, 5), (5, 4), (5, 6), (6, 5)\} \]
(d) A transitive relation. Taking \( (4, 5) \) and \( (5, 6) \) forms a chain, so the shortcut \( (4, 6) \) must be added:
\[ R_3 = \{(4, 5), (5, 6), (4, 6)\} \]
(e) Two inverse relations. Every pair of \( R_5 \) is a pair of \( R_4 \) turned round:
\[ R_4 = \{(4, 5), (4, 6), (5, 6)\} \]
\[ R_5 = \{(5, 4), (6, 4), (6, 5)\} \]
These are only one possible answer to each part. Many other relations on A have the same properties.
Is Parallel To: an Equivalence Relation
Worked example 6. R is the relation "is parallel to" on the set of all lines in a plane. Show that R is an equivalence relation. Take three lines x, y and z that are parallel to one another, and write \( x \parallel y \) for "x is parallel to y".

- Reflexive: every line is parallel to itself, so \( x \parallel x \), \( y \parallel y \) and \( z \parallel z \). That is, xRx holds, so R is reflexive.
- Symmetric: if \( x \parallel y \) then \( y \parallel x \). The same holds for y with z and x with z. That is, xRy gives yRx, so R is symmetric.
- Transitive: if \( x \parallel y \) and \( y \parallel z \), then \( x \parallel z \). That is, xRy and yRz give xRz, so R is transitive.
R is reflexive, symmetric and transitive, so "is parallel to" is an equivalence relation.
Inverse Relation
Turn every pair of a relation round and you get a new relation that runs the other way. If R goes from A to B, the new one goes from B to A.
Inverse relation: The relation obtained by interchanging the order of the members in every ordered pair of a relation R is called the inverse of R. It is written \( R^{-1} \).
\[ R^{-1} = \{(y, x) : (x, y) \in R\} \]
For example, \( R = \{(1, 2), (2, 3), (3, 4)\} \) and \( \{(2, 1), (3, 2), (4, 3)\} \) are inverse relations to each other. Swapping back returns the first relation, so the inverse of \( R^{-1} \) is R itself.
Worked example 7. Find the inverse of \( R = \{(3, -1), (5, 0), (7, 1)\} \).
Step 1: The relation given is:
\[ R = \{(3, -1), (5, 0), (7, 1)\} \]
Step 2: Interchanging the two members inside each pair:
\[ R^{-1} = \{(-1, 3), (0, 5), (1, 7)\} \]
Swap the members INSIDE each pair. Writing the pairs in reverse order, as \( \{(7, 1), (5, 0), (3, -1)\} \), gives the very same relation R, because the order of members in a set does not matter.
Domain and Range of an Inverse
Swapping each pair moves every first member into second place and every second member into first place. So the domain and range change places.
\[ \text{Domain of } R^{-1} = \text{Range of } R \]
\[ \text{Range of } R^{-1} = \text{Domain of } R \]
Worked example 8. Take the arrow diagram relation \( R = \{(1, 5), (2, 6), (3, 6), (4, 7)\} \), whose domain is \( \{1, 2, 3, 4\} \) and range is \( \{5, 6, 7\} \).
Step 1: Interchanging the members of each pair:
\[ R^{-1} = \{(5, 1), (6, 2), (6, 3), (7, 4)\} \]
Step 2: Collecting the first members, which were the range of R:
\[ \text{Domain of } R^{-1} = \{5, 6, 7\} \]
Step 3: Collecting the second members, which were the domain of R:
\[ \text{Range of } R^{-1} = \{1, 2, 3, 4\} \]
The Whole Topic at a Glance
| Idea | What it means | Example |
| Domain | set of first members | \( \{(1, 4), (2, 4)\} \) has domain \( \{1, 2\} \) |
| Range | set of second members | \( \{(1, 4), (2, 4)\} \) has range \( \{4\} \) |
| Reflexive | every element related to itself | \( \{(1, 1), (2, 2)\} \) on \( \{1, 2\} \) |
| Symmetric | every pair has its reverse | \( \{(1, 2), (2, 1)\} \) |
| Transitive | every chain has its shortcut | \( \{(1, 2), (2, 3), (1, 3)\} \) |
| Equivalence | reflexive, symmetric and transitive | "is parallel to" on lines |
| Inverse | every pair swapped | \( \{(1, 2)\} \) becomes \( \{(2, 1)\} \) |
The full lesson is waiting for you
The notes are free to read in full. A free account opens the rest of the practice, and tracks your progress and confidence score for every subject. Presentations and videos need approval from Learn Yeti.