In this explainer, we will learn how to identify, write, and evaluate a linear function and complete its function table.

Imagine that we have booked a gardener for a job. We know that the gardener charges a $10 callout fee, then another $5 per hour for their services. The total amount that the gardener will charge is a function of the number of hours they work. Without knowing the exact number of hours they are likely to take, we can set up a linear equation that can be used to predict the total cost for any total time. Using to represent the total number of hours spent working and to represent the total cost, in dollars, the linear equation is

The graph of this equation is as follows.

When a relationship assigns *exactly* one output for a given input, it is called a function. If the
graph of that function is a nonvertical straight line, the function is called a linear function. In
the case of the gardener, the linear function can be represented by

The set of inputs is known as the *domain* of the function, while the set of possible outputs is
called the *range*. For a linear function, both the domain and the range are the set of real numbers,
.

### Definition: Linear Function

A linear function is an algebraic equation whose graph is a nonvertical straight line.

Since is the input to the function, the value of the function for a certain number can be found by substituting that number for the variable . For instance, the total cost of the gardener if they work for 8 hours is found by substituting :

In our first example, we will demonstrate this process in its entirety.

### Example 1: Evaluating a Linear Function at a Given Point

Evaluate , given that .

### Answer

To find the value of a function for a certain number, we substitute that number for the variable. In this case, the variable of the function is . Hence, is found by substituting into the expression :

So, .

In our first example, we demonstrated how to find the output of a function given a single input. Since the input of this function could, in fact, be any real number, we could have an infinite number of outputs. It can help to organize a finite number of outputs using a function table.

### Example 2: Evaluating the Output of a Function given Its Input

Fill in the input–output table for the function .

Input | 0 | 2 | 4 | 5 |
---|---|---|---|---|

Output |

### Answer

The function is given as an equation where represents the input to the function and represents the corresponding output.

Input | 0 | 2 | 4 | 5 |
---|---|---|---|---|

Output |

This means that we can complete the second row of the table by substituting the various input values from the first row into the expression .

First, let :

Input | 0 | 2 | 4 | 5 |
---|---|---|---|---|

Output | 3 |

To find the next output, let :

Input | 0 | 2 | 4 | 5 |
---|---|---|---|---|

Output | 3 | 13 |

Similarly, the final two outputs are found by letting and respectively:

The input–output table for is as follows.

Input | 0 | 2 | 4 | 5 |
---|---|---|---|---|

Output | 3 | 13 | 23 | 28 |

Astute readers might have observed the similarities between working with linear functions and drawing graphs. This is not an accident. In fact, while it is outside the scope of this explainer to investigate these links, we can write input and output values as ordered pairs. In the previous example, the relevant ordered pairs were , , , and .

In our next example, we will use substitution to establish a linear function given a pair of ordered pairs.

### Example 3: Determining Which Linear Equation Is Satisfied by a Given Ordered Pair

Which of the following linear functions is satisfied by both the point and the point ?

### Answer

There are a number of ways to find a linear function to relate the ordered pairs and . We could, for instance, use our knowledge of straight lines to attempt to find the equation of the line that passes through these points on a coordinate plane. In this question, however, we are given five equations to choose from. This means that we can check whether the ordered pairs satisfy each equation by substituting the values from each pair into these equations.

First, consider the equation . For the ordered pair , and . Let’s substitute into the equation as follows:

Since , this ordered pair does not satisfy this relation.

Next, consider . Substituting , we get the following:

We now check the ordered pair by substituting into the same equation:

Since both ordered pairs satisfy the relation , the answer is option B.

Note: we can check the remaining three relations in the same way. When we do, we see that none of them satisfy the ordered pairs and .

Now that we have a process for linking the input and output given a linear function, we will demonstrate how this can help us to solve problems involving missing unknowns.

### Example 4: Finding the Value of a Constant given the Value of the Function at a Particular Value

Find the value of given and .

### Answer

Recall that the value of a function for a certain number can be found by substituting that number for the variable . Here, we are given the function and a second statement, . This means that, when 8 is substituted for , the output is . Algebraically,

We now have a single equation in terms of one variable, . To solve this equation, we will perform a series of inverse operations:

Throughout this explainer, we have solved problems by substituting numerical values into
functions. It is important to note that a similar process can be performed with algebraic
expressions. This results in a *composite function*.

### Example 5: Substituting an Algebraic Expression into a Linear Function

Evaluate , given that .

### Answer

Recall that the value of a function for a certain number can be found by substituting that number for the variable . In a similar way, we can find an expression for a function by substituting an algebraic expression for the variable.

In this example, is found by substituting in place of as follows:

Hence, .

We have now demonstrated fairly extensively how to find a function value for a given input when given the equation of the function, both algebraically and numerically. We have used these techniques to solve missing value problems and identify ordered pairs that satisfy a given function equation.

We will now finish by recapping the key concepts from this explainer.

### Key Points

- When a relationship assigns
*exactly*one output for a given input, it is called a function. If the graph of that function is a nonvertical straight line, the function is called a linear function. - A linear function is an algebraic equation whose graph is a nonvertical straight line.
- The value of the function for a certain number can be found by substituting that number for the variable, usually .