Subsection 7.1.1 Fundamentals
Definition 7.1.1. Function.
A function from a set
into a set
is a relation from
into
such that each element of
is related to exactly one element of the set
The set
is called the
domain of the function and the set
is called the
codomain.
The reader should note that a function
is a relation from
into
with two important restrictions:
Example 7.1.2. A function as a list of ordered pairs.
Let and and if then is a function from into
Example 7.1.4. A function as a set of ordered pairs in set-builder notation.
Let be the real numbers. Then is a function from into or, more simply, is a function on
It is customary to use a different system of notation for functions than the one we used for relations. If
is a function from the set
into the set
we will write
The reader is probably more familiar with the notation for describing functions that is used in basic algebra or calculus courses. For example,
or
both define the function
Here the domain was assumed to be those elements of
whose substitutions for
make sense, the nonzero real numbers, and the codomain was assumed to be
In most cases, we will make a point of listing the domain and codomain in addition to describing what the function does in order to define a function.
The terms
mapping,
map, and
transformation are also used for functions.
Definition 7.1.5. The Set of Functions Between Two Sets.
Given two sets,
and
the set of all functions from
into
is denoted
The notation used for sets of functions makes sense in light of
Exercise 5.
One way to imagine a function and what it does is to think of it as a machine. The machine could be mechanical, electronic, hydraulic, or abstract. Imagine that the machine only accepts certain objects as raw materials or input. The possible raw materials make up the domain. Given some input, the machine produces a finished product that depends on the input. The possible finished products that we imagine could come out of this process make up the codomain.
Example 7.1.6. A definition based on images.
We can define a function based on specifying the codomain element to which each domain element is related. For example, defined by is an alternate description of
Definition 7.1.7. Image of an element under a function.
Let
read “Let
be a function from the set
into the set
” If
then
is used to denote that element of
to which
is related.
is called the
image of
or, more precisely, the image of
under
We write
to indicate that the image of
is
Definition 7.1.8. Range of a Function.
The range of a function is the set of images of its domain. If
then the range of
is denoted
and
Note that the range of a function is a subset of its codomain.
is also read as “the image of the set
under the function
” or simply “the image of
”
In
Example 7.1.2,
Notice that 2 and 3 are not images of any element of
In addition, note that both 1 and 4 are related to more than one element of the domain:
and
This does not violate the definition of a function. Go back and read the definition if this isn’t clear to you.
In
Example 7.1.4, the range of
is equal to its codomain,
If
is any real number, we can demonstrate that it belongs to
by finding a real number
for which
By the definition of
which leads us to the equation
This equation always has a solution,
thus
The formula that we used to describe the image of a real number under
is preferred over the set notation for
due to its brevity. Any time a function can be described with a rule or formula, we will use this form of description. In
Example 7.1.2, the image of each element of
is its square. To describe that fact, we write
(
), or
defined by
There are many ways that a function can be described. Many factors, such as the complexity of the function, dictate its representation.
Example 7.1.9. Data as a function.
Suppose a survey of 1,000 persons is done asking how many hours of television each watches per day. Consider the function defined by
This function will probably have no formula such as the ones for and above.
Example 7.1.10. Conditional definition of a function.
Consider the function defined by the set
No simple single formula could describe but if we assume that the pattern given continues, we can write
Subsection 7.1.2 Functions of Two Variables
If the domain of a function is the Cartesian product of two sets, then our notation and terminology changes slightly. For example, consider the function
defined by
For this function, we would drop one set of parentheses and write
not
We call
a function of two variables. From one point of view, this function is no different from any others that we have seen. The elements of the domain happen to be slightly more complicated. On the other hand, we can look at the individual components of the ordered pairs as being separate. If we interpret
as giving us the cost of producing quantities of two products, we can imagine varying
while
is fixed, or vice versa.
The same observations can be made for function of three or more variables.