Examples of Relations
Whenever you can express a mapping in terms of ordered pairs, then that mapping is a relation.
The examples in the “challenges” you’ve seen so far in this chapter are all relations. This section
will give you some more examples.
Independent vs. dependent variable
In a relation, the elements of the domain and the range can be represented by variables.
If we say that x is a nonspecific element of the domain and y is a nonspecific element of
the range, then x is the independent variable and y is the dependent variable. A relation
therefore maps values of the independent variable to values of the dependent variable.
We can also call x the “input variable” and y the “output variable,” as computer scientists
sometimes do.
An injective relation
Relations between sets of numbers are often represented by equations. We write the depend-
ent variable all by itself on the left side of the equality symbol, and then write an expres-
sion containing the independent variable on the right side. Ordered pairs are produced
by putting values for x into the equation, and then calculating the values for y. Here is an
example:
y=x+ 2
for all real numbers x. When we put specific values of x into this, we get results such as:
- If x=−5, then (x,y)= (−5,−3)
- If x=−1, then (x,y)= (−1,1)
- If x= 0, then (x,y)= (0,2)
- If x= 3/2, then (x,y)= (3/2,7/2)
- If x= 4, then (x,y)= (4.6)
- If x= 25, then (x,y)= (25,27)
This mapping is one-to-one, because for every value of x, there is exactly one value of y, and
vice-versa. By definition, therefore, the mapping is an injection. We can call this relation an
injective relation.
A surjective relation
Suppose both the maximal domain X and the co-domain Y of a particular mapping include
all real numbers. Let the essential domain be the set of all nonnegative real numbers, that is,
the set of all x such that x≥ 0. Let the range be the set of all real numbers y, so it is the same
as the co-domain. Now consider this equation:
y=±(x1/2)
Examples of Relations 215