Suppose you worked at an animal rescue caring for the dogs, and you wanted to determine the age of each of the dogs in 'dog years', based on the age in human years. Since you would be performing the same calculation over and over, your friend suggests that you write a function. How would you go about setting up such a function? Is a function really different from a two variable, \begin{align*}x=y\end{align*} form of an equation?

### Function Notation

Instead of purchasing a one-day ticket to the theme park, Joseph decided to pay by ride. Each ride costs $2.00. To describe the amount of money Joseph will spend, several mathematical concepts can be used.

First, an expression can be written to describe the relationship between the cost per ride and the number of rides, \begin{align*}r\end{align*}. An equation can also be written, if the total amount he wants to spend is known. An inequality can be used if Joseph wanted to spend less than a certain amount.

#### Using Joseph’s situation, let's write the following:

The variable in this situation is the number of rides Joseph will pay for. Call this \begin{align*}r\end{align*}.

- An expression representing his total amount spent

\begin{align*}2(r)\end{align*}

- An equation representing his total amount spent

\begin{align*}2(r) = m\end{align*}

- An equation that shows Joseph wants to spend exactly $22.00 on rides

\begin{align*}2(r) = 22\end{align*}

- An inequality that describes the fact that Joseph will not spend more than $26.00 on rides

\begin{align*}2(r) \le 26\end{align*}

In addition to an expression, equation, or inequality, Joseph’s situation can be expressed in the form of a function or a table.

**Writing Equations as Functions**

A function is a set of ordered pairs in which the first coordinate, usually \begin{align*}x\end{align*}, matches with exactly one second coordinate, \begin{align*}y\end{align*}. Equations that follow this definition can be written in function notation. The \begin{align*}y\end{align*} coordinate represents the **dependent variable**, meaning the values of this variable depend upon what is substituted for the other variable.

Consider Joseph’s equation \begin{align*}m = 2r\end{align*}. Using function notation, the value of the equation (the money spent, represented by \begin{align*}m\end{align*}) is replaced with \begin{align*}f(r)\end{align*}. \begin{align*}f\end{align*} represents the function name and \begin{align*}(r)\end{align*} represents the variable. In this case the parentheses do not mean multiplication; they separate the function name from the **independent variable.**

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

#### Now, let's rewrite the following equations in function notation.

- \begin{align*}y=7x-3\end{align*}

According to the definition of a function, \begin{align*}y=f(x)\end{align*}, so \begin{align*}f(x)=7x-3\end{align*}.

- \begin{align*}d=65t\end{align*}

This time the dependent variable is \begin{align*}d\end{align*}. Function notation replaces the dependent variable, so \begin{align*}d = f(t) = 65t\end{align*}.

- \begin{align*}F=1.8C+32\end{align*}

\begin{align*}F = f(C) = 1.8C + 32\end{align*}

#### Why Use Function Notation?

Why is it necessary to use function notation? The necessity stems from using multiple equations. Function notation allows one to easily decipher between the equations. Suppose Joseph, Lacy, Kevin, and Alfred all went to the theme park together and chose to pay $2.00 for each ride. Each person would have the same equation \begin{align*}m=2r\end{align*}. Without asking each friend, we could not tell which equation belonged to whom. By substituting function notation for the dependent variable, it is easy to tell which function belongs to whom. By using function notation, it will also be much easier to graph multiple lines. The functions below represent possible functions to represent the total amount of money each friend spent at the theme park:

\begin{align*}J(r)= 2r\end{align*} represents Joseph’s total,

\begin{align*}L(r)= 2r\end{align*} represents Lacy's total,

\begin{align*}K(r)= 2r\end{align*} represents Kevin's total, and

\begin{align*}A(r)= 2r\end{align*} represents Alfred’s total.

### Examples

#### Example 1

Earlier, you were asked to determine the age of dogs in 'dog years' based on the age in human years. What function would represent this situation? Is a function really different from a two variable, \begin{align*}x=y\end{align*}, form of an equation?

Though it has been disproved, it is a common thought that each human year is 7 dog years. For simplicity, we will use this number to write our function. Let \begin{align*}h\end{align*} represent the number of human years. This will be our independent variable. If each human year is 7 dog years, then the function will be:

\begin{align*}f(h)=7h\end{align*}

A function is not very different from a two variable form of an equation. When changing to function form, the dependent variable is replaced with \begin{align*}f(x)\end{align*} where \begin{align*}x\end{align*} is the independent variable.

**For Examples 2-5, use the following information: You are printing shirts to raise money. The cost of printing the shirts was expressed as \begin{align*}100+7x\end{align*} and for the revenue, we had the expression \begin{align*} 15x\end{align*}, where \begin{align*}x\end{align*} is the number of shirts.**

#### Example 2

Write two functions, one for the cost and one for revenue.

The cost function we will write as \begin{align*}C(x)=100+7x\end{align*} and the revenue function we will write as \begin{align*}R(x)=15x\end{align*}.

#### Example 3

Express that the cost must be less than or equal to $800.

Since \begin{align*}C(x)\end{align*} represents the costs, we substitute in $800 for \begin{align*}C(x)\end{align*} and replace the equation with the appropriate inequality symbol

\begin{align*}100+7x \le 800\end{align*}

This reads that \begin{align*}100+7x\end{align*} is less than or equal to $800, so we have written the inequality correctly.

#### Example 4

Express that the revenue must be equal to $1500.

We substitute in $1500 for \begin{align*}R(x)\end{align*}, getting

\begin{align*}1500=15x.\end{align*}

#### Example 5

How many shirts must the students sell in order to make $1500?

We want to find the value of \begin{align*}x\end{align*} that will make this equation true. It looks like 100 is the answer. Checking this (see below) it is clear that 100 does satisfy the equation. The students must sell 100 shirts in order to have a revenue of $1500.

\begin{align*}1500=15(100)\end{align*}

\begin{align*}1500=1500\end{align*}

### Review

- Rewrite using function notation: \begin{align*}y= \frac{5}{6} x-2\end{align*}.
- Rewrite using function notation: \begin{align*}m=n^2+2n-3\end{align*}.
- What is one benefit of using function notation?
- Write a function that expresses the money earned after working some number of hours for $10 an hour.
- Write a function that represents the number of cuts you need to cut a ribbon in \begin{align*}x\end{align*} number of pieces.
- Jackie and Mayra each will collect a $2 pledge for every basket they make during a game. Write two functions, one for each girl, expressing how much money she will collect.

**Mixed Review**

- Compare the following numbers \begin{align*}23 \ \underline{\;\;\;\;\;} \ 21.999\end{align*}.
- Write an equation to represent the following: the quotient of 96 and 4 is \begin{align*}g\end{align*}.
- Write an inequality to represent the following: 11 minus \begin{align*}b\end{align*} is at least 77.
- Find the value of the variable \begin{align*}k:13(k)=169\end{align*}.

### Review (Answers)

To see the Review answers, open this PDF file and look for section 1.10.