When the elements of a set are ordered pairs, then the set is called a **relation**. An ordered pair is written (x, y). The order of the two components of the ordered pair matters. Therefore the **ordered pairs (x, y) and (y, x)** **are*** not equal*.

**The domain**of a relation is the set of the first components of the ordered pairs.**The range**of a relation is the set of the second components of the ordered pairs.**A relation**is a function if each element of the domain occurs only once as a first component.

**Example:**

R = {(a, b), (a, c), (b, c), (c, d)}.

Find the domain and range of R. Is the relation a function?

The domain is the set of first components. These are a, a, b, and c, so that the **domain is {a,b,c}**.

The range is the set of second components. These are b, c, c, and d. Thus the **range is {b,c,d}**.

R is not a function since the letter a occurred twice as a first component.

**The inverse of a relation** is the relation with all the ordered pairs reversed. Thus, the inverse of R = {(1, 2), (3, 4), (5, 6)} is {(2, 1), (4, 3), (6, 5)}.

**Example:**

Find the domain of the inverse of {(m, n), (p, q), (r, s)}.

The domain of the inverse is simply the range of the original relation.

The domain of the inverse is {n, q, s}.

The range of the inverse is the domain of the original relation.