Section 6.1 Introduction to Functions
The notion of a function is possibly the most important and useful concepts in all of mathematics. Generally speaking, a function is some sort of relationship or rule that takes an
input and assigns it to a distinct
output. I like to think of it as a machine that converts an input to its output.
Example 6.1. Make and Model.
To illustrate with an everyday example, there is a functional relationship between the model of an automobile and its make. The input to the function is the
model of a car, while the output is the corresponding
manufacturer of that particular car. For example, if I told you that I drive a
Civic, you could then determine (perhaps after a little research) that my car is manufactured by
Honda.
In this case, we say that the
make of a car is a function of the model.
Notice that this example doesn’t work the other way. If I told you I drive a
Honda you could not determine the model of the car from that information alone.
The
model of a car is NOT a function of the make.
In algebra and calculus we are mostly interested in functions whose inputs and outputs are real numbers. These are so-called real-valued functions of a real variable.
Definition 6.2.
A real-valued function \(f\) of a real variable is a rule which assigns to each real number input \(x\) from a set called the domain of \(f\) to a unique real number output \(f(x)\text{.}\) We call \(f(x)\) the value of \(f\) evaluated at \(x\). The range of \(f\) is the set of all outputs \(f(x)\text{,}\) where \(x\) is from the domain of \(f\text{.}\)
We need to refer to the function by some name, a symbol like
\(f\text{,}\) but it could be anything you prefer for the situation. If we input a number
\(x\text{,}\) then we call the corresponding output
\(f(x)\text{,}\) which we read as “
\(f\) of
\(x\)” or “
\(f\) at
\(x\)”. Visualize
\(f\) as a machine that converts an inputted real number
\(x\) to a real number output
\(f(x)\text{.}\) The process of determining the output of a function from an input is called
evaluation.
Example 6.3. Evaluating the Squaring Function.
The statement:
\begin{equation*}
f(x) = x^2
\end{equation*}
tells us that we are defining a function whose name is
\(f\text{.}\) It takes a real number input
\(x\) and outputs its square
\(x^2\text{.}\) We call
\(f\) the
squaring function.
We may evaluate
\(f\) at various real numbers. For example, evaluating at
\(x=-2\) we would write:
\begin{equation*}
f(-2) = (-2)^2 = 4.
\end{equation*}
Notice the use of parenthesis to ensure the correct
order of operations 1.9. Visually,
Some other examples of evaluating give:
\begin{equation*}
f(2) = 2^2 = 4
\end{equation*}
\begin{equation*}
f(0) = 0^2 = 0
\end{equation*}
\begin{equation*}
f(\pi) = \pi^2 \approx 9.897
\end{equation*}
Since we are allowed to input any real number \(x\text{,}\) the domain of \(f\) is assumed to be \((-\infty,+\infty)\text{.}\) The result of squaring a real number is a non-negative number. Thus, the range of \(f\) is \([0,+\infty)\text{.}\)
Example 6.4. A function from data.
The population of Madison, Wisconsin is provided in the table below (Source: US Decennial Census).
1980 |
170,616 |
1990 |
191,262 |
2000 |
208,054 |
2010 |
233,209 |
2020 |
269,840 |
To use the table, we choose a year (the input) and read the population (the output). Thus, the
population is a function of the year.
To make this formal, let
\(P(t)\) be the population, where
\(t\) is the number of years since 1980 (this is a preference to avoid working with large numbers).
To illustrate,
\begin{equation*}
P(0) = 170616, \quad P(20) = 208054, \quad P(30) = 233209.
\end{equation*}
Strictly speaking, the domain of this function consists only of the years for which we have data, so the domain is the set
\begin{equation*}
\left\{0,10,20,30,40,50\right\}.
\end{equation*}
You might want to infer values in between those years, or predict future values from this data, but once you do this, you are now modeling the data with a different function. For example, it looks like the population is increasing about 20,000 people per decade, or about 2000 people per year. (This is a very crude estimate!) So we could construct a second linear function
\begin{equation*}
M(t) = 2000 t + 170616
\end{equation*}
to model the population. Our model says the population in 2020 should be
\begin{equation*}
M(50) = 2000\times 50 + 170616 = 270616
\end{equation*}
compared to the census population \(P(50) = 269840\text{.}\) The domain of the model \(M\) is likely interpreted as the interval \([0,+\infty)\) presuming we wish it to model years 1980 and on.