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.
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.
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.
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.
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:
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{.}\)
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).
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
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.