Domain, Codomain & Range of a Relation

Meaning of domain, codomain, and range of a relation with simple explanations and examples.

1. What These Terms Mean

When a relation connects elements of two sets using ordered pairs, each part of the pair plays a specific role. The first elements together form the domain, the second elements come from the codomain, and the elements actually reached make the range.

2. Domain of a Relation

The domain is the set of all first elements of the ordered pairs in the relation. It shows which elements actually take part on the left side of the pairs.

2.1. Definition

\( \text{Domain}(R) = \{ a \mid (a,b) \in R \} \)

2.2. Example

R = \{(1,4),(2,5),(3,4)\}

Domain:

\{1,2,3\}

3. Codomain of a Relation

The codomain is the set from which the second elements of the pairs are chosen. It is fixed when the relation is defined, even if not all elements of it are used.

3.1. Definition

\text{Codomain} = B \quad \text{(if } R \subseteq A \times B\text{)

3.2. Example

If the relation is defined from:

A = \{1,2,3\},\ B = \{4,5,6\}

Then B is the codomain, even if 6 does not appear in any pair.

4. Range of a Relation

The range is the set of all second elements that actually appear in the ordered pairs. It is a subset of the codomain.

4.1. Definition

\text{Range}(R) = \{ b \mid (a,b) \in R \} \)

4.2. Example

R = \{(1,4),(2,5),(3,4)\}

Range:

\{4,5\}

Here 6 is in the codomain but not in the range.

5. Difference Between Codomain and Range

The codomain contains all possible outputs listed in the definition of the relation. The range contains only the outputs that actually appear. The range is always inside the codomain.

5.1. Illustration

\text{Range}(R) \subseteq \text{Codomain}

5.2. Example

\text{Codomain} = \{4,5,6\}

\text{Range} = \{4,5\}

6. Quick Summary with an Example

Let the relation be:

R = \{(1,5),(2,4),(3,5)\}

Then:

  • Domain = \( \{1,2,3\} \)
  • Codomain = the set from which the second elements come (say \( \{4,5,6\} \))
  • Range = \( \{4,5\} \)