Example (1.1.2 cont.). We consider our earlier food-based example in this formal setting. To do this
properly, we have to carefully label the constituent sets. For instance:
A =
Mon, Tue, Wed, Thu, Fri
, B =
carbonara, fajitas, fish, pizza, pork
,
f =
(Mon, fish), (Tue, pork), (Wed, fajitas),
(Thu, carbonara), ( Fri, pizza), (Sat, fish), (Sun, pizza)
We made a choice with the codomain B: can you see how? What would be a different choice?
Try the other examples yourself.
Representing Functions
You should be familiar with several methods for representing a function.
Example 1.5. We consider the familiar formula/rule f (x) = x
2
in several contexts.
Table This presentation is most helpful when the domain is very small.
The table shows the situation when dom f = {−1, 0, 1, 2, 3} and
range f = {0, 1, 4, 9}
Arrows A pictorial arrow diagram might also be useful for illustrating
functions with small domains.
Graph This is simply the set of ordered pairs
x, f (x)
: x ∈ dom f
:
in the context of Definition 1.4, the graph is the function!
For formulæ whose inputs and outputs are real numbers, two con-
ventions are typically followed unless stated otherwise:
• The domain is implied to be all real numbers for which the
formula makes sense.
• The codomain is taken to be the set of real numbers.
If no other information is provided, we’d assume the function de-
fined by the formula f (x) = x
2
has both domain and codomain the
entire set of real numbers: f : R → R.
The range of the function is the set of possible outputs, in this case
range f = {x
2
∈ R : x ∈ R} = [0, ∞)
is the half-open interval of non-negative real numbers.
For ‘calculus’ functions like these, the vertical line test really in-
volves vertical lines; every vertical line intersects the graph in pre-
cisely one point.
In the picture, the dots are the graph when the domain is the finite
set {−1, 0, 1, 2, 3} (as described in the table/arrow-diagram).
x −1 0 1 2 3
f (x) 1 0 1 4 9
Can you think of other ways to represent a function? How might you decide which to use?
4