## Writing and Interpreting an Equation for a Linear Function

The equation of a linear function is different than that of the linear equations we solved in Unit 1 because it contains two variables. The two variables typically used in a linear function are and . The values in the equation represent the inputs to the function, and the values represent the outputs. In addition to the variables and , the linear function contains a slope and a constant called the y-intercept.

Recall from Equations and Inequalities that we wrote equations in both the slope-intercept form and the point-slope form. Now we can choose which method to use to write equations for linear functions based on the information we are given. That information may be provided in the form of a graph, a point and a slope, two points, and so on. Look at the graph of the function in Figure 7.

**Figure 7**

We are not given the slope of the line, but we can choose any two points on the line to find the slope. Let's choose and .

Now we can substitute the slope and the coordinates of one of the points into the point-slope form.

If we want to rewrite the equation in the slope-intercept form, we would find

If we want to find the slope-intercept form without first writing the point-slope form, we could have recognized that the line crosses the -axis when the output value is 7. Therefore, . We now have the initial value and the slope so we can substitute and into the slope-intercept form of a line.

So the function is , and the linear equation would be .

#### HOW TO

##### Given the graph of a linear function, write an equation to represent the function.

- Identify two points on the line.
- Use the two points to calculate the slope.
- Determine where the line crosses the -axis to identify the -intercept by visual inspection.
- Substitute the slope and -intercept into the slope-intercept form of a line equation.

#### EXAMPLE 5

##### Writing an Equation for a Linear Function

Write an equation for a linear function given a graph of shown in Figure 8.

**Figure 8**

##### Solution

Identify two points on the line, such as and . Use the points to calculate the slope.

Substitute the slope and the coordinates of one of the points into the point-slope form.

We can use algebra to rewrite the equation in the slope-intercept form.

##### Analysis

This makes sense because we can see from Figure 9 that the line crosses the -axis at the point , which is the -intercept, so .

**Figure 9**

#### EXAMPLE 6

##### Writing an Equation for a Linear Cost Function

Suppose Ben starts a company in which he incurs a fixed cost of per month for the overhead, which includes his office rent. His production costs are per item. Write a linear function where is the cost for items produced in a given month.

##### Solution

The fixed cost is present every month, . The costs that can vary include the cost to produce each item, which is . The variable cost, called the marginal cost, is represented by . The cost Ben incurs is the sum of these two costs, represented by .

##### Analysis

If Ben produces 100 items in a month, his monthly cost is found by substituting 100 for .

So his monthly cost would be .

#### EXAMPLE 7

##### Writing an Equation for a Linear Function Given Two Points

If is a linear function, with , and , find an equation for the function in slopeintercept form.

##### Solution

We can write the given points using coordinates.

We can then use the points to calculate the slope.

Substitute the slope and the coordinates of one of the points into the point-slope form.

We can use algebra to rewrite the equation in the slope-intercept form.

#### TRY IT #3

If is a linear function, with , and , write an equation for the function in slope-intercept form.

Source: Rice University, https://openstax.org/books/college-algebra/pages/4-1-linear-functions

This work is licensed under a Creative Commons Attribution 4.0 License.