Skip to main content
\(\require{cancel}\newcommand{\abs}[1]{\left\lvert#1\right\rvert} \newcommand{\point}[2]{\left(#1,#2\right)} \newcommand{\highlight}[1]{{\color{blue}{{#1}}}} \newcommand{\lowlight}[1]{{\color{lightgray}{#1}}} \newcommand{\attention}[1]{\mathord{\overset{\downarrow}{#1}}} \newcommand{\substitute}[1]{\highlight{#1}} \newcommand{\addright}[1]{\highlight{{}+#1}} \newcommand{\addleft}[1]{\highlight{#1+{}}} \newcommand{\subtractright}[1]{\highlight{{}-#1}} \newcommand{\multiplyright}[2][\cdot]{\highlight{{}#1#2}} \newcommand{\multiplyleft}[2][\cdot]{\highlight{#2#1{}}} \newcommand{\divideunder}[2]{\frac{#1}{\highlight{#2}}} \newcommand{\divideright}[1]{\highlight{{}\div#1}} \newcommand{\apple}{\text{šŸŽ}} \newcommand{\banana}{\text{šŸŒ}} \newcommand{\pear}{\text{šŸ}} \newcommand{\cat}{\text{🐱}} \newcommand{\dog}{\text{🐶}} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

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.

Figure9.1.1Alternative Video Lesson

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.

<<SVG image is unavailable, or your browser cannot render it>>

Figure9.1.2A relation

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.

<<SVG image is unavailable, or your browser cannot render it>>

Figure9.1.3Two Pairs of Inputs and Outputs of the Relation ā€œChicken to Egg Colorā€

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.

<<SVG image is unavailable, or your browser cannot render it>>

Figure9.1.4The relation ā€œChicken to Egg Colorā€

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.ā€

<<SVG image is unavailable, or your browser cannot render it>>

Figure9.1.5The relation ā€œ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.

<<SVG image is unavailable, or your browser cannot render it>>

<<SVG image is unavailable, or your browser cannot render it>>

Figure9.1.7Not a Function: Fails the Vertical Line Test
Figure9.1.8A Function: Passes the Vertical Line Test

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:

  1. the function's name is \(f\)
  2. the input variable is \(x\)
  3. 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\)

  1. \(g(3)\)
  2. \(g(0)\)
  3. \(g(-2)\)
Solution

  1. 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*}
  2. 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*}
  3. 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.

  1. \(h(t)=-1\)

  2. \(h(t)=0\)

  3. \(h(t)=11\)

Solution

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

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

  3. 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\)
Table9.1.16Recorded Temperatures

  1. What was the temperature at midnight?

  2. Find \(f(9)\text{.}\) Explain what this function value represents in the context of the problem.

  3. When was the temperature 44 °F?

  4. Solve \(f(t)=52\text{.}\) Explain what this solution set represents in the context of the problem.

Solution
  1. 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.

  2. 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.

  3. 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.

  4. 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.

<<SVG image is unavailable, or your browser cannot render it>>

Figure9.1.18Bee Growth

  1. Determine the number of bees in the colony after \(3\) months.

  2. Find \(B(0)\text{.}\) Explain what this function value represents in the context of the problem.

  3. When did the number of bees reach \(13,000\) bees?

  4. Solve \(B(t)=0\text{.}\) Explain what this solution set represents in the context of the problem.

Solution

  1. 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).

  2. 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.

  3. 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.

  4. 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.

  1. \(\{(2,5), (3,6), (4,3), (4,-5), (8,0)\} \)

  2. \(\{(1,2), (3,-2), (5,5), (7,-4), (9,6)\} \)

Solution

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

  2. 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:

<<SVG image is unavailable, or your browser cannot render it>>

<<SVG image is unavailable, or your browser cannot render it>>

Figure9.1.22Not a Function: Fails the Vertical Line Test
Figure9.1.23A Function: Passes the Vertical Line Test
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.

  1. \(x\) \(-2\) \(-1\) \(0\) \(1\) \(2\)
    \(y\) \(5\) \(5\) \(5\) \(5\) \(5\)
    Table9.1.26
  2. \(x\) \(0\) \(1\) \(2\) \(3\) \(4\)
    \(y\) \(8\) \(6\) \(4\) \(2\) \(0\)
    Table9.1.27
  3. \(x\) \(-2\) \(-2\) \(0\) \(2\) \(2\)
    \(y\) \(1\) \(3\) \(5\) \(7\) \(9\)
    Table9.1.28
Solution

  1. This relation represents a function as each input corresponds to exactly one output. Domain: \(\{-2,-1,0,1,2\}\text{.}\) Range: \(\{5\}\text{.}\)

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

  3. 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.

  1. <<SVG image is unavailable, or your browser cannot render it>>

    Figure9.1.30

  2. <<SVG image is unavailable, or your browser cannot render it>>

    Figure9.1.31

  3. <<SVG image is unavailable, or your browser cannot render it>>

    Figure9.1.32

  4. <<SVG image is unavailable, or your browser cannot render it>>

    Figure9.1.33

  5. <<SVG image is unavailable, or your browser cannot render it>>

    Figure9.1.34

  6. <<SVG image is unavailable, or your browser cannot render it>>

    Figure9.1.35

Solution

  1. 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)\)

  2. 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]\)

  3. 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]\)

  4. 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)\)

  5. 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)\)

  6. 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

1
2
3
4

Evaluating Function

5
6
7
8
9
10
11
12

Solving Equation for Functions

13
14
15

Domain and Range

16
17
18
19
20
21
22
23
24

Function in Graph and Table

25
26
27
28
29
30
31
32
33
34
35
36