Introduction
In this lesson, you will learn how to find the equation of a line using two given points.
This video illustrates the lesson material below. Watching the video is optional.
How to Find the Equation of a Line From Two Points
Here are two points: \((-5, 13)\) and \((3, -3)\). Both of these points are on the same line (see the rough sketch in Figure 1). To find the equation of this line, follow three steps:
Figure 1
Step 1
Find the slope using the slope formula: \(m=\frac{y_{2-}y_{1}}{x_{2-}x_{1}}\)
\begin{align*} m&=\frac{y_{2} - y_{1}}{x_{2} - x_{1}} &\color{red}\small\text{Slope formula}\\\\
m&=\frac{13 - (-3)}{-5 - 3} &\color{red}\small\text{Substitute values of x & y}\\\\ m&=\frac{16}{-8}&\color{red}\small\text{Simplify numerator and denominator}\\\\ m&=-2 &\color{red}\small\text{Simplify the fraction}\\\ \end{align*}
The slope is -2 for this equation.
Figure 2
Step 2
Use the slope and one of the points to solve for the y-intercept using the slope-intercept form: \(y=mx + b\). It does not matter which point you use to find the equation. Here, \((3, -3)\) is used with \(m = -2\).
\begin{align*} y&=mx+b&\color{red}\small\text{Slope-intercept form}\\\\
-3&=-2(3)+b&\color{red}\small\text{Substitute values of m, x, & y}\\\\ -3&= -6 +b &\color{red}\small\text{Right side: multiply -2 & 3}\\\\ -3 \color{red}\text{+6} &= -6 + b \color{red}\text{+6} &\color{red}\small\text{Add 6 to both sides} \\\\ -3 \color{red}\text{+6} &= b &\color{red}\small\text{Right side: the 6's will cancel} \\\\ 3&= b &\color{red}\small\text{Left side: subtract 3 from 6} \end{align*}
The y-intercept, or b, is equal to 3.
Step 3
Once you know the value for m and the value for b, you can substitute these into the slope-intercept form to get the equation for the line. The equation of the line that both of these points go through is \(y=-2x+3\).
Things to Remember
- Graph out the points to see the distance between them, like in Figure 1.
- Remember that the slope equation is \(m=\frac{y_{2-}y_{1}}{x_{2-}x_{1}}\).
- Plug in the slope and a point in the equation to \(y=mx+b\) to figure out the y-intercept which is the value of b.
Practice Problems
For each of the following problems, find the equation of the line that passes through the following two points:- \(\left ( -5,10 \right )\) and \(\left ( -3,4 \right )\) (Solution
- \(\left ( -5,-26 \right )\) and \(\left ( -2,-8 \right )\) (Solution
- \(\left ( -4,-22 \right )\) and \(\left ( -6,-34 \right )\) (Solution
- \(\left ( 3,1 \right )\) and \(\left ( -6,-2 \right )\) (Solution
- \(\left ( 4,-6 \right )\) and \(\left ( 6,3 \right )\) (Solution
- \(\left ( 5,5 \right )\) and \(\left ( 3,2 \right )\) (Solution
Need More Help?
- Study other Math Lessons in the Resource Center.
- Visit the Online Tutoring Resources in the Resource Center.
- Contact your Instructor.
- If you still need help, Schedule a Tutor.