Lines and Graphing · Chapter 12
Finding the Equation of a Line
The numbered examples below are interactive: the numbers change every time you load the page. Type your answer, press Enter or Check, and use New numbers to practice again.
The physical sciences, social sciences and the business world are full of situations that can be modeled with linear equations relating two variables. If data points appear to form a straight line, the equation of that line can be used to predict the value of one variable from the value of the other. To build such a model we need to be able to find the equation of a line. The method we use depends on what information we are given.
Given the Slope and -Intercept
If we know the slope and -intercept, we substitute them into slope-intercept form, .
Find an equation of a line with slope and -intercept .
Sometimes the slope and intercept need to be read from a graph.
Find the equation of the line shown.
Point-Slope Form
What if we know the slope and a point that is not the -intercept? Suppose a line has slope and contains the point , and let be any other point on the line. Write the slope of the line and rewrite it:
Point-Slope Form. The point-slope form of an equation of a line with slope and containing the point is
We use point-slope form to find the equation of a line when we are given the slope and one point, and then rewrite the equation in slope-intercept form, which most applications use.
How to find an equation of a line given the slope and a point.
Step 1. Identify the slope.
Step 2. Identify the point.
Step 3. Substitute the values into the point-slope form .
Step 4. Write the equation in slope-intercept form.
Find an equation of a line with slope that contains the point . Write the equation in slope-intercept form.
Find an equation of a line with slope that contains the point . Write the equation in slope-intercept form.
Find an equation of a horizontal line that contains the point . Write the equation in slope-intercept form.
Given Two Points
When real-world data is collected, a linear model can be created from two data points. We have two options so far, slope-intercept or point-slope. Since we know two points, it makes more sense to use point-slope form. First we need the slope, which we find with the slope formula from the two points. Then we use the slope and one of the given points.
How to find an equation of a line given two points.
Step 1. Find the slope using the given points, .
Step 2. Choose one point.
Step 3. Substitute the values into the point-slope form .
Step 4. Write the equation in slope-intercept form.
Find an equation of a line that contains the points and . Write the equation in slope-intercept form.
Find an equation of a line that contains the points and . Write the equation in slope-intercept form.
Find an equation of a line that contains the points and . Write the equation in slope-intercept form.
Summary
Which form we use depends on the information we are given.
| If given | Use | Form |
|---|---|---|
| Slope and -intercept | slope-intercept form | |
| Slope and a point | point-slope form | |
| Two points | point-slope form |
Worked-example videos
Adapted from OpenStax Elementary Algebra 2e, licensed under CC BY 4.0.