Section 8.1 Introduction to Functions
In mathematics, we use functions to model real-life data. In this section, we will learn the definition of a function and related concepts.
Subsection 8.1.1 Introduction to Functions
When working with two variables, we are interested in the relationship between those two variables. For example, consider the two variables of hare population and lynx population in a Canadian forest. If we know the value of one variable, are we able to determine the value of the second variable? If we know that one variable is increasing over time, do we know if the other is increasing or decreasing?
Definition 8.1.2. Relation.
A relation is a very general situation between two variables, where having a little bit of information about one variable could tell you something about the other variable. For example, if you know the hare population is high this year, you can say the lynx population is probably increasing. So “hare population” and “lynx population” make a relation. If one of the variables is identified as the “first” variable, the relation's domain is the set of all values that variable can take. Likewise, the relation's range is the set of all values that the second variable can take.
We are not so much concerned with relations in this book. But we are interested in a special type of relation called a function. Informally, a function is a device that takes input values for one variable one by one, thinks about them, and gives respective output values one by one for the other variable.
Example 8.1.3.
Mariana has \(5\) chickens: Hazel, Yvonne, Georgia, Isabella, and Emma. For the relation “Chicken to Egg Color,” the first variable (the input) is a chicken's name and the second variable (the output) is the color of that chicken's eggs. The relation's domain is the set of all of Mariana's chicken's names, and its range is the set of colors of her chicken's eggs. Figure 8.1.4 shows two inputs and their corresponding outputs.
It would not be convenient to make diagrams like the ones in Figure 8.1.4 for all five chickens. There are too many inputs. Instead, Figure 8.1.5 represents the function graphically in a more concise way. The function's input variable is “chicken name,” and its output variable is “egg color.” Note that we are using the word “variable,” because the chicken names and egg colors vary depending on which individual chicken you choose.
We can also use a set of ordered pairs to represent this function:
where you read the ordered pair left to right, with the first value as an input and the second value as its output.
Definition 8.1.6. Function.
In mathematics, a function is a relation between a set of inputs and a set of outputs with the property that each input is related to exactly one output.
In Figure 8.1.5, we can see each chicken's name (input) is related to exactly one output, so the relation “Chicken to Egg Color” qualifies as a function. Note that it is irrelevant that multiple inputs might be related to the same output, like in \((\text{Yvonne}, \text{brown})\) and \((\text{Georgia}, \text{brown})\text{.}\) The point is that whichever chicken you are thinking about, you know exactly which color egg it lays.
Subsection 8.1.2 Algebraic Functions and Function Notation
Many functions have specific algebraic formulas to turn an input number into an output number. For example, we know that the equation \(y=5x+3\) represents \(y\) as a function of \(x\text{,}\) because for each \(x\)-value (input), there is only one \(y\)-value (output). If we want to determine the value of the output when the input is \(2\text{,}\) we'd replace \(x\) with \(2\) and find the value of \(y\text{:}\)
Our end result is that \(y=13\text{.}\) Well, \(y\) is \(13\text{,}\) but only in the situation when \(x\) is \(2\text{.}\) In general, for other inputs, \(y\) is not going to be \(13\text{.}\) So the equation \(y=13\) is lacking in the sense that it is not communicating everything we might want to say. It does not communicate the value of \(x\) that we used. Function notation will allow us to communicate both the input and the output at the same time. It will also allow us to give each function a name, which is helpful when we have multiple functions.
Functions can have names just like variables. The most common function name is \(f\text{,}\) since “f” stands for “function.” A letter like \(f\) doesn't stand for a single number though. Instead, it represents an input-output relation like we've been discussing in this section.
We will write equations like \(y=f(x)\text{,}\) and what we mean is:
“y equals f of x”
the function's name is \(f\)
the input variable is \(x\)
the parentheses following the \(f\) surround the input; they do not indicate multiplication
the output variable is \(y\)
Remark 8.1.7.
Parentheses have a lot of uses in mathematics. Their use with functions is very specific, and it's important to note that \(f\) is not being multiplied by anything when we write \(f(x)\text{.}\) With function notation, the parentheses specifically are just meant to indicate the input by surrounding the input.
Example 8.1.8.
The expression \(f(x)\) is read as “\(f\) of \(x\text{,}\)” and the expression \(f(2)\) is read as “\(f\) of \(2\text{.}\)” Be sure to practice saying this correctly while reading.
The expression \(f(2)\) means that \(2\) is being treated as an input, and the function \(f\) is turning it into an output. And then \(f(2)\) represents that actual output number.
Remark 8.1.9.
The most common letters used to represent functions are \(f,g\text{,}\) and \(h\text{.}\) The most common variables we use are \(x\text{,}\) \(y\text{,}\) and \(z\text{.}\) But we can use any function name and any input and output variable. When dealing with functions in context, it often makes sense to use meaningful function names and variables. For example, if we are modeling temperature of a cup of coffee as a function of time with a function \(C\text{,}\) we could use \(T=C(t)\text{,}\) where \(T\) is the temperature (in degrees Fahrenheit) after \(t\) minutes.
Subsection 8.1.3 Evaluating Functions
When we determine a function's value for a specific input, this is known as evaluating a function. To do so, we replace the input with the numerical value given and determine the associated output.
When using function notation, instead of writing \(5x+3\) or \(y=5x+3\text{,}\) we often write something like \(f(x)=5x+3\text{.}\) We are saying that the rule for function \(f\) is to use the expression \(5x+3\text{.}\) To find \(f(2)\text{,}\) wherever you see \(x\) in the formula \(f(x)=5x+3\text{,}\) substitute in \(2\text{:}\)
Our end result is that \(f(2)=13\text{,}\) which tells us that \(f\) turns \(2\) into \(13\text{.}\) In other words, when the input is \(2\text{,}\) the output will be \(13\text{.}\)
Let's look at a few more examples.
Example 8.1.10. Evaluating Functions with Algebraic Formulas.
Find the given function values for a function \(f\) where \(f(x)=2x^2-5x+9\text{.}\)
\(\displaystyle f(-2)\)
\(\displaystyle f(0)\)
\(\displaystyle f(4)\)
-
We find \(f(-2)\) by replacing all the \(x\)'s in the formula for \(f\) with \(-2\) and then, using the order of operations, simplifying the right side as much as possible.
\begin{align*} f(\substitute{-2}) \amp= 2(\substitute{-2})^2-5(\substitute{-2})+9\\ \amp= 2(4)+10+9\\ \amp= 27 \end{align*} -
We find \(f(0)\) by replacing all the \(x\)'s in the formula for \(f\) with \(0\) and then, using the order of operations, simplifying the right side as much as possible.
\begin{align*} f(\substitute{0}) \amp= 2(\substitute{0})^2-5(\substitute{0})+9\\ \amp= 2(0)-0+9\\ \amp= 9 \end{align*} -
We find \(f(4)\) by replacing all the \(x\)'s in the formula for \(f\) with \(4\) and then, using the order of operations, simplifying the right side as much as possible.
\begin{align*} f(\substitute{4}) \amp= 2(\substitute{4})^2-5(\substitute{4})+9\\ \amp= 2(16)-20+9\\ \amp= 21 \end{align*}
Try a similar exercise.
Checkpoint 8.1.11. Evaluating a Function.
A function may also be described by explicitly listing many inputs and their corresponding outputs in a table.
Example 8.1.12. Functions given in Table Form.
Temperature readings for Portland, OR, on a given day are recorded in Table 8.1.13. Let \(f(x)\) be the temperature in degrees Fahrenheit \(x\) hours after midnight.
\(x\text{,}\) hours after midnight | \(0\) | \(1\) | \(2\) | \(3\) | \(4\) | \(5\) | \(6\) | \(7\) | \(8\) | \(9\) | \(10\) |
\(f(x)\text{,}\) temperature in °F | \(45\) | \(44\) | \(42\) | \(42\) | \(43\) | \(44\) | \(45\) | \(48\) | \(49\) | \(50\) | \(53\) |
What was the temperature at midnight?
Find \(f(9)\text{.}\) Explain what this function value represents in the context of the problem.
-
To determine the temperature at midnight, we look in the table where \(x=0\) and see that the output is \(45\text{.}\) Using function notation, we would write:
\begin{equation*} f(0) = 45\text{.} \end{equation*}Thus, at midnight the temperature was 45 °F.
-
To determine the value of \(f(9)\text{,}\) we look in the table where \(x=9\) and read the output:
\begin{equation*} f(9) = 50\text{.} \end{equation*}In context, this means that at 9AM the temperature was 50 °F.
Subsection 8.1.4 Domain and Range
Earlier we defined the domain and range of a relation. We repeat those definitions more formally here, specifically for functions.
Definition 8.1.14. Domain and Range.
Given a function \(f\text{,}\) the domain of \(f\) is the collection of all valid input values for \(f\text{.}\) The range of \(f\) is the collection of all possible output values of \(f\text{.}\)
When working with functions, a common necessary task is to determine the function's domain and range. Also, the ability to identify domain and range is strong evidence that a person really understands the concepts of domain and range.
Example 8.1.15. Functions Defined by Ordered Pairs.
The function \(f\) is defined by the ordered pairs
Determine the domain and range of \(f\text{.}\)
The ordered pairs tell us that \(f(1)=2\text{,}\) \(f(3)=-2\text{,}\) etc. So the valid input values are \(1\text{,}\) \(3\text{,}\) \(5\text{,}\) \(7\text{,}\) and \(9\text{.}\) This means the domain is the set \(\{1,3,5,7,9\}\text{.}\)
Similarly, the ordered pairs tell us that \(2\text{,}\) \(-2\text{,}\) \(-4\text{,}\) and \(6\) are possible output values. Notice that the output \(2\) happened twice, but it only needs to be listed in this collection once. The range of \(f\) is \(\{2,-2,-4,6\}\text{.}\)
Example 8.1.16. Functions in Table Form.
For each function defined using a table, state the domain and range.
-
The function \(g\) is defined by:
\(x\) \(-2\) \(-1\) \(0\) \(1\) \(2\) \(y\) \(5\) \(5\) \(5\) \(5\) \(5\) -
The function \(h\) is defined by:
\(x\) \(0\) \(1\) \(2\) \(3\) \(4\) \(y\) \(8\) \(6\) \(4\) \(2\) \(0\)
-
The table tells us that \(g(-2)=5\text{,}\) \(g(-1)=5\text{,}\) etc. So the valid input values are \(-2\text{,}\) \(-1\text{,}\) \(0\text{,}\) \(1\text{,}\) and \(2\text{.}\) This means the domain of \(g\) is the set \(\{-2,-1,0,1,2\}\text{.}\)
The only output evident from this table is \(5\text{,}\) so the range of \(g\) is the set \(\{5\}\text{.}\)
-
The table tells us that \(h(0)=8\text{,}\) \(h(1)=6\text{,}\) etc. So the valid input values are \(0\text{,}\) \(1\text{,}\) \(2\text{,}\) \(3\text{,}\) and \(4\text{.}\) This means the domain of \(h\) is the set \(\{0,1,2,3,4\}\text{.}\)
Similarly, the table shows us that the possible outputs are \(8\text{,}\) \(6\text{,}\) \(4\text{,}\) \(2\text{,}\) and \(0\text{.}\) So the range of \(h\) is the set \(\{8,6,4,2,0\}\text{.}\)
Exercises 8.1.5 Exercises
Evaluating Functions Algebraically
1.
Evaluate the function at the given values.
\(F(x)={x-6}\)
\(F(4)=\)
\(F(-1)=\)
\(F(0)=\)
2.
Evaluate the function at the given values.
\(g(x)={x-3}\)
\(g(3)=\)
\(g(-4)=\)
\(g(0)=\)
3.
Evaluate the function at the given values.
\(F(x)={-5x+8}\)
\(F(5)=\)
\(F(-4)=\)
\(F(0)=\)
4.
Evaluate the function at the given values.
\(F(x)={-3x+2}\)
\(F(4)=\)
\(F(-4)=\)
\(F(0)=\)
5.
Evaluate the function at the given values.
\(G(y)={y^{2}+1}\)
\(G(3)=\)
\(G(-4)=\)
\(G(0)=\)
6.
Evaluate the function at the given values.
\(H(x)={x^{2}+10}\)
\(H(1)=\)
\(H(-4)=\)
\(H(0)=\)
7.
Evaluate the function at the given values.
\(K(r)={-r^{2}-3}\)
\(K(5)=\)
\(K(-4)=\)
\(K(0)=\)
8.
Evaluate the function at the given values.
\(f(y)={-y^{2}+6}\)
\(f(3)=\)
\(f(-4)=\)
\(f(0)=\)
9.
Evaluate the function at the given values.
\(f(t)={-6}\)
\(f(2)=\)
\(f(-6)=\)
\(f(0)=\)
10.
Evaluate the function at the given values.
\(g(r)={3}\)
\(g(1)=\)
\(g(3)=\)
\(g(0)=\)
11.
Evaluate the function at the given values.
\(\displaystyle{h(x)=\frac{{3x}}{{-10x+6}}}\)
\(h(2)=\) .
\(h(-1)=\) .
12.
Evaluate the function at the given values.
\(\displaystyle{F(x)={-\frac{9}{x-6}}}\) .
\(\displaystyle{F(5)=}\) .
\(\displaystyle{F(6)=}\) .
13.
Evaluate the function at the given values.
\(\displaystyle{F(x)={\frac{16}{x-6}}}\) .
\(\displaystyle{F(14)=}\) .
\(\displaystyle{F(6)=}\) .
14.
Evaluate the function at the given values.
\(G(x)={x^{2}-3x-3}\)
\(G(5)=\)
\(G(-5)=\)
15.
Evaluate the function at the given values.
\(H(x)={x^{2}+4x+3}\)
\(H(3)=\)
\(H(-5)=\)
16.
Evaluate the function at the given values.
\(K(x)={-2x^{2}-4x-2}\)
\(K(1)=\)
\(K(-4)=\)
17.
Evaluate the function at the given values.
\(f(x)={-3x^{2}-4x-4}\)
\(f(4)=\)
\(f(-1)=\)
18.
Evaluate the function at the given values.
\(f(x)={\sqrt{x}}\text{.}\)
\(f(81)=\)
\(f\left({{\frac{100}{81}}}\right)=\)
\(f(-9)=\)
19.
Evaluate the function at the given values.
\(g(x)={\sqrt{x}}\text{.}\)
\(g(36)=\)
\(g\left({{\frac{16}{81}}}\right)=\)
\(g(-9)=\)
20.
Evaluate the function at the given values.
\(h(x)=\sqrt[3]{x}\)
\(h(-125)=\)
\(h\left({{\frac{64}{27}}}\right)=\)
21.
Evaluate the function at the given values.
\(F(x)=\sqrt[3]{x}\)
\(F(-1)=\)
\(F\left({{\frac{8}{125}}}\right)=\)
Domain and Range
22.
A function, \(f\) is defined by the ordered pairs \(\{(-2,5),(0,7),(1,7),(3,9)\}\text{.}\) Find the domain and range of \(f\text{.}\)
The domain of \(f\) is .
The range of \(f\) is .
23.
A function, \(g\) is defined by the ordered pairs \(\{(15,-3),(20,-4),(25,-5),(30,-6)\}\text{.}\) Find the domain and range of \(g\text{.}\)
The domain of \(g\) is .
The range of \(g\) is .
24.
The function \(F\) is defined by the following table:
x | y |
-2 | 0 |
-1 | 2 |
0 | 5 |
1 | 3 |
2 | 1 |
Find the domain and range of \(F\text{.}\)
The domain of \(F\) is .
The range of \(F\) is .
25.
The function \(G\) is defined by the following table:
x | y |
1 | 2 |
-10 | -8 |
-3 | 1 |
-6 | 8 |
-9 | 5 |
Find the domain and range of \(G\text{.}\)
The domain of \(G\) is .
The range of \(G\) is .
Function Notation in Context
26.
Suppose that \(M\) is the function that computes how many miles are in \(x\) feet. Find the formula for \(M\text{.}\) If you do not know how many feet are in one mile, you can look it up on Google.
Evaluate \(M(30000)\) and interpret the result.
There are about miles in feet.
27.
Suppose that \(K\) is the function that computes how many kilograms are in \(x\) pounds. Find the formula for \(K\text{.}\) If you do not know how many pounds are in one kilogram, you can look it up on Google.
Evaluate \(K(121)\) and interpret the result.
Something that weighs pounds would weigh about kilograms.
28.
Aaron started saving in a piggy bank on his birthday. The function \(f(x)={3x}\) models the amount of money, in dollars, in Aaron’s piggy bank. The independent variable represents the number of days passed since his birthday.
Interpret the meaning of \(f(1)=3\text{.}\)
A. One days after Aaron started his piggy bank, there were \(\$3\) in it.
B. Three days after Aaron started his piggy bank, there were \(\$1\) in it.
C. The piggy bank started with \(\$3\) in it, and Aaron saves \(\$1\) each day.
D. The piggy bank started with \(\$1\) in it, and Aaron saves \(\$3\) each day.
29.
Wendy started saving in a piggy bank on her birthday. The function \(f(x)={2x+1}\) models the amount of money, in dollars, in Wendy’s piggy bank. The independent variable represents the number of days passed since her birthday.
Interpret the meaning of \(f(3)=7\text{.}\)
A. Seven days after Wendy started her piggy bank, there were \(\$3\) in it.
B. Three days after Wendy started her piggy bank, there were \(\$7\) in it.
C. The piggy bank started with \(\$3\) in it, and Wendy saves \(\$7\) each day.
D. The piggy bank started with \(\$7\) in it, and Wendy saves \(\$3\) each day.
30.
An arcade sells multi-day passes. The function \(g(x)={{\frac{1}{3}}x}\) models the number of days a pass will work, where \(x\) is the amount of money paid, in dollars.
Interpret the meaning of \(g(12)={4}\text{.}\)
A. If a pass costs \(\$12\text{,}\) it will work for \(4\) days.
B. Each pass costs \(\$12\text{,}\) and it works for \(4\) days.
C. If a pass costs \(\$4\text{,}\) it will work for \(12\) days.
D. Each pass costs \(\$4\text{,}\) and it works for \(12\) days.
31.
An arcade sells multi-day passes. The function \(g(x)={{\frac{1}{3}}x}\) models the number of days a pass will work, where \(x\) is the amount of money paid, in dollars.
Interpret the meaning of \(g(9)={3}\text{.}\)
A. Each pass costs \(\$9\text{,}\) and it works for \(3\) days.
B. If a pass costs \(\$9\text{,}\) it will work for \(3\) days.
C. Each pass costs \(\$3\text{,}\) and it works for \(9\) days.
D. If a pass costs \(\$3\text{,}\) it will work for \(9\) days.
32.
Eileen will spend \({\$225}\) to purchase some bowls and some plates. Each bowl costs \({\$4}\text{,}\) and each plate costs \({\$5}\text{.}\) The function \(p(b)={-{\frac{4}{5}}b+45}\) models the number of plates Eileen will purchase, where \(b\) represents the number of bowls Eileen will purchase.
Interpret the meaning of \(p(55)={1}\text{.}\)
A. If \(55\) bowls are purchased, then \(1\) plates will be purchased.
B. \(\$55\) will be used to purchase bowls, and \(\$1\) will be used to purchase plates.
C. If \(1\) bowls are purchased, then \(55\) plates will be purchased.
D. \(\$1\) will be used to purchase bowls, and \(\$55\) will be used to purchase plates.
33.
Sharell will spend \({\$270}\) to purchase some bowls and some plates. Each bowl costs \({\$5}\text{,}\) and each plate costs \({\$6}\text{.}\) The function \(p(b)={-{\frac{5}{6}}b+45}\) models the number of plates Sharell will purchase, where \(b\) represents the number of bowls Sharell will purchase.
Interpret the meaning of \(p(18)={30}\text{.}\)
A. If \(18\) bowls are purchased, then \(30\) plates will be purchased.
B. \(\$18\) will be used to purchase bowls, and \(\$30\) will be used to purchase plates.
C. \(\$30\) will be used to purchase bowls, and \(\$18\) will be used to purchase plates.
D. If \(30\) bowls are purchased, then \(18\) plates will be purchased.
34.
Eileen will spend \({\$400}\) to purchase some bowls and some plates. Each plate costs \({\$3}\text{,}\) and each bowl costs \({\$10}\text{.}\) The function \(q(x)={-{\frac{3}{10}}x+40}\) models the number of bowls Eileen will purchase, where \(x\) represents the number of plates to be purchased.
Interpret the meaning of \(q(20)={34}\text{.}\)
A. \(\$34\) will be used to purchase bowls, and \(\$20\) will be used to purchase plates.
B. \(\$20\) will be used to purchase bowls, and \(\$34\) will be used to purchase plates.
C. \(20\) plates and \(34\) bowls can be purchased.
D. \(34\) plates and \(20\) bowls can be purchased.