CHAPTER 6 Linear Equations and Graphing
6.6 Find the Equation of a Line
Learning Objectives
By the end of this section, you will be able to:
- Find an equation of the line given the slope and -intercept
- Find an equation of the line given the slope and a point
- Find an equation of the line given two points
- Find an equation of a line parallel to a given line
- Find an equation of a line perpendicular to a given line
How do online retailers know that ‘you may also like’ a particular item based on something you just ordered? How can economists know how a rise in the minimum wage will affect the unemployment rate? How do medical researchers create drugs to target cancer cells? How can traffic engineers predict the effect on your commuting time of an increase or decrease in gas prices? It’s all mathematics.
You are at an exciting point in your mathematical journey as the mathematics you are studying has interesting applications in the real world.
The physical sciences, social sciences, and the business world are full of situations that can be modeled with linear equations relating two variables. Data is collected and graphed. If the data points appear to form a straight line, an equation of that line can be used to predict the value of one variable based on the value of the other variable.
To create a mathematical model of a linear relation between two variables, we must be able to find the equation of the line. In this section we will look at several ways to write the equation of a line. The specific method we use will be determined by what information we are given.
Find an Equation of the Line Given the Slope and y-Intercept
We can easily determine the slope and intercept of a line if the equation was written in slope–intercept form, . Now, we will do the reverse—we will start with the slope and y-intercept and use them to find the equation of the line.
EXAMPLE 1
Find an equation of a line with slope and y-intercept .
Since we are given the slope and y-intercept of the line, we can substitute the needed values into the slope–intercept form, .
Name the slope. | |
Name the y-intercept. | |
Substitute the values into . | |
TRY IT 1.1
Find an equation of a line with slope and y-intercept .
Show answer
TRY IT 1.2
Find an equation of a line with slope and y-intercept .
Show answer
Sometimes, the slope and intercept need to be determined from the graph.
EXAMPLE 2
Find the equation of the line shown.
We need to find the slope and y-intercept of the line from the graph so we can substitute the needed values into the slope–intercept form, .
To find the slope, we choose two points on the graph.
The y-intercept is and the graph passes through .
Find the slope by counting the rise and run. | |
Find the y-intercept. | |
Substitute the values into . | |
TRY IT 2.1
Find the equation of the line shown in the graph.
Show answer
TRY IT 2.2
Find the equation of the line shown in the graph.
Show answer
Find an Equation of the Line Given the Slope and a Point
Finding an equation of a line using the slope–intercept form of the equation works well when you are given the slope and y-intercept or when you read them off a graph. But what happens when you have another point instead of the y-intercept?
We are going to use the slope formula to derive another form of an equation of the line. Suppose we have a line that has slope and that contains some specific point and some other point, which we will just call . We can write the slope of this line and then change it to a different form.
Multiply both sides of the equation by . | |
Simplify. | |
Rewrite the equation with the terms on the left. |
This format is called the point–slope form of an equation of a line.
Point–slope form of an equation of a line
The point–slope form of an equation of a line with slope and containing the point is
We can use the point–slope form of an equation to find an equation of a line when we are given the slope and one point. Then we will rewrite the equation in slope–intercept form. Most applications of linear equations use the the slope–intercept form.
EXAMPLE 3
Find an equation of a line with slope that contains the point . Write the equation in slope–intercept form.
TRY IT 3.1
Find an equation of a line with slope and containing the point .
Show answer
TRY IT 3.2
Find an equation of a line with slope and containing thepoint .
Show answer
HOW TO: Find an equation of a line given the slope and a point
- Identify the slope.
- Identify the point.
- Substitute the values into the point-slope form, .
- Write the equation in slope–intercept form.
EXAMPLE 4
Find an equation of a line with slope that contains the point . Write the equation in slope–intercept form.
Since we are given a point and the slope of the line, we can substitute the needed values into the point–slope form, .
Identify the slope. | |
Identify the point. | |
Substitute the values into . | |
Simplify. | |
Write in slope–intercept form. |
TRY IT 4.1
Find an equation of a line with slope and containing the point .
Show answer
TRY IT 4.2
Find an equation of a line with slope , and containing the point .
Show answer
EXAMPLE 5
Find an equation of a horizontal line that contains the point . Write the equation in slope–intercept form.
Every horizontal line has slope 0. We can substitute the slope and points into the point–slope form, .
Identify the slope. | |
Identify the point. | |
Substitute the values into . | |
Simplify. | |
Write in slope–intercept form. | It is in y-form, but could be written . |
Did we end up with the form of a horizontal line, ?
TRY IT 5.1
Find an equation of a horizontal line containing the point .
Show answer
TRY IT 5.2
Find an equation of a horizontal line containing the point .
Show answer
Find an Equation of the Line Given Two Points
When real-world data is collected, a linear model can be created from two data points. In the next example we’ll see how to find an equation of a line when just two points are given.
We have two options so far for finding an equation of a line: slope–intercept or point–slope. Since we will know two points, it will make more sense to use the point–slope form.
But then we need the slope. Can we find the slope with just two points? Yes. Then, once we have the slope, we can use it and one of the given points to find the equation.
EXAMPLE 6
Find an equation of a line that contains the points and . Write the equation in slope–intercept form.
Use the point and see that you get the same equation.
TRY IT 6.1
Find an equation of a line containing the points and .
Show answer
TRY IT 6.2
Find an equation of a line containing the points and .
Show answer
HOW TO: Find an equation of a line given two points
- Find the slope using the given points.
- Choose one point.
- Substitute the values into the point-slope form, .
- Write the equation in slope–intercept form.
EXAMPLE 7
Find an equation of a line that contains the points and . Write the equation in slope–intercept form.
Since we have two points, we will find an equation of the line using the point–slope form. The first step will be to find the slope.
Find the slope of the line through (−3, −1) and (2, −2). | |
Choose either point. | |
Substitute the values into . | |
Write in slope–intercept form. |
TRY IT 7.1
Find an equation of a line containing the points and .
Show answer
TRY IT 7.2
Find an equation of a line containing the points and .
Show answer
EXAMPLE 8
Find an equation of a line that contains the points and . Write the equation in slope–intercept form.
Again, the first step will be to find the slope.
Find the slope of the line through (-2,4) and (-2,-3). | |
The slope is undefined. |
This tells us it is a vertical line. Both of our points have an x-coordinate of . So our equation of the line is . Since there is no , we cannot write it in slope–intercept form.
You may want to sketch a graph using the two given points. Does the graph agree with our conclusion that this is a vertical line?
TRY IT 8.1
Find an equation of a line containing the points and .
Show answer
TRY IT 8.2
Find an equation of a line containing the points and .
Show answer
We have seen that we can use either the slope–intercept form or the point–slope form to find an equation of a line. Which form we use will depend on the information we are given. This is summarized in the following table.
If given: | Use: | Form: |
---|---|---|
Slope and y-intercept | slope–intercept | |
Slope and a point | point–slope | |
Two points | point–slope |
Find an Equation of a Line Parallel to a Given Line
Suppose we need to find an equation of a line that passes through a specific point and is parallel to a given line. We can use the fact that parallel lines have the same slope. So we will have a point and the slope—just what we need to use the point–slope equation.
First let’s look at this graphically.
The graph shows the graph of . We want to graph a line parallel to this line and passing through the point .
We know that parallel lines have the same slope. So the second line will have the same slope as. That slope is. We’ll use the notation to represent the slope of a line parallel to a line with slope . (Notice that the subscript looks like two parallel lines.)
The second line will pass through and have . To graph the line, we start at and count out the rise and run. With (or ), we count out the rise 2 and the run 1. We draw the line.
Do the lines appear parallel? Does the second line pass through ?
Now, let’s see how to do this algebraically.
We can use either the slope–intercept form or the point–slope form to find an equation of a line. Here we know one point and can find the slope. So we will use the point–slope form.
EXAMPLE 9
Find an equation of a line parallel to that contains the point . Write the equation in slope–intercept form.
Does this equation make sense? What is the y-intercept of the line? What is the slope?
TRY IT 9.1
Find an equation of a line parallel to the line that contains the point . Write the equation in slope–intercept form.
Show answer
TRY IT 9.2
Find an equation of a line parallel to the line that contains the point .
Show answer
HOW TO: Find an equation of a line parallel to a given line
- Find the slope of the given line.
- Find the slope of the parallel line.
- Identify the point.
- Substitute the values into the point–slope form, .
- Write the equation in slope–intercept form.
Find an Equation of a Line Perpendicular to a Given Line
Now, let’s consider perpendicular lines. Suppose we need to find a line passing through a specific point and which is perpendicular to a given line. We can use the fact that perpendicular lines have slopes that are negative reciprocals. We will again use the point–slope equation, like we did with parallel lines.
The graph shows the graph of . Now, we want to graph a line perpendicular to this line and passing through .
We know that perpendicular lines have slopes that are negative reciprocals. We’ll use the notation to represent the slope of a line perpendicular to a line with slope . (Notice that the subscript ⊥ looks like the right angles made by two perpendicular lines.)
We now know the perpendicular line will pass through with .
To graph the line, we will start at and count out the rise and the run 2. Then we draw the line.
Do the lines appear perpendicular? Does the second line pass through ?
Now, let’s see how to do this algebraically. We can use either the slope–intercept form or the point–slope form to find an equation of a line. In this example we know one point, and can find the slope, so we will use the point–slope form.
EXAMPLE 10
Find an equation of a line perpendicular to that contains the point . Write the equation in slope–intercept form.
TRY IT 10.1
Find an equation of a line perpendicular to the line that contains the point . Write the equation in slope–intercept form.
Show answer
TRY IT 10.2
Find an equation of a line perpendicular to the line that contains the point .
Show answer
HOW TO: Find an equation of a line perpendicular to a given line
- Find the slope of the given line.
- Find the slope of the perpendicular line.
- Identify the point.
- Substitute the values into the point–slope form, .
- Write the equation in slope–intercept form.
EXAMPLE 11
Find an equation of a line perpendicular to that contains the point . Write the equation in slope–intercept form.
Again, since we know one point, the point–slope option seems more promising than the slope–intercept option. We need the slope to use this form, and we know the new line will be perpendicular to . This line is vertical, so its perpendicular will be horizontal. This tells us the .
Identify the point. | |
Identify the slope of the perpendicular line. | |
Substitute the values into . | |
Simplify. |
Sketch the graph of both lines. Do they appear to be perpendicular?
TRY IT 11.1
Find an equation of a line that is perpendicular to the line that contains the point . Write the equation in slope–intercept form.
Show answer
TRY IT 11.2
Find an equation of a line that is perpendicular to the line that contains the point . Write the equation in slope–intercept form.
Show answer
In (Example 11), we used the point–slope form to find the equation. We could have looked at this in a different way.
We want to find a line that is perpendicular to that contains the point . The graph shows us the line and the point .
We know every line perpendicular to a vertical line is horizontal, so we will sketch the horizontal line through .
Do the lines appear perpendicular?
If we look at a few points on this horizontal line, we notice they all have y-coordinates of . So, the equation of the line perpendicular to the vertical line is .
EXAMPLE 12
Find an equation of a line that is perpendicular to that contains the point .
Write the equation in slope–intercept form.
The line is a horizontal line. Any line perpendicular to it must be vertical, in the form . Since the perpendicular line is vertical and passes through , every point on it has an x-coordinate of . The equation of the perpendicular line is . You may want to sketch the lines. Do they appear perpendicular?
TRY IT 12.1
Find an equation of a line that is perpendicular to the line that contains the point . Write the equation in slope–intercept form.
Show answer
TRY IT 12.1
Find an equation of a line that is perpendicular to the line that contains the point .
Show answer
Access this online resource for additional instruction and practice with finding the equation of a line.
Key Concepts
- To Find an Equation of a Line Given the Slope and a Point
- Identify the slope.
- Identify the point.
- Substitute the values into the point-slope form, .
- Write the equation in slope-intercept form.
- To Find an Equation of a Line Given Two Points
- Find the slope using the given points.
- Choose one point.
- Substitute the values into the point-slope form, .
- Write the equation in slope-intercept form.
- To Write and Equation of a Line
- If given slope and y-intercept, use slope–intercept form .
- If given slope and a point, use point–slope form .
- If given two points, use point–slope form .
- To Find an Equation of a Line Parallel to a Given Line
- Find the slope of the given line.
- Find the slope of the parallel line.
- Identify the point.
- Substitute the values into the point-slope form, .
- Write the equation in slope-intercept form.
- To Find an Equation of a Line Perpendicular to a Given Line
- Find the slope of the given line.
- Find the slope of the perpendicular line.
- Identify the point.
- Substitute the values into the point-slope form, .
- Write the equation in slope-intercept form.
Glossary
- point–slope form
- The point–slope form of an equation of a line with slope and containing the point is .
Practice Makes Perfect
Find an Equation of the Line Given the Slope and y-Intercept
In the following exercises, find the equation of a line with given slope and y-intercept. Write the equation in slope–intercept form.
1. slope 4 and y-intercept | 2. slope 3 and y-intercept |
3. slope 8 and y-intercept | 4. slope 6 and y-intercept |
5. slope and y-intercept | 6. slope and y-intercept |
7. slope and y-intercept | 8. slope and y-intercept |
9. slope and y-intercept | 10. slope and y-intercept |
11. slope and y-intercept | 12. slope and y-intercept |
13. slope 0 and y-intercept | 14. slope 0 and y-intercept |
15. slope and y-intercept | 16. slope and y-intercept |
In the following exercises, find the equation of the line shown in each graph. Write the equation in slope–intercept form.
17. | 18. |
19. | 20. |
21. | 22. |
23. | 24. |
Find an Equation of the Line Given the Slope and a Point
In the following exercises, find the equation of a line with given slope and containing the given point. Write the equation in slope–intercept form.
25. , point | 26. , point |
27. , point | 28. , point |
29. , point | 30. , point |
31. , point | 32. , point |
33. Horizontal line containing | 34. Horizontal line containing |
35. Horizontal line containing | 36. Horizontal line containing |
37. , point | 38. , point |
39. , point | 40. , point |
41. Horizontal line containing | 42. Horizontal line containing |
Find an Equation of the Line Given Two Points
In the following exercises, find the equation of a line containing the given points. Write the equation in slope–intercept form.
43. and | 44. and |
45. and | 46. and |
47. and | 48. and |
49. and | 50. and |
51. and | 52. and |
53. and | 54. and |
55. and | 56. and |
57. and | 58. and |
59. and | 60. and |
61. and | 62. and |
63. and | 64. and |
65. and | 66. and |
67. and | 68. and |
Find an Equation of a Line Parallel to a Given Line
In the following exercises, find an equation of a line parallel to the given line and contains the given point. Write the equation in slope–intercept form.
69. line , point | 70. line , point |
71. line , point | 72. line , point |
73. line , point | 74. line , point |
75. line , point | 76. line , point |
77. line , point | 78. line , point |
79. line , point | 80. line , point |
81. line , point | 82. line , point |
83. line , point | 84. line , point |
Find an Equation of a Line Perpendicular to a Given Line
In the following exercises, find an equation of a line perpendicular to the given line and contains the given point. Write the equation in slope–intercept form.
85. line , point | 86. line , point |
87. line , point | 88. line , point |
89. line , point | 90. line , point |
91. line , point | 92. line , point |
93. line , point | 94. line , point |
95. line y-axis, point | 96. line y-axis, point |
Mixed Practice
In the following exercises, find the equation of each line. Write the equation in slope–intercept form.
97. Containing the points and | 98. Containing the points and |
99. , containing point | 100. , containing point |
101. Parallel to the line , containing point | 102. Parallel to the line , containing point |
103. , containing point | 104. , containing point |
105. Perpendicular to the line y-axis, point | 106. Perpendicular to the line , point |
107. Containing the points and | 108. Containing the points and |
109. Parallel to the line , containing point | 110. Parallel to the line , containing point |
111. Containing the points and | 112. Containing the points and |
113. Perpendicular to the line , containing point | 114. Perpendicular to the line , containing point |
Everyday Math
115. Fuel consumption. The city mpg, , and highway mpg, , of two cars are given by the points and. Find a linear equation that models the relationship between city mpg and highway mpg. | 116. Cholesterol. The age, , and LDL cholesterol level, , of two men are given by the points and . Find a linear equation that models the relationship between age and LDL cholesterol level. |
Writing Exercises
117. Explain in your own words why the slopes of two perpendicular lines must have opposite signs. | 118. Why are all horizontal lines parallel? |
Answers
1. | 3. |
5. | 7. |
9. | 11. |
13. | 15. |
17. | 19. |
21. | 23. |
25. | 27. |
29. | 31. |
33. | 35. |
37. | 39. |
41. | 43. |
45. | 47. |
49. | 51. |
53. | 55. |
57. | 59. |
61. | 63. |
65. | 67. |
69. | 71. |
73. | 75. |
77. | 79. |
81. | 83. |
85. | 87. |
89. | 91. |
93. | 95. |
97. | 99. |
101. | 103. |
105. | 107. |
109. | 111. |
113. | 115. |
117. Answers will vary. |
Attributions
This chapter has been adapted from “Find the Equation of a Line” in Elementary Algebra (OpenStax) by Lynn Marecek and MaryAnne Anthony-Smith, which is under a CC BY 4.0 Licence. Adapted by Izabela Mazur. See the Copyright page for more information.