<img src="https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=iA1Pi1a8Dy00ym" style="display:none" height="1" width="1" alt="" />
Dismiss
Skip Navigation

5.2: Write an Equation Given Two Points

Difficulty Level: Basic Created by: CK-12
Atoms Practice
Estimated11 minsto complete
%
Progress
Practice Write an Equation Given Two Points
 
 
 
MEMORY METER
This indicates how strong in your memory this concept is
Practice
Progress
Estimated11 minsto complete
%
Estimated11 minsto complete
%
Practice Now
MEMORY METER
This indicates how strong in your memory this concept is
Turn In

Suppose two travelers were lost in a forest. From the same spot, one person traveled 5 miles east and 10 miles south, while the other person traveled 2 miles west and 8 miles north. If a coordinate plane were transposed on top of the forest, with the line going from west to east as the \begin{align*}x\end{align*}x-axis and the line going from north to south as the \begin{align*}y\end{align*}y-axis, could you write the equation of the line that passes through the points representing the travelers' new locations? 

Writing an Equation Given Two Points

In many cases, especially real-world situations, you are given neither the slope nor the \begin{align*}y-\end{align*}yintercept. You might have only two points to use to determine the equation of the line.

To find an equation for a line between two points, you need two things:

  1. The \begin{align*}y-\end{align*}yintercept of the graph
  2. The slope of the line

Previously, you learned how to determine the slope between two points. Let’s repeat the formula here:

The slope between any two points \begin{align*}(x_1, y_1 )\end{align*}(x1,y1) and \begin{align*}(x_2, y_2)\end{align*}(x2,y2) is: \begin{align*}slope=\frac{y_2-y_1}{x_2-x_1}\end{align*}slope=y2y1x2x1.

The procedure for determining a line given two points is the same five-step process as writing an equation given the slope and a point.

Let's write the equation of the following lines:

  1. The line containing the points (3, 2) and (–2, 4).

You need the slope of the line. Find the line's slope by using the formula. Choose one ordered pair to represent \begin{align*}(x_1,y_1)\end{align*}(x1,y1) and the other ordered pair to represent \begin{align*}(x_2,y_2)\end{align*}(x2,y2).

\begin{align*}slope=\frac{y_2-y_1}{x_2-x_1}=\frac{4-2}{-2-3}=-\frac{2}{5}\end{align*}slope=y2y1x2x1=4223=25

Now use the five-step process to find the equation for this line.

Step 1: Begin by writing the formula for slope-intercept form.

\begin{align*}y=mx+b\end{align*}y=mx+b

Step 2: Substitute the given slope for \begin{align*}m\end{align*}m.

\begin{align*}y=\frac{-2}{5} x+b\end{align*}y=25x+b

Step 3: Use one of the ordered pairs you are given, (–2, 4), and substitute these values for the variables \begin{align*}x\end{align*}x and \begin{align*}y\end{align*}y in the equation.

\begin{align*}4=\left (\frac{-2}{5}\right )(-2)+b\end{align*}4=(25)(2)+b

Step 4: Solve for \begin{align*}b\end{align*}b (the \begin{align*}y-\end{align*}yintercept of the graph).

\begin{align*}4& =\frac{4}{5}+b\\ 4-\frac{4}{5}& =\frac{4}{5}-\frac{4}{5}+b\\ \frac{16}{5}& =b\end{align*}4445165=45+b=4545+b=b

Step 5: Rewrite \begin{align*}y=mx+b\end{align*}y=mx+b, substituting the slope for \begin{align*}m\end{align*}m and the \begin{align*}y-\end{align*}yintercept for \begin{align*}b\end{align*}b.

\begin{align*}y=\frac{-2}{5} x+\frac{16}{5}\end{align*}y=25x+165

  1. The line containing the points (–4, 1) and (–2, 3).

Find the slope of the line: \begin{align*}m=\frac{y_2-y_1}{x_2-x_1}=\frac{3-1}{-2-(-4)}=\frac{2}{2}=1\end{align*}m=y2y1x2x1=312(4)=22=1.

Step 1: Start with the slope–intercept form of the line, \begin{align*}y=mx+b\end{align*}y=mx+b.

Step 2: Substitute the value of the slope for \begin{align*}m: y=(1)x+b\end{align*}m:y=(1)x+b.

Step 3: Substitute the coordinates (–2, 3) into the equation for the variables \begin{align*}x\end{align*}x and \begin{align*}y : 3=-2+b\end{align*}y:3=2+b.

Step 4: Solve for \begin{align*}b\end{align*}b:  \begin{align*}3 = -2 + b\\ 5 = b\end{align*}3=2+b5=b 

Step 5: Rewrite the equation, substituting the slope for \begin{align*}m\end{align*}m and the \begin{align*}y-\end{align*}yintercept for \begin{align*}b\end{align*}b: \begin{align*}y=x+5\end{align*}y=x+5.

  1. The line containing the points (3,6) and (-2, 6).

Find the slope of the line: \begin{align*}m=\frac{y_2-y_1}{x_2-x_1}=\frac{6-6}{-2-(3)}=\frac{0}{-5}=0\end{align*}m=y2y1x2x1=662(3)=05=0.

Step 1: Start with the slope–intercept form of the line \begin{align*}y=mx+b\end{align*}y=mx+b.

Step 2: Substitute the value of the slope in for \begin{align*}m: y=(0)x+b \Rightarrow y=b\end{align*}m:y=(0)x+by=b.

Notice that this is an equation where \begin{align*}y\end{align*} equals some number. This means it is a horizontal line. This makes sense since the slope is zero and a horizontal line has a slope of zero.

Step 3 and 4: Substitute the coordinates (3, 6) into the equation for the variables \begin{align*}x\end{align*} and \begin{align*}y : 6=(0)3+b \Rightarrow b=6\end{align*}.

Step 5: Rewrite the equation, substituting the slope for \begin{align*}m\end{align*} and the \begin{align*}y-\end{align*}intercept for \begin{align*}b\end{align*}: \begin{align*}y=6\end{align*}.

We can see when this will happen in the future, without having to do all the work. Because the two \begin{align*}y\end{align*} values were the same, this must be a horizontal line.

   

 

 

Examples

Example 1

Earlier, you were told about two travelers who were lost in a forest. From the same spot, one person traveled 5 miles east and 10 miles south, while the other person traveled 2 miles west and 8 miles north. If a coordinate plane were transposed on top of the forest, with the line going from west to east as the \begin{align*}x\end{align*}-axis and the line going from north to south as the \begin{align*}y\end{align*}-axis, what is the equation of the line that passes through the points representing the travelers' new locations?

If a coordinate plane was placed on top of the forest, west would represent the negative \begin{align*}x\end{align*} direction and east would represent the positive \begin{align*}x\end{align*} direction while south would represent the negative \begin{align*}y\end{align*} direction and north would represent the positive \begin{align*}y\end{align*} direction. 5 miles east and 10 miles south places one traveler at the point (5, -10). 2 miles west and 8 miles north places the other traveler at the point (-2, 8).

First, find the slope between of the line: \begin{align*}m=\frac{y_2-y_1}{x_2-x_1}=\frac{-10-8}{5-(-2)}=-\frac{18}{7}\end{align*}

Step 1: Start with the slope–intercept form of the line, \begin{align*}y=mx+b\end{align*}.

Step 2: Substitute the value of the slope for \begin{align*}m: y=(-\frac{18}{7})x+b\end{align*}.

Step 3: Substitute the coordinates (-2, 8) into the equation for the variables \begin{align*}x\end{align*} and \begin{align*}y : 8=(-\frac{18}{7}\times -2)+b\end{align*}.

Step 4: Solve for \begin{align*}b\end{align*}:  \begin{align*}y : 8=(-\frac{18}{7}\times -2)+b\\ 8 = \frac{36}{7} + b\\ \frac{20}{7} = b \end{align*} 

Step 5: Rewrite the equation, substituting the slope for \begin{align*}m\end{align*} and the \begin{align*}y-\end{align*}intercept for \begin{align*}b\end{align*}: \begin{align*}y=-\frac{18}{7}x+\frac{20}{7}\end{align*}.

Example 2

Write the equation of the line containing the points (2, -3) and (2, 10).

In this case, notice that the two \begin{align*}x\end{align*} values are the same. What does this mean? Remember, that for a vertical line, the \begin{align*}x\end{align*} value stays the same no matter what the \begin{align*}y\end{align*} value is.

Since we are trying to write an equation of a line, and in both cases \begin{align*}x=2\end{align*}, we can conclude that our equation is:

\begin{align*}x=2\end{align*}

Note that if we were to calculate the slope of the line given the two points, we would get the following:

\begin{align*}m=\frac{y_2-y_1}{x_2-x_1}=\frac{-3-(-2)}{2-(2)}=\frac{-1}{0}=\text{undefined}\end{align*}.

Since our slope is undefined, it must be a vertical line. We would come to the same conclusion that this is a vertical line where \begin{align*}x=2\end{align*}.

Review

  1. What is the first step in finding the equation of a line given two points?

In 2–7, find the equation of the line in slope–intercept form.

  1. The line containing the points (2, 6) and (5, 0).
  2. The line containing the points (5, –2) and (8, 4).
  3. The line containing the points (3, 5) and (–3, 0).
  4. The line containing the points (10, 15) and (12, 20).

Mixed Review

  1. Translate into an algebraic sentence: One-third of a number is seven less than that number.
  2. The perimeter of a square is 67 cm. What is the length of its side?
  3. A hockey team played 17 games. They won two more than they lost. They lost 3 more than they tied. How many games did they win, lose, and tie?
  4. Simplify \begin{align*}\frac{(30-4+4 \div 2) \div (21 \div 3)}{2}\end{align*}.
  5. What is the opposite of 16.76?
  6. Graph the following on a number line: \begin{align*}\left \{6,\frac{11}{3},-5.65,\frac{21}{7}\right \}\end{align*}.
  7. Simplify: \begin{align*}[(-4+4.5)+(18-|-13|)+(-3.3)]\end{align*}.

Review (Answers)

To see the Review answers, open this PDF file and look for section 5.2. 

Notes/Highlights Having trouble? Report an issue.

Color Highlighted Text Notes
Please to create your own Highlights / Notes
Show More

Vocabulary

slope-intercept form

y=(slope)x+(y-intercept) or y=(m)x+b, where m = slope and b = y-intercept.

undefined slope

An undefined slope cannot be computed. Vertical lines have undefined slopes.

Image Attributions

Show Hide Details
Description
Difficulty Level:
Basic
Grades:
8 , 9
Date Created:
Feb 24, 2012
Last Modified:
Dec 05, 2016
Files can only be attached to the latest version of Modality
Please wait...
Please wait...
Image Detail
Sizes: Medium | Original
 
MAT.ALG.494.L.1
Here