Read: Write the Equation of a Linear Function Part II
Learning Objectives
- Given a graph, write the equation of a linear function
- Given two function values and corresponding inputs, write the equation of the linear function passing through them
Now that we have written equations for linear functions in both the slope-intercept form and the point-slope form, we can choose which method to use 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 f below.

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 . We can use these points to calculate the slope.
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 wanted to find the slope-intercept form without first writing the point-slope form, we could have recognized that the line crosses the y-axis when the output value is . Therefore, b = . We now have the initial value b and the slope m so we can substitute m and b into the slope-intercept form of a line.
So the function is , and the linear equation would be .
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 y-axis to identify the y-intercept by visual inspection.
- Substitute the slope and y-intercept into the slope-intercept form of a line equation.
Example
Write an equation for a linear function given a graph of f shown below.
Answer:
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 of the Solution
This makes sense because we can see from the graph below that the line crosses the y-axis at the point , which is the y-intercept, so .
Example
If f is a linear function, with f(3)=−2 , and f(8)=1, find an equation for the function in slope-intercept form.Answer:
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.
Summary