Section 22
Graphing Functions and Relations
A relation is simply a set of ordered pairs. Usually, we talk about relations
on sets of numbers, but not always.
Easy Example:
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, (Raj, 5) is in the relation, but (Abdullah, 7) is not.
Easy Example:
Here is a relation on the set of real numbers. Suppose x is
related to y if
x < y , and not related otherwise.
The following table shows some ordered pairs which are in the relation, and
some which are not.
Related 
Not Related 
(1, 6) 
(3, –2) 
(5, 5.001) 
(–7, –8) 
(–1, 9999) 
(4, 4) 
INPUTOUTPUT TABLES
One way in which relations are commonly displayed is in an inputoutput table.
The idea is, you input some number x, and you get out some y.
Input 
Output 
0 
0 
1 
3 
2 
6 
3 
9 
10 
30 
–5 
–15 
This table describes a relation containing the ordered pairs (0, 0), (1, 3),
(2, 6), (3, 9), (10, 30), (–5, –15).
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. This means: if there is any vertical line
which intersects the graph in more than one point, then the relation is not
a function.

The above relation (in blue) represents a function: every vertical line
intersects it only once. 

The above relation (in blue) is not a function: there are many vertical
lines that intersect it more than once. 
The domain is the set of all input values that make "sense";
the range is the set of all possible output values.
FUNCTION NOTATION
We can call the input x, the rule f,
and then the output is f(x) .
This DOES NOT mean "f times x " , it's just a
notation device to record the input and output. For example, if f(x)
= x^{2}, then f(3) = 3^{2} = 9, not f times
3 (meaningless).
Think of f(x) = x^{2} as f (
) = ( )^{2}; that way you can safely plug in negative numbers
or even other expressions. For example:
f (–5) = (–5)^{2} = 25
f (x + h) = (x + h)^{2}