You could have a relation between the set of all names and the set of whole numbers. A name is related to a number if and only if has fewer than letters.
So, is in the relation, but is not.
Here is a relation on the set of real numbers. Suppose is related to if and only if is less than .
The following table shows some ordered pairs which are in the relation, and some which are not.
One way in which relations are commonly displayed is in an input-output table. The idea is, you input some number and you get out some .
This table describes a relation containing the ordered pairs .
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 gives the output the first time and the second time.
If you have a graph of a relation, you can use the vertical line test to decide whether or not it is a function.