# 1.5: Functions as Rules and Tables

**At Grade**Created by: CK-12

## Learning Objectives

- Identify the domain and range of a function.
- Make a table for a function.
- Write a function rule.
- Represent a real-world situation with a function.

## Introduction

A **function** is a rule for relating two or more variables. For example, the price a person pays for phone service may depend on the number of minutes he/she talks on the phone. We would say that the cost of phone service is a *function* of the number of minutes she talks. Consider the following situation.

*Josh goes to an amusement park where he pays $2 per ride.*

There is a relationship between the number of rides on which Josh goes and the total cost for the day. To figure out the cost you multiply the number of rides by two. A **function** is the rule that takes us from the number of rides to the cost. Functions usually, *but not always* are rules based on mathematical operations. You can think of a function as a box or a machine that contains a mathematical operation.

A set of numbers is fed into the function box. Those numbers are changed by the given operation into a set of numbers that come out from the opposite side of the box. We can input different values for the number of rides and obtain the cost.

The input is called the **independent variable** because its value can be any possible number. The output results from applying the operation and is called the **dependent variable** because its value depends on the input value.

Often functions are more complicated than the one in this example. Functions usually contain more than one mathematical operation. Here is a situation that is slightly more complicated.

*Jason goes to an amusement park where he pays $8 admission and $2 per ride.*

This function represents the total amount Jason pays. The rule for the function is “multiply the number of rides by 2 and add 8.”

We input different values for the number of rides and we arrive at different outputs (costs).

These flow diagrams are useful in visualizing what a function is. However, they are cumbersome to use in practice. We use the following short-hand notation instead.

\begin{align*}& \quad \ input\\ & \quad \ \ \ \downarrow\\ & \quad \underbrace{f(x)}= y \leftarrow output\\ & \ function\\ & \quad \ \ box\end{align*}

First, we define the variables.

\begin{align*}x =\end{align*} the number of rides Josh goes on

\begin{align*}y =\end{align*} the total amount of money Jason paid at the amusement park.

So, \begin{align*}x\end{align*} represents the input and \begin{align*}y\end{align*} represents the output. The notation: \begin{align*}f()\end{align*} represents the function or the mathematical operations we use on the input to obtain the output. In the last example, the cost is 2 times the number of rides plus 8. This can be written as a function.

\begin{align*}f(x) = 2x + 8\end{align*}

The output is given by the formula \begin{align*}f(x) = 2x + 8\end{align*}. The notations \begin{align*}y\end{align*} and \begin{align*}f(x)\end{align*} are used interchangeably but keep in mind that \begin{align*}y\end{align*} represents output value and \begin{align*}f(x)\end{align*} represents the mathematical operations that gets us from the input to the output.

## Identify the Domain and Range of a Function

In the last example, we saw that we can input the number of rides into the function to give us the total cost for going to the amusement park. The set of all values that are possible for the input is called the **domain** of the function. The set of all values that are possible for the output is called the **range** of function. In many situations the **domain** and **range** of a function is the set of all real numbers, but this is not always the case. Let's look at our amusement park example.

**Example 1**

Find the domain and range of the function that describes the situation:

*Jason goes to an amusement park where he pays $8 admission and $2 per ride.*

**Solution**

Here is the function that describes this situation.

\begin{align*}f(x) = 2x + 8=y\end{align*}

In this function, \begin{align*}x\end{align*} is the number of rides and \begin{align*}y\end{align*} is the total cost. To find the domain of the function, we need to determine which values of \begin{align*}x\end{align*} make sense as the input.

- The values have to be zero or positive because Jason can't go on a negative number of rides.
- The values have to be integers because, for example, Jason could not go on 2.25 rides.
- Realistically, there must be a maximum number of rides that Jason can go on because the park closes, he runs out of money, etc. However, since we are not given any information about this we must consider that all non-negative integers could be possible regardless of how big they are.

**Answer** For this function, the domain is the set of all non-negative integers.

To find the range of the function we must determine what the values of \begin{align*}y\end{align*} will be when we apply the function to the input values. The domain is the set of all non-negative integers (0, 1, 2, 3, 4, 5, 6...). Next we plug these values into the function for \begin{align*}x\end{align*}.

\begin{align*}f(x) = 2x + 8=y\end{align*}

Then, \begin{align*}y= 8, 10, 12, 14, 16, 18, 20, \ldots\end{align*}

**Answer** The range of this function is the set of all even integers greater than or equal to 8.

**Example 2**

Find the domain and range of the following functions.

a) A ball is dropped from a height and it bounces up to 75% of its original height.

b) \begin{align*}y=x^2\end{align*}

**Solution**

a) Let’s define the variables:

\begin{align*}x=\end{align*} original height

\begin{align*}y=\end{align*} bounce height

Here is a function that describes the situation. \begin{align*}y=f(x)=0.75x\end{align*}.

The variable \begin{align*}x\end{align*} can take any real value greater than zero.

The variable \begin{align*}y\end{align*} can also take any real value greater than zero.

**Answer** The domain is the set of all real numbers greater than zero.

The range is the set of all real numbers greater than zero.

b) Since we don’t have a word-problem attached to this equation we can assume that we can use any real number as a value of \begin{align*}x\end{align*}.

Since \begin{align*}y=x^2\end{align*}, the value of \begin{align*}y\end{align*} will always be non-negative whether \begin{align*}x\end{align*} is positive, negative, or zero.

**Answer** The domain of this function is all real numbers.

The range of this function is all non-negative real numbers

As we saw, for a function, the variable \begin{align*}x\end{align*} is called the **independent variable** because it can be any of the values from the domain. The variable \begin{align*}y\end{align*} is called the **dependent variable** because its value depends on \begin{align*}x\end{align*}. Any symbols can be used to represent the dependent and independent variables. Here are three different examples.

\begin{align*}y & = f(x) = 3x\\ R & = f(w) = 3w\\ v & =f(t)=3t\end{align*}

These expressions all represent the same function. The dependent variable is three times the independent variable. In practice, the symbols used for the independent and dependent variables are based on common usage. For example: \begin{align*}t\end{align*} for time, \begin{align*}d\end{align*} for distance, \begin{align*}v\end{align*} for velocity, etc. The standard symbols to use are \begin{align*}y\end{align*} for the dependent variable and \begin{align*}x\end{align*} for the independent variable.

A Function:

- Only accepts numbers from the domain.
- For each input, there is exactly one output. All the outputs form the range.

**Multimedia Link** For another look at the domain of a function, see the following video where the narrator solves a sample problem from the California Standards Test about finding the domain of an unusual function Khan Academy CA Algebra I Functions (6:34)

.

## Make a Table For a Function

A table is a very useful way of arranging the data represented by a function. We can match the input and output values and arrange them as a table. Take the amusement park example again.

*Jason goes to an amusement park where he pays $8 admission and $2 per ride.*

We saw that to get from the input to the output we perform the operations \begin{align*}2 \times input+ 8\end{align*}. For example, we input the values 0, 1, 2, 3, 4, 5, 6, and we obtain the output values 8, 10, 12, 14, 16, 18, 20. Next, we can make the following table of values.

\begin{align*}x\end{align*} | \begin{align*}y\end{align*} |
---|---|

0 | 8 |

1 | 10 |

2 | 12 |

3 | 14 |

4 | 16 |

5 | 18 |

6 | 20 |

A table allows us organize out data in a compact manner. It also provides an easy reference for looking up data, and it gives us a set of coordinate points that we can plot to create a graphical representation of the function.

**Example 3**

Make a table of values for the following functions.

a) \begin{align*} f(x) = 5x - 9\end{align*} Use the following numbers for input values: -4, -3, -2, -1, 0, 1, 2, 3, 4.

b) \begin{align*} f(x) = \frac{1} {x}\end{align*} Use the following numbers for input values: -1, -0.5, -0.2, -0.1, -0.01, 0.01, 0.1, 0.2, 0.5, 1.

**Solution**

Make a table of values by filling the first column with the input values and the second column with the output values calculated using the given function.

a)

\begin{align*}x\end{align*} | \begin{align*}f(x)=5x-9=y\end{align*} |
---|---|

\begin{align*}-4\end{align*} | \begin{align*}5(-4)-9 =-29\end{align*} |

-3 | \begin{align*}5(-3)-9 = -24\end{align*} |

-2 | \begin{align*}5(-2)-9 = -19\end{align*} |

-1 | \begin{align*}5(-1)-9 = -14\end{align*} |

0 | \begin{align*}5(0)-9 = -9\end{align*} |

1 | \begin{align*}5(1)-9 = -4\end{align*} |

2 | \begin{align*}5(2)-9 = 1\end{align*} |

3 | \begin{align*}5(3)-9 = 6\end{align*} |

4 | \begin{align*}5(4)-9 = 11\end{align*} |

b)

\begin{align*}x\end{align*} | \begin{align*}f(x) = \frac{1} {x} = y\end{align*} |
---|---|

\begin{align*}-1\end{align*} | \begin{align*}\frac{1} {-1} = -1\end{align*} |

-0.5 | \begin{align*}\frac{1} {-0.5} = -2\end{align*} |

-0.2 | \begin{align*}\frac{1} {-0.2} = -5\end{align*} |

-0.1 | \begin{align*}\frac{1} {-0.1} = -10\end{align*} |

-0.01 | \begin{align*}\frac{1} {-0.01} = -100\end{align*} |

0.01 | \begin{align*}\frac{1} {0.01} = 100\end{align*} |

0.1 | \begin{align*}\frac{1} {0.1} = 10\end{align*} |

0.2 | \begin{align*}\frac{1} {0.2} = 5\end{align*} |

0.5 | \begin{align*}\frac{1} {0.5} = 2\end{align*} |

1.0 | \begin{align*}\frac{1} {1} = 1\end{align*} |

You are not usually given the input values of a function. These are picked based on the particular function or circumstance. We will discuss how we pick the input values for the table of values throughout this book.

## Write a Function Rule

In many situations, we collect data by conducting a survey or an experiment. Then we organize the data in a table of values. Most often, we would like to find the function rule or formula that fits the set of values in the table. This way we can use the rule to predict what could happen for values that are not in the table.

**Example 4**

*Write a function rule for the table.*

\begin{align*}& \text{Number of CDs} & & 2 & & 4 & & 6 & & 8 & & 10\\ & \text{Cost} (\$) & & 24 & & 48 & & 72& & 86 & &120 \end{align*}

**Solution**

You pay $24 for 2 CDs, $48 for 4 CDs, $120 for 10 CDs. That means that each CD costs $12.

We can write the function rule.

\begin{align*}\text{Cost} = \$12 \times \end{align*} number of CDs or \begin{align*}f(x)=12x\end{align*}

**Example 5**

*Write a function rule for the table.*

\begin{align*}x & & -3 & & -2 & & -1 & & 0 & & 1 & & 2 & & 3\\ y & & 3 & & 2 & & 1 & & 0 & & 1 & & 2 & & 3\end{align*}

**Solution**

You can see that a negative number turns in the same number but a positive and a non-negative number stays the same. This means that the output values are obtained by applying the absolute value function to the input values: \begin{align*}f(x)=|x|\end{align*}.

Writing a functional rule is probably the hardest thing to do in mathematics. In this book, you will write functional rules mostly for linear relationships which are the simplest type of function.

## Represent a Real-World Situation with a Function

Let’s look at a few real-world situations that can be represented by a function.

**Example 5**

*Maya has an internet service that currently has a monthly access fee of $11.95 and a connection fee of $0.50 per hour. Represent her monthly cost as a function of connection time.*

**Solution**

**Define** Let \begin{align*}x=\end{align*} the number of hours Maya spends on the internet in one month

Let \begin{align*}y=\end{align*} Maya’s monthly cost

**Translate** There are two types of cost flat fee of $11.95 and charge per hour of $0.50

The total cost = flat fee + hourly fee \begin{align*}\times\end{align*} number of hours

**Answer** The function is \begin{align*}y=f(x)=11.95+0.50x\end{align*}

**Example 6**

*Alfredo wants a deck build around his pool. The dimensions of the pool are* \begin{align*}12 \ feet \times 24\ feet\end{align*}. He does not want to spend more than a set amount and the decking costs $3 per square foot. Write the cost of the deck as a function of the width of the deck.

**Solution**

**Define** Let \begin{align*}x=\end{align*} width of the deck

Let \begin{align*}y=\end{align*} cost of the deck

**Make a sketch and label it**

**Translate** You can look at the decking as being formed by several rectangles and squares. We can find the areas of all the separate pieces and add them together:

\begin{align*}\text{Area of deck} = 12x+12x+24x+24x+x^2+x^2+x^2+x^2+72x+4x^2\end{align*}

To find the toal cost we multiply the area by the cost per square foot.

**Answer** \begin{align*}f(x)=3(72x+4x^2)=216x+12x^2\end{align*}

**Example 7**

*A cell phone company sells two million phones in their first year of business. The number of phones they sell doubles each year. Write a function that gives the number of phones that are sold per year as a function of how old the company is*.

**Solution**

**Define** Let \begin{align*}x=\end{align*} age of company in years

Let \begin{align*}y=\end{align*} number of phones that are sold per year

**Make a table**

\begin{align*}& \text{Age (years)} & & 1 & & 2 & & 3 & & 4 & & 5 & & 6 & & 7\\ & \text{Number of phones (millions)} & & 2 & & 4 & & 8 & & 16 & & 32 & & 64 & & 128\end{align*}

**Write a function rule**

The number of phones sold per year doubles every year. We start with one million the first year:

\begin{align*}& \text{Year} \ 1: & & 2 \ million \\ & \text{Year} \ 2: & & 2 \times 2 = 4 \ million\\ & \text{Year} \ 3: & & 2 \times 2 \times 2 = 8 \ million\\ & \text{Year} \ 4: & & 2 \times 2 \times 2 \times 2 = 16 \ million\end{align*}

We can keep multiplying by two to find the number of phones sold in the next years. You might remember that when we multiply a number by itself several times we can use exponential notation.

\begin{align*} 2=2^1\\ 2\times 2= 2^2\\ 2\times 2 \times 2 =2^3\end{align*}

In this problem, the exponent represents the age of the company.

**Answer** \begin{align*}y=f(x)=2^x\end{align*}

## Review Questions

Identify the domain and range of the following functions.

- Dustin charges $10 per hour for mowing lawns.
- Maria charges $25 per hour for tutoring math, with a minimum charge of $15.
- \begin{align*}f(x) = 15x-12\end{align*}
- \begin{align*}f(x)2x^2+ 5\end{align*}
- \begin{align*}f(x)=\frac{1}{x}\end{align*}
- What is the range of the function \begin{align*}y=x^2 -5\end{align*} when the domain is -2, -1, 0, 1, 2?
- What is the range of the function \begin{align*}y=2x-\frac{3}{4}\end{align*} when the domain is -2.5, 1.5, 5?
- Angie makes $6.50 per hour working as a cashier at the grocery store. Make a table of values that shows her earning for input values 5, 10, 15, 20, 25, 30.
- The area of a triangle is given by: \begin{align*}A=\frac{1}{2}bh\end{align*}. If the height of the triangle is 8 centimeters, make a table of values that shows the area of the triangle for heights 1, 2, 3, 4, 5, and 6 centimeters.
- Make a table of values for the function \begin{align*} f(x) = \sqrt{2x + 3}\end{align*} for input values -1, 0, 1, 2, 3, 4, 5.
- Write a function rule for the table \begin{align*}& x & & 3 & & 4 & & 5 & & 6 \\ & y & & 9 & & 16 & & 25 & & 36\end{align*}
- Write a function rule for the table \begin{align*}& \text{hours} & & 0 & & 1 & & 2 & & 3 \\ & \text{cost} & & 15 & & 20 & & 25 & & 30 \end{align*}
- Write a function rule for the table \begin{align*}& x & & 0 & & 1 & & 2 & & 3\\ & y & & 24 & & 12 & & 6 & & 3\end{align*}
- Write a function that represents the number of cuts you need to cut a ribbon in \begin{align*}x\end{align*} number of pieces.
- Solomon charges a $40 flat rate and $25 per hour to repair a leaky pipe. Write a function that represents the total fee charge as a function of hours worked. How much does Solomon earn for a 3 hour job?
- Rochelle has invested $2500 in a jewelry making kit. She makes bracelets that she can sell for $12.50 each. How many bracelets does Rochelle need to make before she breaks even?

## Review Answers

- Domain: non-negative rational numbers; Range: non-negative rational numbers.
- Domain: non-negative rational numbers; Range: rational numbers greater than 15.
- Domain: all real numbers; Range: all real numbers.
- Domain: all real numbers; Range: real number greater than or equal to 5.
- Domain: all real numbers except 0; Range: all real numbers except 0.
- -1, -4, -5
- -2, 0, \begin{align*}\frac{7}{4}\end{align*}

\begin{align*}& \text{hours} & & 5 & & 10 & & 15 & & 20 & & 25 & & 30\\ & \text{earnings} & & \$ 32.50 & & \$65 & & \$97.50 & & \$130 & & \$162.50 & & \$195\end{align*}

\begin{align*}& \text{height (cm)} & & 1 & & 2 & & 3 & & 4 & & 5 & & 6\\ & \text{Area} & & 4 & & 8 & & 12 & & 16 & & 20 & & 24\end{align*}

\begin{align*}& x & & -1 & & 0 & & 1 & & 2 & & 3 & & 4 & & 5\\ & y & & 1 & & 1.73 & & 2.24 & & 2.65 & & 3 & & 3.32 & & 3.6\end{align*}

- \begin{align*}y=x^2\end{align*}
- \begin{align*}y=15+5x \end{align*}
- \begin{align*}y=\frac{24}{2^x} \end{align*}
- \begin{align*}f(x)=x-1\end{align*}
- \begin{align*}y=40+25x\end{align*}; $115
- 200 bracelets

### Notes/Highlights Having trouble? Report an issue.

Color | Highlighted Text | Notes | |
---|---|---|---|

Show More |