Section9.1Introduction to Functions
¶In mathematics, we use functions to model real-life data. In this section, we will learn the definition of function and related concepts.
Subsection9.1.1Introduction to Functions
When working with two variables, we are interested in the relationship between those two variables. For example, if we know the value of one variable, are we able to determine the value of the second variable? We will start this subsection with the definition of a relation in math.
A relation is like a āblack boxā in the figure. It takes inputs one by one, and gives outputs one by one. The set of all inputs for this relation is called the relation's domain, and the set of all outputs is called the range.
For example, a relation's name is āChicken to Egg Color.ā Its input is a chicken's name, and its output is the color of that chicken's eggs. The relation's domain has \(5\) chicken names, and its range has \(4\) colors of chicken eggs. FigureĀ 9.1.3 shows two inputs and their corresponding outputs in the āblack boxā model.
The āblack boxā is useful to introduce the concept of a function, but it's not convenient to show too many pairs of inputs and outputs. FigureĀ 9.1.4 represents the relation graphically in a more concise way. The relation's input variable is āchicken name,ā and its output variable is āegg color.ā Note that we are using the word āvariable,ā because the values vary in chicken names and egg colors, just like the value of \(x\) varies in numbers.
We can also use a set of ordered pairs to represent this relation:
\begin{equation*} \{(\text{Hazel, tan}), (\text{Yvonne, brown}), (\text{Georgia, brown}), (\text{Emma, green}), (\text{Isabella, white})\} \end{equation*}Next, we will look at the āoppositeā relation, or āinverseā relation in math terms, named āEgg Color to Chicken.ā
Only one of those two relations qualify as a function in math. Let's look at the definition of a function.
Definition9.1.6Function
In mathematics, a function is a relation between a set of inputs and a set of permissible outputs with the property that each input is related to exactly one output. (Visit Wikipedia for more.)
In FigureĀ 9.1.4, 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 a function allows multiple inputs to be related to one output, like in (Yvonne, brown) and (Georgia, brown).
In FigureĀ 9.1.5, we can see the color brown (input) is related to two outputs, Yvonne and Georgia. This disqualifies the relation Egg Color to Chicken as a function.
Subsection9.1.2Identifying Functions Graphically
To determine if a relation that is represented graphically is a function, we need to visually determine if each input corresponds to exactly one output. One way of doing this is referred to as the vertical line test. In short, if any vertical line passes through the graph more than once, then that graph does not represent a function. In the graph in FigureĀ 9.1.7, we can see that a given vertical line passes through the graph more than once. This means that this graph is not a function. However, in FigureĀ 9.1.8, we see that nowhere could we draw a vertical line that would pass through this graph more than once. Therefore, this graph is a function.
Subsection9.1.3Function Notation
We know that the equation \(y=5x+3\) represents a function, 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 \(1\text{,}\) we'd replace \(x\) with \(1\) and find the value of \(y\text{:}\)
\begin{align*} y\amp= 5(1)+3\\ \amp= 5+3\\ \amp=8 \end{align*}Our end result is that \(y=8\text{.}\) Notice that this does not communicate the value of the input variableāwe'd have to look back at our work to see that. Function notation will allow us to communicate both the input and the output. It will also allow us to give each function a name, which is helpful when we have multiple functions.
When we write \(y=f(x)\text{,}\) we are communicating three important things:
- the function's name is \(f\)
- the input variable is \(x\)
- the output variable is \(y\)
To find the value of this function when \(x=1\text{,}\) we'd evaluate \(f\) at \(1\text{:}\)
\begin{align*} f(x)\amp=5x+3\\ f(1)\amp=5(1)+3\\ \amp=5+3\\ \amp=8 \end{align*}Our end result now is that \(f(1)=8\text{,}\) which tells us that the value of the function \(f\) is \(8\) when the input is \(1\text{.}\) We can also say: The function \(f\)'s value is \(8\) at \(x=1\text{.}\)
Remark9.1.9
The most common letters used to represent functions are \(f,g,\) and \(h\text{.}\) The most common variables we use are \(x,y,\) 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.
Remark9.1.10
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{.}\) In fact, we can only write \(f\) when calling the function by name. We won't ever use a function name on its own inside an expression or equation; there we will only use \(f(x)\) or something similar.
Subsection9.1.4Evaluating Functions and Solving Equations with Function Notation
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.
Example9.1.11
Find the given function values for a function \(g\) where \(g(x)=5x^2-3x+4\)
- \(g(3)\)
- \(g(0)\)
- \(g(-2)\)
-
We will subsitute \(x=3\) into \(g(x)\text{:}\)
\begin{align*} g(3) \amp= 5(3)^2-3(3)+4\\ \amp= 5(9)-9+4\\ \amp= 40 \end{align*} -
We will subsitute \(x=0\) into \(g(x)\text{:}\)
\begin{align*} g(0) \amp= 5(0)^2-3(0)+4\\ \amp= 5(0)+0+4\\ \amp= 4 \end{align*} -
We will subsitute \(x=-2\) into \(g(x)\text{:}\)
\begin{align*} g(-2)\amp= 5(-2)^2-3(-2)+4\\ \amp= 5(4)+6+4\\ \amp= 30 \end{align*}
In ExampleĀ 9.1.11, we found the function value when given the input, which we refer to as evaluating a function. To solve an equation involving function notation, we need to solve for the value of the variable that makes an equation true, just like in any other equation.
Example9.1.12
Solve the equations below for a function \(h\) where \(h(t)=-4t+7\text{.}\) Check each answer and state the solution set.
\(h(t)=-1\)
\(h(t)=0\)
\(h(t)=11\)
-
To solve for \(t\text{,}\) we will subsisute \(h(t)\) with \(-4t+7\) in \(h(t)=-1\text{:}\)
\begin{align*} h(t) \amp= -1\\ -4t+7 \amp= -1\\ -4t \amp= -8\\ t \amp=2 \end{align*}To check, we will verify that \(h(2)=-1\text{:}\)
\begin{align*} h(2) \amp= -4(2)+7\\ \amp= -8+7\\ \amp= -1 \checkmark \end{align*}The solution is \(2\text{,}\) and the solution set is \(\{2\}\text{.}\)
-
To solve for \(t\text{,}\) we will subsisute \(h(t)\) with \(-4t+7\) in \(h(t)=0\text{:}\)
\begin{align*} h(t) \amp= 0\\ -4t+7 \amp= 0\\ -4t \amp= -7\\ t \amp=\frac{7}{4} \end{align*}To check, we will verify that \(h\left(\frac{7}{4}\right)=0\text{:}\)
\begin{align*} h\left(\frac{7}{4}\right) \amp = -4\left(\frac{7}{4}\right)+7\\ \amp= -7+7\\ \amp= 0 \checkmark \end{align*}The solution is \(0\text{,}\) and the solution set is \(\left\{\frac{7}{4}\right\}\text{.}\)
-
To solve for \(t\text{,}\) we will subsisute \(h(t)\) with \(-4t+7\) in \(h(t)=11\text{:}\)
\begin{align*} h(t) \amp= 11\\ -4t+7 \amp= 11\\ -4t \amp= 4\\ t \amp=-1 \end{align*}To check, we will verify that \(h(-1)=11\text{:}\)
\begin{align*} h(-1) \amp= -4(-1)+7\\ \amp= 4+7\\ \amp= 11 \checkmark \end{align*}The solution is \(-1\text{,}\) and the solution set is \(\{-1\}\text{.}\)
Exercise9.1.13
Exercise9.1.14
Example9.1.15
Temperature readings for Portland, OR, on a given day are recorded in TableĀ 9.1.16 . Let \(f(t)\) be the temperature in degrees Fahrenheit \(t\) hours after midnight.
\(t\text{,}\) hours after midnight | \(0\) | \(1\) | \(2\) | \(3\) | \(4\) | \(5\) | \(6\) | \(7\) | \(8\) | \(9\) | \(10\) | \(11\) | \(12\) |
\(f(t)\text{,}\) temperature in °F | \(45\) | \(44\) | \(42\) | \(42\) | \(43\) | \(44\) | \(45\) | \(48\) | \(49\) | \(50\) | \(53\) | \(52\) | \(53\) |
What was the temperature at midnight?
Find \(f(9)\text{.}\) Explain what this function value represents in the context of the problem.
When was the temperature 44āÆĀ°F?
Solve \(f(t)=52\text{.}\) Explain what this solution set represents in the context of the problem.
-
To determine the temperature at midnight, we look in the table where \(t=0\) and see that the output is \(45\text{.}\) Using function notation, we would write:
\begin{align*} f(0) \amp= 45 \end{align*}Thus at midnight the temperature was 45āÆĀ°F.
-
To determine the value of \(f(9)\text{,}\) we look in the table where \(t=9\) and read the output:
\begin{align*} f(9) \amp= 50 \end{align*}In context, this means that at 9am the temperature was 50āÆĀ°F.
To determine when the temperature was 44āÆĀ°F, we look in the table to see where the output was 44āÆĀ°F. This occurs when \(t=1\) and again when \(t=5\text{.}\) In summary, this means that the temperature was 44āÆĀ°F at 1am and again at 5am.
-
To solve \(f(t)=52\text{,}\) we need to find the value of \(t\) that makes the equation true. Looking at the table, we look at the outputs and see that the output is \(52\) when \(t=11\text{.}\) Stating this with function notation, we write:
\begin{align*} f(t) \amp= 52\\ t \amp= 11 \end{align*}In context, this means that the temperature was 52āÆĀ°F at 11am.
Example9.1.17
A colony of bees was happily residing in Ann's backyard in 2012. Let \(B(t)\) be the size of the bee colony (in thousands) \(t\) months after April 1, 2012. This function is modeled in FigureĀ 9.1.18.
Determine the number of bees in the colony after \(3\) months.
Find \(B(0)\text{.}\) Explain what this function value represents in the context of the problem.
When did the number of bees reach \(13,000\) bees?
Solve \(B(t)=0\text{.}\) Explain what this solution set represents in the context of the problem.
When \(t=3\text{,}\) we see the graph contains the point \((3,15)\text{.}\) A value of \(y=15\) when \(t=3\) tells us that there were \(15,000\) bees \(3\) months after April 1, 2012 (or on July 1, 2012).
To find \(B(0)\text{,}\) we recognize that this will be the output of the function when \(t=0\text{.}\) The point \((0,10)\) on the graph of \(y=B(t)\) tells us that \(B(0)=10\text{.}\) In the context of this problem, this means on April 1, 2012 there were \(10,000\) bees in the colony.
To determine when the number of bees reached \(13,000\text{,}\) we need to find the input value of which \(y=13\text{.}\) The approximate points \((1,13)\) and \((5,13)\) on the graph of \(y=B(t)\) indicate that \(B(t)=13\) when \(t\approx 1\) and \(t\approx 5\text{.}\) Thus there will be \(13,000\) bees in the colony approximately 1 month after April 1, 2012 and again 5 months after April 1, 2012.
To solve \(B(t)=0\text{,}\) we need to determine the value of \(t\) for which \(y=0\text{.}\) The point \((9,0)\) on the graph of \(y=B(t)\) tells us that \(B(t)=0\) when \(t=9\text{.}\) In the context of this problem, this means there were \(0\) bees in the colony \(9\) months after April 1, 2012. (or on January 1, 2013).
Subsection9.1.5Domain and Range
When working with relations and functions, one of the things we need to identify is all possible values for each variable. We define the domain to be the set of all possible inputs. We define the range to be the set of all possible outputs.
Example9.1.19
The relations below are given in the form of ordered pairs. Determine if each is a function. Then state the domain and range of each.
\(\{(2,5), (3,6), (4,3), (4,-5), (8,0)\} \)
\(\{(1,2), (3,-2), (5,5), (7,-4), (9,6)\} \)
The first relation does not represent a function as the input of \(4\) is associated with more than one output (\(3\) and \(-5\)). Domain: \(\{2,3,4,8\} \text{.}\) Range: \(\{-5,0,3,5,6\} \text{.}\)
The second relation does represent a function as each input is associated with exactly one output. Domain: \(\{1,3,5,7,9\}\text{.}\) Range: \(\{-4,-2,2,5,6\}\text{.}\)
Exercise9.1.20
Remark9.1.21
Another means of determining if a set of pairs represents a function is to look at them graphically and use the vertical line test. In ExampleĀ 9.1.19, we can see that the first set does not represent a function while the second does represent a function:
Exercise9.1.24
Example9.1.25
For each relation shown in TableĀ 9.1.26 through TableĀ 9.1.28, determine if \(y\) is a function of \(x\text{.}\) Then state the domain and range of each.
\(x\) \(-2\) \(-1\) \(0\) \(1\) \(2\) \(y\) \(5\) \(5\) \(5\) \(5\) \(5\) Table9.1.26 \(x\) \(0\) \(1\) \(2\) \(3\) \(4\) \(y\) \(8\) \(6\) \(4\) \(2\) \(0\) Table9.1.27 \(x\) \(-2\) \(-2\) \(0\) \(2\) \(2\) \(y\) \(1\) \(3\) \(5\) \(7\) \(9\) Table9.1.28
This relation represents a function as each input corresponds to exactly one output. Domain: \(\{-2,-1,0,1,2\}\text{.}\) Range: \(\{5\}\text{.}\)
This relation represents a function as each input corresponds to exactly one output. Domain: \(\{0,1,2,3,4\}\text{.}\) Range: \(\{0,2,4,6,8\}\text{.}\)
This relation does not represent a function as some of the inputs correspond to more than one output. The input of \(2\text{,}\) for example, corresponds to both \(7\) and \(9\text{.}\) Domain: \(\{-2,0,2\}\text{.}\) Range: \(\{1,3,5,7,9\}\text{.}\)
Example9.1.29
For the relations graphed in FigureĀ 9.1.30 through FigureĀ 9.1.35, determine if the graph represents a function. Then state the domain and range using interval and set-builder notation.
Figure9.1.30 Figure9.1.31 Figure9.1.32 Figure9.1.33 Figure9.1.34 Figure9.1.35
-
This graph passes the vertical line test and is therefore a function.
-
Domain:
Set-Builder Notation: \(\{x|x\ \textrm{is a real number}\}\)
Interval Notation: \((-\infty,\infty)\)
-
Range:
Set-Builder Notation: \(\{y|y\ \textrm{is a real number}\}\)
Interval Notation: \((-\infty,\infty)\)
-
-
This graph does not pass the vertical line test and is therefore not a function.
-
Domain:
Set-Builder Notation: \(\{x|1 \le x \le 3\}\)
Interval Notation: \([1,3]\)
-
Range:
Set-Builder Notation: \(\{y|2 \le y \le 4\}\)
Interval Notation: \([2,4]\)
-
-
This graph passes the vertical line test and is therefore a function.
-
Domain:
Set-Builder Notation: \(\{x|1 \le x \lt 7\}\)
Interval Notation: \([1,7)\)
-
Range:
Set-Builder Notation: \(\{y|-7 \lt y \le 7\}\)
Interval Notation: \((-7,7]\)
-
-
This graph passes the vertical line test and is therefore a function.
-
Domain:
Set-Builder Notation: \(\{x| x \ge 2\}\)
Interval Notation: \([2,\infty)\)
-
Range:
Set-Builder Notation: \(\{y|y \ge 1\}\)
Interval Notation: \([1,\infty)\)
-
-
This graph does not pass the vertical line test and is therefore not a function.
-
Domain:
Set-Builder Notation: \(\{x|x\ \textrm{is a real number}\}\)
Interval Notation: \((-\infty,\infty)\)
-
Range:
Set-Builder Notation: \(\{y|y\ \textrm{is a real number}\}\)
Interval Notation: \((-\infty,\infty)\)
-
-
This graph passes the vertical line test and is therefore a function.
-
Domain:
Set-Builder Notation: \(\{x|x \le -1\ \textrm{or}\ x \gt 2\}\)
Interval Notation: \((-\infty,-1]\cup(2,\infty)\)
-
Range:
Set-Builder Notation: \(\{y|y \le -3\ \textrm{or}\ y=5\}\)
Interval Notation: \((-\infty,-3]\cup\{5\}\)
-
Exercise9.1.36
Subsection9.1.6Exercises
Determining whether a Relation is Function
Evaluating Function
Solving Equation for Functions
Domain and Range
Function in Graph and Table