Module 45: 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 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

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, 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.

EXAMPLE 1

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

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+b.

Name the slope. .
Name the y-intercept. .
Substitute the values into y=mx+b. .
.
.

TRY IT 1.1

Find an equation of a line with slope \dfrac{2}{5} and y-intercept \left(0,4\right).

Show answer

y=\dfrac{2}{5}x+4

TRY IT 1.2

Find an equation of a line with slope -1 and y-intercept \left(0,-3\right).

Show answer

y=-x-3

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

EXAMPLE  2

Find the equation of the line shown.

The graph shows the x y-coordinate plane. The x and y-axes each run from negative 7 to 7. A line intercepts the y-axis at (0, negative 4), passes through the plotted point (3, negative 2), and intercepts the x-axis at (4, 0).

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+b.

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

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

Find the slope by counting the rise and run. .
.
Find the y-intercept. .
Substitute the values into y=mx+b. .
.

TRY IT 2.1

Find the equation of the line shown in the graph.

The graph shows the x y-coordinate plane. The x and y-axes each run from negative 7 to 7. A line intercepts the x-axis at (negative 2, 0), intercepts the y-axis at (0, 1) and passes through the plotted point (5, 4).

Show answer

y=\dfrac{3}{5}x+1

TRY IT 2.2

Find the equation of the line shown in the graph.

The graph shows the x y-coordinate plane. The x and y-axes each run from negative 7 to 7. A line intercepts the y-axis at (0, negative 5), passes through the plotted point (3, negative 1), and intercepts the x-axis at (15 fourths, 0).

Show answer

y=\dfrac{4}{3}x-5

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

m=\dfrac{y-{y}_{1}}{x-{x}_{1}}
Multiply both sides of the equation by x-{x}_{1}. \begin{array}{ccc}m\left(x-{x}_{1}\right)& =\hfill & \left(\dfrac{y-{y}_{1}}{x-{x}_{1}}\right)\left(x-{x}_{1}\right)\hfill \end{array}
Simplify. \begin{array}{ccc}m\left(x-{x}_{1}\right)& =\hfill & y-{y}_{1}\hfill \end{array}
Rewrite the equation with the y terms on the left. \begin{array}{ccc}y-{y}_{1}& =\hfill & m\left(x-{x}_{1}\right)\hfill \end{array}

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 m and containing the point \left({x}_{1},{y}_{1}\right) is

No alt text

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 Given the Slope and a Point

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

Solution

This figure is a table that has three columns and four rows. The first column is a header column, and it contains the names and numbers of each step. The second column contains further written instructions. The third column contains math. In the first row of the table, the first cell on the left reads: “Step 1. Identify the slope.” The text in the second cell reads: “The slope is given.” The third cell contains the slope of a line, defined as m equals 2 fifths.In the second row, the first cell reads: “Step 2. Identify the point.” The second cell reads: “The point is given.” The third cell contains the ordered pair (10, 3). A superscript x subscript 1 is written over 10, and a superscript y subscript 1 is written over 3.In the third row, the first cell reads: “Step 3. Substitute the values into the point-slope form, y minus y subscript 1 equals m times x minus x subscript 1 in parentheses.” The top line of the second cell is left blank. The third cell features the point-slope form written again: y minus y subscript 1 equals m times x minus x subscript 1 in parentheses. Below this is the point-slope form with 10 substituted for x subscript 1, 3 substituted for y subscript 1, and 2 fifths substituted for m: y minus 3 equals 2 fifths times x minus 10 in parentheses. One line down, the instructions in the second cell say: “Simplify.” In the third cell is y minus 3 equals 2 fifths x minus 4.In the fourth row, the first cell reads: “Write the equation in slope-intercept form.” The second cell is blank. In the third cell is y equals 2 fifths x minus 1.

TRY IT 3.1

Find an equation of a line with slope m=\dfrac{5}{6} and containing the point \left(6,3\right).

Show answer

y=\dfrac{5}{6}x-2

TRY IT 3.2

Find an equation of a line with slope m=\dfrac{2}{3} and containing thepoint \left(9,2\right).

Show answer

y=\dfrac{2}{3}x-4

HOW TO: Find an equation of a line given the slope and a point

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

EXAMPLE 4

Find an equation of a line with slope m=-\dfrac{1}{3} that contains the point \left(6,-4\right). 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-{y}_{1}=m\left(x-{x}_{1}\right).

Identify the slope. .
Identify the point. .
Substitute the values into y-{y}_{1}=m\left(x-{x}_{1}\right). .
.
Simplify. .
Write in slope–intercept form. .

TRY IT 4.1

Find an equation of a line with slope m=-\dfrac{2}{5} and containing the point \left(10,-5\right).

Show answer

y=-\dfrac{2}{5}x-1

TRY IT 4.2

Find an equation of a line with slope m=-\dfrac{3}{4}, and containing the point \left(4,-7\right).

Show answer

y=-\dfrac{3}{4}x-4

EXAMPLE 5

Find an equation of a horizontal line that contains the point \left(-1,2\right). 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-{y}_{1}=m\left(x-{x}_{1}\right).

Identify the slope. .
Identify the point. .
Substitute the values into y-{y}_{1}=m\left(x-{x}_{1}\right). .
.
Simplify. .
.
.
Write in slope–intercept form. It is in y-form, but could be written y=0x+2.

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

TRY IT 5.1

Find an equation of a horizontal line containing the point \left(-3,8\right).

Show answer

y=8

TRY IT 5.2

Find an equation of a horizontal line containing the point \left(-1,4\right).

Show answer

y=4

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 Given Two Points

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

Solution

This figure is a table that has three columns and four rows. The first column is a header column, and it contains the names and numbers of each step. The second column contains further written instructions. The third column contains math. In the first row of the table, the first cell on the left reads: “Step 1. Find the slope using the given points.” The text in the second cell reads: “To use the point-slope form, we first find the slope.” The third cell contains the slope of a line formula: m equals y superscript 2 minus y superscript 1 divided by x superscript 2 minus x superscript 1. Below this is m equals 6 minus 4 divided by 3 minus 5. Below this is m equals 2 divided by negative 2. Below this is m equals negative 1.In the second row, the first cell reads: “Step 2. Choose one point.” The second cell reads: “Choose either point.” The third cell contains the ordered pair (5, 4) with a superscript x subscript 1 over 5 and a superscript y subscript 1 over 4.In the third row, the first cell reads: “Step 3. Substitute the values into the point-slope form, y minus y subscript 1 equals m times x minus x subscript 1 in parentheses.” The top line of the second cell is left blank. The third cell contains the point-slope form, y minus y subscript 1 equals m times x minus x subscript 1 in parentheses. Below this is the point-slope form with 5 substituted for x subscript 1, 4 substituted for y subscript 1, and negative 1 substituted for m: y minus 4 equals negative 1 times x minus 5 in parentheses. Below this is y minus 4 equals negative x plus 5.In the fourth row, the first cell reads: “Step 4. Write the equation in slope-intercept form.” The second cell is blank. The third cell contains y equals negative x plus 9.

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

TRY IT 6.1

Find an equation of a line containing the points \left(3,1\right) and \left(5,6\right).

Show answer

y=\dfrac{5}{2}x-\dfrac{13}{2}

TRY IT 6.2

Find an equation of a line containing the points \left(1,4\right) and \left(6,2\right).

Show answer

y=-\dfrac{2}{5}x+\dfrac{22}{5}

HOW TO: Find an equation of a line given two points

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

EXAMPLE 7

Find an equation of a line that contains the points \left(-3,-1\right) and \left(2,-2\right). 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.

Find the slope of the line through (−3, −1) and (2, −2). .
.
.
.
Choose either point. .
Substitute the values into y-{y}_{1}=m\left(x-{x}_{1}\right). .
.
.
Write in slope–intercept form. .

TRY IT 7.1

Find an equation of a line containing the points \left(-2,-4\right) and \left(1,-3\right).

Show answer

y=\dfrac{1}{3}x-\dfrac{10}{3}

TRY IT 7.2

Find an equation of a line containing the points \left(-4,-3\right) and \left(1,-5\right).

Show answer

y=-\dfrac{2}{5}x-\dfrac{23}{5}

EXAMPLE 8

Find an equation of a line that contains the points \left(-2,4\right) and \left(-2,-3\right). 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). m=\dfrac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}
m=\dfrac{-3-4}{-2-\left(-2\right)}
m=\dfrac{-7}{0}
The slope is undefined.

This tells us it is a vertical line. Both of our points have an x-coordinate of -2. So our equation of the line is x=-2. Since there is no y, 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 \left(5,1\right) and \left(5,-4\right).

Show answer

x=5

TRY IT 8.2

Find an equation of a line containing the points \left(-4,4\right) and \left(-4,3\right).

Show answer

x=-4

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.

To Write an Equation of a Line
If given: Use: Form:
Slope and y-intercept slope–intercept y=mx+b
Slope and a point point–slope y-{y}_{1}=m\left(x-{x}_{1}\right)
Two points point–slope y-{y}_{1}=m\left(x-{x}_{1}\right)

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

The graph shows the x y-coordinate plane. The x and y-axes each run from negative 7 to 7. The line whose equation is y equals 2x minus 3 intercepts the y-axis at (0, negative 3) and intercepts the x-axis at (3 halves, 0). Elsewhere on the graph, the point (negative 2, 1) is plotted.

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

The second line will pass through \left(-2,1\right) and have m=2. To graph the line, we start at\left(-2,1\right) and count out the rise and run. With m=2 (or m=\dfrac{2}{1}), we count out the rise 2 and the run 1. We draw the line.

The graph shows the x y-coordinate plane. The x and y-axes each run from negative 7 to 7. The line whose equation is y equals 2x minus 3 intercepts the y-axis at (0, negative 3) and intercepts the x-axis at (3 halves, 0). The points (negative 2, 1) and (negative 1, 3) are plotted. A second line, parallel to the first, intercepts the x-axis at (negative 5 halves, 0), passes through the points (negative 2, 1) and (negative 1, 3), and intercepts the y-axis at (0, 5).

Do the lines appear parallel? Does the second line pass through \left(-2,1\right)?

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

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

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

Solution

This figure is a table that has three columns and four rows. The first column is a header column, and it contains the names and numbers of each step. The second column contains further written instructions. The third column contains math. In the first row of the table, the first cell on the left reads: “Step 1. Find the slope of the given line.” The second cell reads: “The line is in slope-intercept form. y equals 2x minus 3.” The third cell contains the slope of a line, defined as m equals 2.In the second row, the first cell reads: “Step 2. Find the slope of the parallel line.” The second cell reads “Parallel lines have the same slope.” The third cell contains the slope of the parallel line, defined as m parallel equals 2.In the third row, the first cell reads “Step 3. Identify the point.” The second cell reads “The given point is (negative 2, 1).” The third cell contains the ordered pair (negative 2, 1) with a superscript x subscript 1 above negative 2 and a superscript y subscript 1 above 1.In the fourth row, the first cell reads “Step 4. Substitute the values into the point-slope form, y minus y subscript 1 equals m times x minus x subscript 1 in parentheses.” The top of the second cell is blank. The third cell contains the point-slope form, y minus y subscript 1 equals m times x minus x subscript 1 in parentheses. Below this is the form with negative 2 substituted for x subscript 1, 1 substituted for y subscript 1, and 2 substituted for m: y minus 1 equals 2 times x minus negative 2 in parentheses. One line down, the text in the second cell says “Simplify.” The right column contains y minus 1 equals 2 times x plus 2. Below this is y minus 1 equals 2x plus 4.In the fifth row, the first cell says “Step 5. Write the equation in slope-intercept form.” The second cell is blank. The third cell contains y equals 2x plus 5.

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 y=3x+1 that contains the point \left(4,2\right). Write the equation in slope–intercept form.

Show answer

y=3x-10

TRY IT 9.2

Find an equation of a line parallel to the line y=\dfrac{1}{2}x-3 that contains the point \left(6,4\right).

Show answer

y=\dfrac{1}{2}x+1

HOW TO: Find an equation of a line parallel to a given line

  1. Find the slope of the given line.
  2. Find the slope of the parallel line.
  3. Identify the point.
  4. Substitute the values into the point–slope form, y-{y}_{1}=m\left(x-{x}_{1}\right).
  5. 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 y=2x-3. Now, we want to graph a line perpendicular to this line and passing through \left(-2,1\right).

The graph shows the x y-coordinate plane. The x and y-axes each run from negative 7 to 7. The line whose equation is y equals 2x minus 3 intercepts the y-axis at (0, negative 3) and intercepts the x-axis at (3 halves, 0). Elsewhere on the graph, the point (negative 2, 1) is plotted.

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

\begin{array}{ccc}\hfill y=2x-3\hfill & & \text{perpendicular line}\hfill \\ \hfill m=2\hfill & & {m}_{\perp}=-\dfrac{1}{2}\hfill \end{array}

We now know the perpendicular line will pass through \left(-2,1\right) with {m}_{\perp}=-\dfrac{1}{2}.

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

The graph shows the x y-coordinate plane. The x and y-axes each run from negative 7 to 7. The line whose equation is y equals 2x minus 3 intercepts the y-axis at (0, negative 3) and intercepts the x-axis at (3 halves, 0). Elsewhere, the point (negative 2, 1) is plotted. Another line perpendicular to the first line passes through the point (negative 2, 1) and intercepts the x and y-axes at (0, 0). A red line with an arrow extends left from (0, 0) to (negative 2, 0), then extends up and terminates at (negative 2, 1), forming a right triangle with the second line as a hypotenuse.

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

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

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

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

Solution

This figure is a table that has three columns and four rows. The first column is a header column, and it contains the names and numbers of each step. The second column contains further written instructions. The third column contains math. In the first row of the table, the first cell on the left reads: “Step 1. Find the slope of the given line.” The second cell reads: “The line is in slope-intercept form. y equals 2x minus 3.” The third cell contains the slope of a line, defined as m equals 2.In the second row, the first cell reads: “Step 2. Find the slope of the perpendicular line.” The second cell reads “The slopes of perpendicular lines are negative reciprocals.” The third cell contains the slope of the perpendicular line, defined as m perpendicular equals negative 1 half.In the third row, the first cell reads “Step 3. Identify the point.” The second cell reads “The given point is (negative 2, 1).” The third cell contains the ordered pair (negative 2, 1) with a superscript x subscript 1 above negative 2 and a superscript y subscript 1 above 1.In the fourth row, the first cell reads “Step 4. Substitute the values into the point-slope form, y minus y subscript 1 equals m times x minus x subscript 1 in parentheses.” The top of the second cell is blank. The third cell contains the point-slope form, y minus y subscript 1 equals m times x minus x subscript 1 in parentheses. Below this is the form with negative 2 substituted for x subscript 1, 1 substituted for y subscript 1, and negative 1 half substituted for m: y minus 1 equals negative 1 half times x minus negative 2 in parentheses. One line down, the text in the second cell says “Simplify.” The right column contains y minus 1 equals negative 1 half times x plus 2. Below this is y minus 1 equals negative 1 half x plus minus 1.In the fifth row, the first cell says “Step 5. Write the equation in slope-intercept form.” The second cell is blank. The third cell contains y equals negative 1 half x.

TRY IT 10.1

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

Show answer

y=-\dfrac{1}{3}x+\dfrac{10}{3}

TRY IT 10.2

Find an equation of a line perpendicular to the line y=\dfrac{1}{2}x-3 that contains the point \left(6,4\right).

Show answer

y=-2x+16

HOW TO: Find an equation of a line perpendicular to a given line

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

EXAMPLE 11

Find an equation of a line perpendicular to x=5 that contains the point \left(3,-2\right). 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=5. This line is vertical, so its perpendicular will be horizontal. This tells us the {m}_{\perp}=0.

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

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 x=4 that contains the point \left(4,-5\right). Write the equation in slope–intercept form.

Show answer

y=-5

TRY IT 11.2

Find an equation of a line that is perpendicular to the line x=2 that contains the point \left(2,-1\right). Write the equation in slope–intercept form.

Show answer

y=-1

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 x=5 that contains the point \left(3,-2\right). The graph shows us the linex=5 and the point \left(3,-2\right).

The graph shows the x y-coordinate plane. The x and y-axes each run from negative 7 to 7. The line whose equation is x equals 5 intercepts the x-axis at (5, 0) and runs parallel to the y-axis. Elsewhere on the graph, the point (3, negative 2) is plotted.

We know every line perpendicular to a vertical line is horizontal, so we will sketch the horizontal line through \left(3,-2\right).

The graph shows the x y-coordinate plane. The x and y-axes each run from negative 7 to 7. The line whose equation is x equals 5 intercepts the x-axis at (5, 0) and runs parallel to the y-axis. Elsewhere on the graph, the points (negative 2, negative 2), (0, negative 2), (3, negative 2), and (6, negative 2) are plotted. A line perpendicular to the previous line passes through those points and runs parallel to the x-axis.

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. So, the equation of the line perpendicular to the vertical line x=5 is y=-2.

EXAMPLE 12

Find an equation of a line that is perpendicular to y=-4 that contains the point \left(-4,2\right).

Write the equation in slope–intercept form.

Solution

The line y=-4 is a horizontal line. Any line perpendicular to it must be vertical, in the form x=a. Since the perpendicular line is vertical and passes through \left(-4,2\right), every point on it has an x-coordinate of -4. The equation of the perpendicular line is x=-4. 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 y=1 that contains the point \left(-5,1\right). Write the equation in slope–intercept form.

Show answer

x=-5

TRY IT 12.1

Find an equation of a line that is perpendicular to the line y=-5 that contains the point \left(-4,-5\right).

Show answer

x=-4

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
    1. Identify the slope.
    2. Identify the point.
    3. Substitute the values into the point-slope form, y-{y}_{1}=m\left(x-{x}_{1}\right).
    4. Write the equation in slope-intercept form.
  • To Find an Equation of a Line Given Two Points
    1. Find the slope using the given points.
    2. Choose one point.
    3. Substitute the values into the point-slope form, y-{y}_{1}=m\left(x-{x}_{1}\right).
    4. Write the equation in slope-intercept form.
  • To Write and Equation of a Line
    • If given slope and y-intercept, use slope–intercept form y=mx+b.
    • If given slope and a point, use point–slope form y-{y}_{1}=m\left(x-{x}_{1}\right).
    • If given two points, use point–slope form y-{y}_{1}=m\left(x-{x}_{1}\right).
  • To Find an Equation of a Line Parallel to a Given Line
    1. Find the slope of the given line.
    2. Find the slope of the parallel line.
    3. Identify the point.
    4. Substitute the values into the point-slope form, y-{y}_{1}=m\left(x-{x}_{1}\right).
    5. Write the equation in slope-intercept form.
  • To Find an Equation of a Line Perpendicular to a Given Line
    1. Find the slope of the given line.
    2. Find the slope of the perpendicular line.
    3. Identify the point.
    4. Substitute the values into the point-slope form, y-{y}_{1}=m\left(x-{x}_{1}\right).
    5. Write the equation in slope-intercept form.

Glossary

point–slope form
The point–slope form of an equation of a line with slope m and containing the point \left({x}_{1},{y}_{1}\right) is y-{y}_{1}=m\left(x-{x}_{1}\right).

Practice exercises

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.

1. slope 4 and y-intercept \left(0,1\right) 2. slope 3 and y-intercept \left(0,5\right)
3. slope 8 and y-intercept \left(0,-6\right) 4. slope 6 and y-intercept \left(0,-4\right)
5. slope -1 and y-intercept \left(0,7\right) 6. slope -1 and y-intercept \left(0,3\right)
7. slope -3 and y-intercept \left(0,-1\right) 8. slope -2 and y-intercept \left(0,-3\right)
9. slope \frac{1}{5} and y-intercept \left(0,-5\right) 10. slope \frac{3}{5} and y-intercept \left(0,-1\right)
11. slope -\frac{2}{3} and y-intercept \left(0,-3\right) 12. slope -\frac{3}{4} and y-intercept \left(0,-2\right)
13. slope 0 and y-intercept \left(0,2\right) 14. slope 0 and y-intercept \left(0,-1\right)
15. slope -4 and y-intercept \left(0,0\right) 16. slope -3 and y-intercept \left(0,0\right)

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

17. The graph shows the x y-coordinate plane. The x and y-axes each run from negative 9 to 9. The point (2, 0) is plotted. A line intercepts the y-axis at (0, 4) and intercepts the x-axis at (2, 0). 18. The graph shows the x y-coordinate plane. The x and y-axes each run from negative 9 to 9. The point (1, negative 2) is plotted. A line intercepts the y-axis at (0, negative 5), passes through the point (1, negative 2), and intercepts the x-axis at (5 thirds, 0).
19. The graph shows the x y-coordinate plane. The x and y-axes each run from negative 9 to 9. The point (4, 5) is plotted. A line intercepts the x-axis at (negative 8 thirds, 0), intercepts the y-axis at (0, 2), and passes through the point (4, 5). 20. The graph shows the x y-coordinate plane. The x and y-axes each run from negative 9 to 9. The point (6, 0) is plotted. A line intercepts the y-axis at (0, negative 3) and intercepts the x-axis at (6, 0).
21. The graph shows the x y-coordinate plane. The x and y-axes each run from negative 9 to 9. The point (2, negative 4) is plotted. A line intercepts the x-axis at (negative 2 thirds, 0), intercepts the y-axis at (0, negative 1), and passes through the point (2, negative 4). 22. The graph shows the x y-coordinate plane. The x and y-axes each run from negative 9 to 9. The point (3, negative 1) is plotted. A line intercepts the y-axis at (0, 2), intercepts the x-axis at (9 fourths, 0), and passes through the point (3, negative 1).
23. The graph shows the x y-coordinate plane. The x and y-axes each run from negative 9 to 9. The point (negative 3, 6) is plotted. A line running parallel to the x-axis passes through (negative 3, 6) and intercepts the y-axis at (0, 6). 24. The graph shows the x y-coordinate plane. The x and y-axes each run from negative 9 to 9. The point (2, negative 2) is plotted. A line running parallel to the x-axis intercepts the y-axis at (0, negative 2) and passes through the point (2, negative 2).

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. m=\frac{3}{8}, point \left(8,2\right) 26. m=\frac{5}{8}, point \left(8,3\right)
27. m=\frac{5}{6}, point \left(6,7\right) 28. m=\frac{1}{6}, point \left(6,1\right)
29. m=-\frac{3}{5}, point \left(10,-5\right) 30. m=-\frac{3}{4}, point \left(8,-5\right)
31. m=-\frac{1}{3}, point \left(-9,-8\right) 32. m=-\frac{1}{4}, point \left(-12,-6\right)
33. Horizontal line containing \left(-1,4\right) 34. Horizontal line containing \left(-2,5\right)
35. Horizontal line containing \left(-1,-7\right) 36. Horizontal line containing \left(-2,-3\right)
37. m=-\frac{5}{2}, point \left(-8,-2\right) 38. m=-\frac{3}{2}, point \left(-4,-3\right)
39. m=-4, point \left(-2,-3\right) 40. m=-7, point \left(-1,-3\right)
41. Horizontal line containing \left(4,-8\right) 42. Horizontal line containing \left(2,-3\right)

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. \left(3,1\right) and \left(2,5\right) 44. \left(2,6\right) and \left(5,3\right)
45. \left(2,7\right) and \left(3,8\right) 46. \left(4,3\right) and \left(8,1\right)
47. \left(-5,-3\right) and \left(4,-6\right) 48. \left(-3,-4\right) and \left(5-2\right)
49. \left(-2,8\right) and \left(-4,-6\right) 50. \left(-1,3\right) and \left(-6,-7\right)
51. \left(3,-2\right) and \left(-4,4\right) 52. \left(6,-4\right) and \left(-2,5\right)
53. \left(0,-2\right) and \left(-5,-3\right) 54. \left(0,4\right) and \left(2,-3\right)
55. \left(4,2\right) and \left(4,-3\right) 56. \left(7,2\right) and \left(7,-2\right)
57. \left(-2,1\right) and \left(-2,-4\right) 58. \left(-7,-1\right) and \left(-7,-4\right)
59. \left(6,2\right) and \left(-3,2\right) 60. \left(6,1\right) and \left(0,1\right)
61. \left(-6,-3\right) and \left(-1,-3\right) 62. \left(3,-4\right) and \left(5,-4\right)
63. \left(0,0\right) and \left(1,4\right) 64. \left(4,3\right) and \left(8,0\right)
65. \left(-3,0\right) and \left(-7,-2\right) 66. \left(-2,-3\right) and \left(-5,-6\right)
67. \left(3,5\right) and \left(-7,5\right) 68. \left(8,-1\right) and \left(8,-5\right)

 

Exercises

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 y=3x+4, point \left(2,5\right) 70. line y=4x+2, point \left(1,2\right)
71. line y=-3x-1, point \left(2,-3\right) 72. line y=-2x-3, point \left(-1,3\right)
73. line 2x-y=6, point \left(3,0\right) 74. line 3x-y=4, point \left(3,1\right)
75. line 2x+3y=6, point \left(0,5\right) 76. line 4x+3y=6, point \left(0,-3\right)
77. line x=-4, point \left(-3,-5\right) 78. line x=-3, point \left(-2,-1\right)
79. line x-6=0, point \left(4,-3\right) 80. line x-2=0, point \left(1,-2\right)
81. line y=1, point \left(3,-4\right) 82. line y=5, point \left(2,-2\right)
83. line y+7=0, point \left(1,-1\right) 84. line y+2=0, point \left(3,-3\right)

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 y=-x+5, point \left(3,3\right) 86. line y=-2x+3, point \left(2,2\right)
87. line y=\frac{2}{3}x-4, point \left(2,-4\right) 88. line y=\frac{3}{4}x-2, point \left(-3,4\right)
89. line 4x-3y=5, point \left(-3,2\right) 90. line 2x-3y=8, point \left(4,-1\right)
91. line 4x+5y=-3, point \left(0,0\right) 92. line 2x+5y=6, point \left(0,0\right)
93. line y-6=0, point \left(-5,-3\right) 94. line y-3=0, point \left(-2,-4\right)
95. line y-axis, point \left(2,1\right) 96. line y-axis, point \left(3,4\right)

Exercises

Mixed Practice

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

97. Containing the points \left(2,7\right) and \left(3,8\right) 98. Containing the points \left(4,3\right) and \left(8,1\right)
99. m=\frac{5}{6}, containing point \left(6,7\right) 100. m=\frac{1}{6}, containing point \left(6,1\right)
101. Parallel to the line 2x+3y=6, containing point \left(0,5\right) 102. Parallel to the line 4x+3y=6, containing point \left(0,-3\right)
103. m=-\frac{3}{5}, containing point \left(10,-5\right) 104. m=-\frac{3}{4}, containing point \left(8,-5\right)
105. Perpendicular to the line y-axis, point \left(-6,2\right) 106. Perpendicular to the line y-1=0, point \left(-2,6\right)
107. Containing the points \left(-2,0\right) and \left(-3,-2\right) 108. Containing the points \left(4,3\right) and \left(8,1\right)
109. Parallel to the line x=-4, containing point \left(-3,-5\right) 110. Parallel to the line x=-3, containing point \left(-2,-1\right)
111. Containing the points \left(-5,-3\right) and \left(4,-6\right) 112. Containing the points \left(-3,-4\right) and \left(2,-5\right)
113. Perpendicular to the line 4x+3y=1, containing point \left(0,0\right) 114. Perpendicular to the line x-2y=5, containing point \left(-2,2\right)

Exercises

Everyday Math

115. Fuel consumption. The city mpg, x, and highway mpg, y, of two cars are given by the points \left(29,40\right) and\left(19,28\right). Find a linear equation that models the relationship between city mpg and highway mpg. 116. Cholesterol. The age, x, and LDL cholesterol level, y, of two men are given by the points \left(18,68\right) and \left(27,122\right). 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. y=4x+1 3. y=8x-6
5. y=-x+7 7. y=-3x-1
9. y=\frac{1}{5}x-5 11. y=-\frac{2}{3}x-3
13. y=2 15. y=-4x
17. y=-2x+4 19. y=\frac{3}{4}x+2
21. y=-\dfrac{3}{2}x-1 23. y=6
25. y=\frac{3}{8}x-1 27. y=\frac{5}{6}x+2
29. y=-\frac{3}{5}x+1 31. y=-\frac{1}{3}x-11
33. y=4 35. y=-7
37. y=-\frac{5}{2}x-22 39. y=-4x-11
41. y=-8 43. y=-4x+13
45. y=x+5 47. y=-\frac{1}{3}x-\frac{14}{3}
49. y=7x+22 51. y=-\frac{6}{7}x+\frac{4}{7}
53. y=\frac{1}{5}x-2 55. x=4
57. x=-2 59. y=2
61. y=-3 63. y=4x
65. y=\frac{1}{2}x+\frac{3}{2} 67. y=5
69. y=3x-1 71. y=-3x+3
73. y=2x-6 75. y=-\frac{2}{3}x+5
77. x=-3 79. x=4
81. y=-4 83. y=-1
85. y=x 87. y=-\frac{3}{2}x-1
89. y=-\frac{3}{4}x-\frac{1}{4} 91. y=\frac{5}{4}x
93. x=-5 95. y=1
97. y=x+5 99. y=\frac{5}{6}x+2
101. y=-\frac{2}{3}x+5 103. y=-\frac{3}{5}x+1
105. y=2 107. y=x+2
109. x=-3 111. y=-\frac{1}{3}x-\frac{14}{3}
113. y=\frac{3}{4}x 115. y=1.2x+5.2
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.

License

Icon for the Creative Commons Attribution 4.0 International License

Module 45: Find the Equation of a Line Copyright © 2022 by Claire Elliott is licensed under a Creative Commons Attribution 4.0 International License, except where otherwise noted.

Share This Book