Elementary Algebra 2e · free preview

4.6 Find the Equation of a Line

Learning objectives: Find an equation of the line given the slope and $y$ -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

1. Learning objectives

Learning objectives

Learning objectives

  • Find an equation of the line given the slope and yy -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.

2. Find an Equation of the Line Given the Slope and *y*-Intercept

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, y=mx+b.y=mx+b. 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.

3. Example 4.57

Example 4.57

Example 4.57

Find an equation of a line with slope −7-7 and y-intercept (0,−1)(0,-1).

Solution

Since we are given the slope and y-intercept of the line, we can substitute the needed values into the slope–intercept form, y=mx+by=mx+b.

Sometimes, the slope and intercept need to be determined from the graph.

4. Example 4.58

Example 4.58

Example 4.58

Find the equation of the line shown.

Solution

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, y=mx+by=mx+b.

To find the slope, we choose two points on the graph.

The y-intercept is (0,−4)(0,-4) and the graph passes through (3,−2)(3,-2).

5. Find an Equation of the Line Given the Slope and a Point

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 mm and that contains some specific point (x1,y1)({x}_{1},{y}_{1}) and some other point, which we will just call (x,y)(x,y). We can write the slope of this line and then change it to a different form.

m=y−y1x−x1m=\frac{y-{y}_{1}}{x-{x}_{1}}
Multiply both sides of the equation by x−x1x-{x}_{1}. m(x−x1)=(y−y1x−x1)(x−x1)\begin{array}{rll} \,m(x-{x}_{1}) & = & (\frac{y-{y}_{1}}{x-{x}_{1}})(x-{x}_{1}) \\ \end{array}
Simplify. m(x−x1)=y−y1\begin{array}{rll} \,m(x-{x}_{1}) & = & y-{y}_{1} \\ \end{array}
Rewrite the equation with the yy terms on the left. y−y1=m(x−x1)\begin{array}{rll} \,y-{y}_{1} & = & m(x-{x}_{1}) \\ \end{array}

Table

4.46

This format is called the point–slope form of an equation of a line.

The point–slope form of an equation of a line with slope mm and containing the point (x1,y1)({x}_{1},{y}_{1}) 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.

6. Example 4.59

Example 4.59

Example 4.59

Find an Equation of a Line Given the Slope and a Point

Find an equation of a line with slope m=25m=\frac{2}{5} that contains the point (10,3)(10,3). Write the equation in slope–intercept form.

Find an equation of a line given the slope and a point.

  1. Step 1. Identify the slope.
  2. Step 2. Identify the point.
  3. Step 3. Substitute the values into the point-slope form, y−y1=m(x−x1)y-{y}_{1}=m(x-{x}_{1}).
  4. Step 4. Write the equation in slope–intercept form.

7. Example 4.60

Example 4.60

Example 4.60

Find an equation of a line with slope m=−13m=-\frac{1}{3} that contains the point (6,−4)(6,-4). Write the equation in slope–intercept form.

Solution

Since we are given a point and the slope of the line, we can substitute the needed values into the point–slope form, y−y1=m(x−x1)y-{y}_{1}=m(x-{x}_{1}).

8. Example 4.61

Example 4.61

Example 4.61

Find an equation of a horizontal line that contains the point (−1,2)(-1,2). Write the equation in slope–intercept form.

Solution

Every horizontal line has slope 0. We can substitute the slope and points into the point–slope form, y−y1=m(x−x1)y-{y}_{1}=m(x-{x}_{1}).

Did we end up with the form of a horizontal line, y=ay=a?

9. Find an Equation of the Line Given Two Points

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.

10. Example 4.62

Example 4.62

Example 4.62

Find an Equation of a Line Given Two Points

Find an equation of a line that contains the points (5,4)(5,4) and (3,6)(3,6). Write the equation in slope–intercept form.

Solution

Use the point (3,6)(3,6) and see that you get the same equation.

Find an equation of a line given two points.

  1. Step 1. Find the slope using the given points.
  2. Step 2. Choose one point.
  3. Step 3. Substitute the values into the point-slope form, y−y1=m(x−x1)y-{y}_{1}=m(x-{x}_{1}).
  4. Step 4. Write the equation in slope–intercept form.

11. Example 4.63

Example 4.63

Example 4.63

Find an equation of a line that contains the points (−3,−1)(-3,-1) and (2,−2)(2,-2). Write the equation in slope–intercept form.

Solution

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.

12. Example 4.64

Example 4.64

Example 4.64

Find an equation of a line that contains the points (−2,4)(-2,4) and (−2,−3)(-2,-3). Write the equation in slope–intercept form.

Solution

Again, the first step will be to find the slope.

Find the slope of the line through (−2,4) and (−2,−3)(-2,4)\,\mathrm{and}\,(-2,-3).m=y2−y1x2−x1m=\frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}
m=−3−4−2−(−2)m=\frac{-3-4}{-2-(-2)}
m=−70m=\frac{-7}{0}
The slope is undefined.

This tells us it is a vertical line. Both of our points have an x-coordinate of −2-2. So our equation of the line is x=−2x=-2. Since there is no yy, 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?

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 Table 4.47.

To Write an Equation of a Line
If given:Use:Form:
Slope and y-interceptslope–intercepty=mx+by=mx+b
Slope and a pointpoint–slopey−y1=m(x−x1)y-{y}_{1}=m(x-{x}_{1})
Two pointspoint–slopey−y1=m(x−x1)y-{y}_{1}=m(x-{x}_{1})

Table

4.47

13. Find an Equation of a Line Parallel to a Given Line

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 y=2x−3y=2x-3. We want to graph a line parallel to this line and passing through the point (−2,1)(-2,1).

We know that parallel lines have the same slope. So the second line will have the same slope asy=2x−3y=2x-3. That slope ism∥=2{m}_{\parallel}=2. We’ll use the notation m∥{m}_{\parallel} to represent the slope of a line parallel to a line with slope mm. (Notice that the subscript ∥\parallel looks like two parallel lines.)

The second line will pass through (−2,1)(-2,1) and have m=2m=2. To graph the line, we start at(−2,1)(-2,1) and count out the rise and run. With m=2m=2 (or m=21m=\frac{2}{1}), 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 (−2,1)(-2,1)?

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.

14. Example 4.65

Example 4.65

Example 4.65

How to Find an Equation of a Line Parallel to a Given Line

Find an equation of a line parallel to y=2x−3y=2x-3 that contains the point (−2,1)(-2,1). Write the equation in slope–intercept form.

Solution

Does this equation make sense? What is the y-intercept of the line? What is the slope?

Find an equation of a line parallel to a given line.

  1. Step 1. Find the slope of the given line.
  2. Step 2. Find the slope of the parallel line.
  3. Step 3. Identify the point.
  4. Step 4. Substitute the values into the point–slope form, y−y1=m(x−x1)y-{y}_{1}=m(x-{x}_{1}).
  5. Step 5. Write the equation in slope–intercept form.

15. Find an Equation of a Line Perpendicular to a Given Line

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 y=2x−3y=2x-3. Now, we want to graph a line perpendicular to this line and passing through (−2,1)(-2,1).

We know that perpendicular lines have slopes that are negative reciprocals. We’ll use the notation m⊥{m}_{\perp} to represent the slope of a line perpendicular to a line with slope mm. (Notice that the subscript ⊥ looks like the right angles made by two perpendicular lines.)

y=2x−3perpendicularlinem=2m⊥=−12\begin{array}{ccl} y=2x-3 & & \mathrm{perpendicular line} \\ m=2 & & {m}_{\perp}=-\frac{1}{2} \\ \end{array}

We now know the perpendicular line will pass through (−2,1)(-2,1) with m⊥=−12{m}_{\perp}=-\frac{1}{2}.

To graph the line, we will start at (−2,1)(-2,1) and count out the rise −1-1 and the run 2. Then we draw the line.

Do the lines appear perpendicular? Does the second line pass through (−2,1)(-2,1)?

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.

16. Example 4.66

Example 4.66

Example 4.66

How to Find an Equation of a Line Perpendicular to a Given Line

Find an equation of a line perpendicular to y=2x−3y=2x-3 that contains the point (−2,1)(-2,1). Write the equation in slope–intercept form.

Find an equation of a line perpendicular to a given line.

  1. Step 1. Find the slope of the given line.
  2. Step 2. Find the slope of the perpendicular line.
  3. Step 3. Identify the point.
  4. Step 4. Substitute the values into the point–slope form, y−y1=m(x−x1)y-{y}_{1}=m(x-{x}_{1}).
  5. Step 5. Write the equation in slope–intercept form.

17. Example 4.67

Example 4.67

Example 4.67

Find an equation of a line perpendicular to x=5x=5 that contains the point (3,−2)(3,-2). Write the equation in slope–intercept form.

Solution

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 x=5x=5. This line is vertical, so its perpendicular will be horizontal. This tells us the m⊥=0{m}_{\perp}=0.

Identify the point.(3,−2)(3,-2)
Identify the slope of the perpendicular line.m⊥=0{m}_{\perp}=0
Substitute the values into y−y1=m(x−x1)y-{y}_{1}=m(x-{x}_{1}).y−y1=m(x−x1)y−(−2)=0(x−3)y+2=0\begin{array}{c} y-{y}_{1}=m(x-{x}_{1}) \\ y-(-2)=0(x-3) \\ y+2=0 \\ \end{array}
Simplify.y=−2y=-2

Sketch the graph of both lines. Do they appear to be perpendicular?

In Example 4.67, 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 x=5x=5 that contains the point (3,−2)(3,-2). The graph shows us the linex=5x=5 and the point (3,−2)(3,-2).

We know every line perpendicular to a vetical line is horizontal, so we will sketch the horizontal line through (3,−2)(3,-2).

Do the lines appear perpendicular?

If we look at a few points on this horizontal line, we notice they all have y-coordinates of −2-2. So, the equation of the line perpendicular to the vertical line x=5x=5 is y=−2y=-2.

18. Example 4.68

Example 4.68

Example 4.68

Find an equation of a line that is perpendicular to y=−4y=-4 that contains the point (−4,2)(-4,2). Write the equation in slope–intercept form.

Solution

The line y=−4y=-4 is a horizontal line. Any line perpendicular to it must be vertical, in the form x=ax=a. Since the perpendicular line is vertical and passes through (−4,2)(-4,2), every point on it has an x-coordinate of −4-4. The equation of the perpendicular line is x=−4x=-4. You may want to sketch the lines. Do they appear perpendicular?

19. Section 4.6 Exercises

Section 4.6 Exercises

Section 4.6 Exercises

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.

In the following exercises, find the equation of the line shown in each graph. Write the equation in slope–intercept form.

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.

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.

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.

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.

In the following exercises, find the equation of each line. Write the equation in slope–intercept form.

Everyday Math

Writing Exercises

ⓐ After completing the exercises, use this checklist to evaluate your mastery of the objectives of this section.

ⓑ On a scale of 1-10, how would you rate your mastery of this section in light of your responses on the checklist? How can you improve this?

20. Practice 1

  1. Find an equation of a line with slope 25\frac{2}{5} and y-intercept (0,4)(0,4).
  1. Find an equation of a line with slope −1-1 and y-intercept (0,−3)(0,-3).
  1. Find the equation of the line shown in the graph.
  1. Find the equation of the line shown in the graph.
  1. Find an equation of a line with slope m=56m=\frac{5}{6} and containing the point (6,3)(6,3).
  1. Find an equation of a line with slope m=23m=\frac{2}{3} and containing the point (9,2)(9,2).

21. Practice 2

  1. Find an equation of a line with slope m=−25m=-\frac{2}{5} and containing the point (10,−5)(10,-5).
  1. Find an equation of a line with slope m=−34m=-\frac{3}{4}, and containing the point (4,−7)(4,-7).
  1. Find an equation of a horizontal line containing the point (−3,8)(-3,8).
  1. Find an equation of a horizontal line containing the point (−1,4)(-1,4).
  1. Find an equation of a line containing the points (3,1)(3,1) and (5,6)(5,6).
  1. Find an equation of a line containing the points (1,4)(1,4) and (6,2)(6,2).

22. Practice 3

  1. Find an equation of a line containing the points (−2,−4)(-2,-4) and (1,−3)(1,-3).
  1. Find an equation of a line containing the points (−4,−3)(-4,-3) and (1,−5)(1,-5).
  1. Find an equation of a line containing the points (5,1)(5,1) and (5,−4)(5,-4).
  1. Find an equaion of a line containing the points (−4,4)(-4,4) and (−4,3)(-4,3).
  1. Find an equation of a line parallel to the line y=3x+1y=3x+1 that contains the point (4,2)(4,2). Write the equation in slope–intercept form.
  1. Find an equation of a line parallel to the line y=12x−3y=\frac{1}{2}x-3 that contains the point (6,4)(6,4).

23. Practice 4

  1. Find an equation of a line perpendicular to the line y=3x+1y=3x+1 that contains the point (4,2)(4,2). Write the equation in slope–intercept form.
  1. Find an equation of a line perpendicular to the line y=12x−3y=\frac{1}{2}x-3 that contains the point (6,4)(6,4).
  1. Find an equation of a line that is perpendicular to the line x=4x=4 that contains the point (4,−5)(4,-5). Write the equation in slope–intercept form.
  1. Find an equation of a line that is perpendicular to the line x=2x=2 that contains the point (2,−1)(2,-1). Write the equation in slope–intercept form.
  1. Find an equation of a line that is perpendicular to the line y=1y=1 that contains the point (−5,1)(-5,1). Write the equation in slope–intercept form.
  1. Find an equation of a line that is perpendicular to the line y=−5y=-5 that contains the point (−4,−5)(-4,-5).

24. Practice 5

  1. slope 4 and y-intercept (0,1)(0,1)
  1. slope 8 and y-intercept (0,−6)(0,-6)
  1. slope −1-1 and y-intercept (0,7)(0,7)
  1. slope −3-3 and y-intercept (0,−1)(0,-1)
  1. slope 15\frac{1}{5} and y-intercept (0,−5)(0,-5)
  1. slope −23-\frac{2}{3} and y-intercept (0,−3)(0,-3)

25. Practice 6

  1. slope 0 and y-intercept (0,2)(0,2)
  1. slope −4-4 and y-intercept (0,0)(0,0)
  1. m=38m=\frac{3}{8}, point (8,2)(8,2)
  1. m=56m=\frac{5}{6}, point (6,7)(6,7)
  1. m=−35m=-\frac{3}{5}, point (10,−5)(10,-5)
  1. m=−13m=-\frac{1}{3}, point (−9,−8)(-9,-8)

26. Practice 7

  1. Horizontal line containing (−1,4)(-1,4)
  1. Horizontal line containing (−1,−7)(-1,-7)
  1. m=−52m=-\frac{5}{2}, point (−8,−2)(-8,-2)
  1. m=−4m=-4, point (−2,−3)(-2,-3)
  1. Horizontal line containing (4,−8)(4,-8)
  1. (3,1)(3,1) and (2,5)(2,5)

27. Practice 8

  1. (2,7)(2,7) and (3,8)(3,8)
  1. (−5,−3)(-5,-3) and (4,−6)(4,-6)
  1. (−2,8)(-2,8) and (−4,−6)(-4,-6)
  1. (3,−2)(3,-2) and (−4,4)(-4,4)
  1. (0,−2)(0,-2) and (−5,−3)(-5,-3)
  1. (4,2)(4,2) and (4,−3)(4,-3)

28. Practice 9

  1. (−2,1)(-2,1) and (−2,−4)(-2,-4)
  1. (6,2)(6,2) and (−3,2)(-3,2)
  1. (−6,−3)(-6,-3) and (−1,−3)(-1,-3)
  1. (0,0)(0,0) and (1,4)(1,4)
  1. (−3,0)(-3,0) and (−7,−2)(-7,-2)
  1. (3,5)(3,5) and (−7,5)(-7,5)

29. Practice 10

  1. line y=3x+4y=3x+4, point (2,5)(2,5)
  1. line y=−3x−1y=-3x-1, point (2,−3)(2,-3)
  1. line 2x−y=62x-y=6, point (3,0)(3,0)
  1. line 2x+3y=62x+3y=6, point (0,5)(0,5)
  1. line x=−4x=-4, point (−3,−5)(-3,-5)
  1. line x−6=0x-6=0, point (4,−3)(4,-3)

30. Practice 11

  1. line y=1y=1, point (3,−4)(3,-4)
  1. line y+7=0y+7=0, point (1,−1)(1,-1)
  1. line y=−2x+3y=-2x+3, point (2,2)(2,2)
  1. line y=−x+5y=-x+5, point (3,3)(3,3)
  1. line y=23x−4y=\frac{2}{3}x-4, point (2,−4)(2,-4)
  1. line 4x−3y=54x-3y=5, point (−3,2)(-3,2)

31. Practice 12

  1. line 4x+5y=−34x+5y=-3, point (0,0)(0,0)
  1. line y−6=0y-6=0, point (−5,−3)(-5,-3)
  1. line y-axis, point (2,1)(2,1)
  1. Containing the points (4,3)(4,3) and (8,1)(8,1)
  1. Containing the points (2,7)(2,7) and (3,8)(3,8)
  1. m=56m=\frac{5}{6}, containing point (6,7)(6,7)

32. Practice 13

  1. Parallel to the line 2x+3y=62x+3y=6, containing point (0,5)(0,5)
  1. m=−35m=-\frac{3}{5}, containing point (10,−5)(10,-5)
  1. Perpendicular to the line y-axis, point (−6,2)(-6,2)
  1. Containing the points (−2,0)(-2,0) and (−3,−2)(-3,-2)
  1. Parallel to the line x=−4x=-4, containing point (−3,−5)(-3,-5)
  1. Containing the points (−5,−3)(-5,-3) and (4,−6)(4,-6)

33. Practice 14

  1. Perpendicular to the line 4x+3y=14x+3y=1, containing point (0,0)(0,0)
  1. Fuel consumption. The city mpg, xx, and highway mpg, yy, of two cars are given by the points (29,40)(29,40) and(19,28)(19,28). Find a linear equation that models the relationship between city mpg and highway mpg.
  1. Explain in your own words why the slopes of two perpendicular lines must have opposite signs.

Practice this interactively

Free account · instant grading · spaced review that schedules itself.

Start this course for free