### 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

Before you get started, take this readiness quiz.

Solve: $\frac{2}{3}=\frac{x}{5}$.

If you missed this problem, review Example 2.14.

Simplify: $-\frac{2}{5}\left(x-15\right)$.

If you missed this problem, review Example 1.133.

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 4.57

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

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

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

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

### Example 4.58

Find the equation of the line shown.

Find the equation of the line shown in the graph.

Find the equation of the line shown in the graph.

### 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=\frac{y-{y}_{1}}{x-{x}_{1}}$ | |

Multiply both sides of the equation by $x-{x}_{1}$. | $\begin{array}{ccc}\hfill \phantom{\rule{4em}{0ex}}m\left(x-{x}_{1}\right)& =\hfill & \left(\frac{y-{y}_{1}}{x-{x}_{1}}\right)\left(x-{x}_{1}\right)\hfill \end{array}$ |

Simplify. | $\begin{array}{ccc}\hfill \phantom{\rule{4em}{0ex}}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}\hfill \phantom{\rule{4em}{0ex}}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

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 4.59 Find an Equation of a Line Given the Slope and a Point

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

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

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

### 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, $y-{y}_{1}=m\left(x-{x}_{1}\right)$.
- Step 4. Write the equation in slope–intercept form.

### Example 4.60

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

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

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

### Example 4.61

Find an equation of a horizontal line that contains the point $\left(\mathrm{-1},2\right)$. Write the equation in slope–intercept form.

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

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

### 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 4.62 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.

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

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

### 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, $y-{y}_{1}=m\left(x-{x}_{1}\right)$.
- Step 4. Write the equation in slope–intercept form.

### Example 4.63

Find an equation of a line that contains the points $\left(\mathrm{-3},\mathrm{-1}\right)$ and $\left(2,\mathrm{-2}\right)$. Write the equation in slope–intercept form.

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

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

### Example 4.64

Find an equation of a line that contains the points $\left(\mathrm{-2},4\right)$ and $\left(\mathrm{-2},\mathrm{-3}\right)$. Write the equation in slope–intercept form.

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

Find an equaion of a line containing the points $\left(\mathrm{-4},4\right)$ and $\left(\mathrm{-4},3\right)$.

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-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(\mathrm{-2},1\right)$.

We know that parallel lines have the same slope. So the second line will have the same slope as$y=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(\mathrm{-2},1\right)$ and have $m=2$. To graph the line, we start at$\left(\mathrm{-2},1\right)$ and count out the rise and run. With $m=2$ (or $m=\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 $\left(\mathrm{-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 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-3$ that contains the point $\left(\mathrm{-2},1\right)$. Write the equation in slope–intercept form.

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.

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

### How To

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

- Step 1. Find the slope of the given line.
- Step 2. Find the slope of the parallel line.
- Step 3. Identify the point.
- Step 4. Substitute the values into the point–slope form, $y-{y}_{1}=m\left(x-{x}_{1}\right)$.
- Step 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(\mathrm{-2},1\right)$.

We know that perpendicular lines have slopes that are negative reciprocals. We’ll use the notation ${m}_{\text{\u22a5}}$ 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.)

We now know the perpendicular line will pass through $\left(\mathrm{-2},1\right)$ with ${m}_{\text{\u22a5}}=-\frac{1}{2}$.

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

Do the lines appear perpendicular? Does the second line pass through $\left(\mathrm{-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 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-3$ that contains the point $\left(\mathrm{-2},1\right)$. Write the equation in slope–intercept form.

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.

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

### How To

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

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

### Example 4.67

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

Find an equation of a line that is perpendicular to the line $x=4$ that contains the point $\left(4,\mathrm{-5}\right)$. Write the equation in slope–intercept form.

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

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

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

Do the lines appear perpendicular?

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

### Example 4.68

Find an equation of a line that is perpendicular to $y=\mathrm{-4}$ that contains the point $\left(\mathrm{-4},2\right)$. Write the equation in slope–intercept form.

Find an equation of a line that is perpendicular to the line $y=1$ that contains the point $\left(\mathrm{-5},1\right)$. Write the equation in slope–intercept form.

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

### Media Access Additional Online Resources

Access this online resource for additional instruction and practice with finding the equation of a line.

### Section 4.6 Exercises

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

slope 3 and *y*-intercept $\left(0,5\right)$

slope 6 and *y*-intercept $\left(0,\mathrm{-4}\right)$

slope $\mathrm{-1}$ and *y*-intercept $\left(0,3\right)$

slope $\mathrm{-2}$ and *y*-intercept $\left(0,\mathrm{-3}\right)$

slope $\frac{3}{5}$ and *y*-intercept $\left(0,\mathrm{-1}\right)$

slope $-\frac{3}{4}$ and *y*-intercept $\left(0,\mathrm{-2}\right)$

slope 0 and *y*-intercept $\left(0,\mathrm{-1}\right)$

slope $\mathrm{-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.

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

$m=\frac{5}{8}$, point $\left(8,3\right)$

$m=\frac{1}{6}$, point $\left(6,1\right)$

$m=-\frac{3}{4}$, point $\left(8,\mathrm{-5}\right)$

$m=-\frac{1}{4}$, point $\left(\mathrm{-12},\mathrm{-6}\right)$

Horizontal line containing $\left(\mathrm{-2},5\right)$

Horizontal line containing $\left(\mathrm{-2},\mathrm{-3}\right)$

$m=-\frac{3}{2}$, point $\left(\mathrm{-4},\mathrm{-3}\right)$

$m=\mathrm{-7}$, point $\left(\mathrm{-1},\mathrm{-3}\right)$

Horizontal line containing $\left(2,\mathrm{-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.

$\left(2,6\right)$ and $\left(5,3\right)$

$\left(4,3\right)$ and $\left(8,1\right)$

$\left(\mathrm{-3},\mathrm{-4}\right)$ and $\left(5-2\right)$

$\left(\mathrm{-1},3\right)$ and $\left(\mathrm{-6},\mathrm{-7}\right)$

$\left(6,\mathrm{-4}\right)$ and $\left(\mathrm{-2},5\right)$

$\left(0,4\right)$ and $\left(2,\mathrm{-3}\right)$

$\left(7,2\right)$ and $\left(7,\mathrm{-2}\right)$

$\left(\mathrm{-7},\mathrm{-1}\right)$ and $\left(\mathrm{-7},\mathrm{-4}\right)$

$\left(6,1\right)$ and $\left(0,1\right)$

$\left(3,\mathrm{-4}\right)$ and $\left(5,\mathrm{-4}\right)$

$\left(4,3\right)$ and $\left(8,0\right)$

$\left(\mathrm{-2},\mathrm{-3}\right)$ and $\left(\mathrm{-5},\mathrm{-6}\right)$

$\left(8,\mathrm{-1}\right)$ and $\left(8,\mathrm{-5}\right)$

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

line $y=4x+2$, point $\left(1,2\right)$

line $y=\mathrm{-2}x-3$, point $\left(\mathrm{-1},3\right)$

line $3x-y=4$, point $\left(3,1\right)$

line $4x+3y=6$, point $\left(0,\mathrm{-3}\right)$

line $x=\mathrm{-3}$, point $\left(\mathrm{-2},\mathrm{-1}\right)$

line $x-2=0$, point $\left(1,\mathrm{-2}\right)$

line $y=5$, point $\left(2,\mathrm{-2}\right)$

line $y+2=0$, point $\left(3,\mathrm{-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.

line $y=\mathrm{-2}x+3$, point $\left(2,2\right)$

line $y=\frac{3}{4}x-2$, point $\left(\mathrm{-3},4\right)$

line $2x-3y=8$, point $\left(4,\mathrm{-1}\right)$

line $2x+5y=6$, point $\left(0,0\right)$

line $y-3=0$, point $\left(\mathrm{-2},\mathrm{-4}\right)$

line *y*-axis, point $\left(3,4\right)$

#### Mixed Practice

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

Containing the points $\left(4,3\right)$ and $\left(8,1\right)$

$m=\frac{1}{6}$, containing point $\left(6,1\right)$

Parallel to the line $4x+3y=6$, containing point $\left(0,\mathrm{-3}\right)$

$m=-\frac{3}{4}$, containing point $\left(8,\mathrm{-5}\right)$

Perpendicular to the line $y-1=0$, point $\left(\mathrm{-2},6\right)$

Containing the points $\left(4,3\right)$ and $\left(8,1\right)$

Parallel to the line $x=\mathrm{-3}$, containing point $\left(\mathrm{-2},\mathrm{-1}\right)$

Containing the points $\left(\mathrm{-3},\mathrm{-4}\right)$ and $\left(2,\mathrm{-5}\right)$

Perpendicular to the line $x-2y=5$, containing point $\left(\mathrm{-2},2\right)$

#### Everyday Math

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

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

#### Writing Exercises

Why are all horizontal lines parallel?

#### Self Check

ⓐ 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?