# Relations

A relation is simply a set of ordered pairs . Usually, we talk about relations on sets of numbers, but not always.

Example 1:

You could have a relation between the set of all names and the set of whole numbers. A name $N$ is related to a number $x$ if and only if $N$ has fewer than $x$ letters.

So, $\left(\text{Raj},5\right)$ is in the relation, but $\left(\text{Abdullah},7\right)$ is not.

Example 2:

Here is a relation on the set of real numbers. Suppose $x$ is related to $y$ if and only if $x$ is less than $y$ .

The following table shows some ordered pairs which are in the relation, and some which are not.

 Related Not Related $\left(1,6\right)$ $\left(3,-2\right)$ $\left(5,5.001\right)$ $\left(-8,-9\right)$ $\left(0,9999\right)$ $\left(4,3\right)$

## Input-Output Tables

One way in which relations are commonly displayed is in an input-output table. The idea is, you input some number $x$ and you get out some $y$ .

 Input Output $0$ $0$ $1$ $3$ $2$ $0$ $3$ $9$ $1$ $3$ $-5$ $-15$

This table describes a relation containing the ordered pairs $\left(0,0\right),\left(1,3\right),\left(2,0\right),\left(3,9\right),\left(1,3\right),\left(-5,-15\right)$ .

If the same input always gives the same output, then the relation is called a function . Otherwise it is not a function. The relation in the table above is a function (it is okay if two different inputs give the same output). The relation in the table below is not a function because the same input $1$ gives the output $5$ the first time and $0$ the second time.

 Input Output $0$ $0$ $1$ $5$ $2$ $0$ $3$ $15$ $1$ $0$ $-5$ $-15$

If you have a graph of a relation, you can use the vertical line test to decide whether or not it is a function.