A relation is a set of inputs and outputs, often written as ordered pairs
(input, output). We can also represent a relation as a mapping diagram or a
graph. For example, the relation can
be represented as:

Lines connect the inputs with their outputs. The relation can also be represented as:

Graph of Relation

A function is a relation in which each input has only one output.

In the relation ,
*y*
is a function of
*x*
,
because for each input
*x*
(1, 2, 3, or 0), there is only one output
*y*
.
*x*
is not a function of
*y*
, because the input
*y* = 3
has multiple outputs:
*x* = 1
and
*x* = 2
.

*Examples*:

\:yis a function ofx,xis a function ofy.

:yisnota function ofx(x= 3 has multiple outputs),xis a function ofy.

:yis a function ofx,xisnota function ofy(y= 9 has multiple outputs).

:yisnota function ofx(x= 1 has multiple outputs),xisnota function ofy(y= 2 has multiple outputs).

To check if a relation is a function, given a mapping diagram of the relation, use the following criterion: If each input has only one line connected to it, then the outputs are a function of the inputs.

*Example*: In the following mapping diagram,
*y*
is a function of
*x*
, but
*x*
is not a function of
*y*
:

Line Test