The equation of a line can be found through various methods depending on the information available. The two points form is one of those methods. This form is used to find the equation of a line that passes through two given points.
Here, we will look at how to find the equation of a line when we have two points. Then, we will explore various examples with answers to fully understand the process used.
ALGEBRA

Relevant for…
Learning to find the equation of the line that passes through two points.
ALGEBRA

Relevant for…
Learning to find the equation of the line that passes through two points.
How to find the equation of the line that passes through two points?
To find the equation of the line that passes through two points, we remember that every time we want to obtain the equation of a line, we need two things: the slope and a point.
Therefore, if we only have two points and no slope, we simply use the two points to find the slope using this equation:
$latex m=\frac{y_{2}-y_{1}}{x_{2}-x_{1}}$
After obtaining the slope, we use the point-slope form $latex y = mx + b$, where m is the slope and b is the y-intercept. The y-intercept can be found using one of the given points.
Alternatively, we can use the form two points of a line. Given two points $latex (x_{1}, ~y_{1})$ and $latex (x_{2},~ y_{2})$, we have the following:
$latex y-y_{1}=\frac{y_{2}-y_{1}}{x_{2}-x_{1}}(x-x_{1})$ o $latex y-y_{2}=\frac{y_{2}-y_{1}}{x_{2}-x_{1}}(x-x_{2})$ |
Linear equation through two points – Examples with answers
The following examples are solved using both methods to find the equation of the line using two points indicated above. The solution shows the detailed process to follow to obtain the equation of the line.
EXAMPLE 1
Find the equation of a line that passes through the points (3, 3) and (-1, 1).
Solution
The following graph shows the line that passes through the two points:

The two points are (-1, 1) and (3, 3). Thus, we can start by finding the slope of the line:
$latex m=\frac{y_{2}-y_{1}}{x_{2}-x_{1}}$
$latex m=\frac{3-1}{3-(-1)}$
$latex m=\frac{2}{4}=\frac{1}{2}$
Now, we use the point (-1, 1) to find the y-intercept:
$latex y=mx+b$
$latex 1= \frac{1}{2}(-1)+b$
$latex b= \frac{3}{2}$
Therefore, the equation of the line is:
$latex y=\frac{1}{2}x+\frac{3}{2}$
EXAMPLE 2
Find the equation of the line that passes through the points (-2, -1) and (1, 2).
Solution
The following is the graph of the line that passes through the given points:

Since we know two points on the line, we can use the formula two points on the line:
$latex y-y_{1}=\frac{y_{2}-y_{1}}{x_{2}-x_{1}}(x-x_{1})$
$latex y-(-1)=\frac{2-(-1)}{1-(-2)}(x-(-2))$
$latex y+1=\frac{3}{3}(x+2)$
$latex y+1=1(x+2)$
$latex y+1=x+2$
$latex y=x+1$
EXAMPLE 3
Find the equation of the line that passes through the points (-2, 2) and (2, 0).
Solution
The line that passes through both points is graphed in the following plane:

We have that the line passes through the points (-2, 2) and (2, 0). Thus, we start by finding the slope of the line:
$latex m=\frac{y_{2}-y_{1}}{x_{2}-x_{1}}$
$latex m=\frac{0-2}{2-(-2)}$
$latex m=\frac{-2}{4}=-\frac{1}{2}$
Now, we use the point (2, 0) to find the y-intercept:
$latex y=mx+b$
$latex 0= -\frac{1}{2}(2)+b$
$latex b= 1$
Therefore, the equation of the line is:
$latex y=-\frac{1}{2}x+1$
EXAMPLE 4
Find the equation of the line that passes through the points (-1, 2) and (1, -2).
Solution
The following graph shows the line that passes through the given points:

The line passes through the points (-1, 2) and (1, -2), so we can use the formula of the line:
$latex y-y_{1}=\frac{y_{2}-y_{1}}{x_{2}-x_{1}}(x-x_{1})$
$latex y-2=\frac{-2-2}{1-(-1)}(x-(-1))$
$latex y-2=\frac{-4}{2}(x+1)$
$latex y-2=-2(x+1)$
$latex y-2=-2x-2$
$latex y=-2x$
EXAMPLE 5
Find the equation of the line that passes through the points (-3, -2) and (3, 0).
Solution
We can see the line that passes through the points given in the graph:

The two points are (-3, -2) and (3, 0). Thus, we have to find the slope of the line:
$latex m=\frac{y_{2}-y_{1}}{x_{2}-x_{1}}$
$latex m=\frac{0-(-2)}{3-(-3)}$
$latex m=\frac{2}{6}=\frac{1}{3}$
Now, we use the point (3, 0) to find the y-intercept:
$latex y=mx+b$
$latex 0= \frac{1}{3}(3)+b$
$latex b= -1$
Therefore, the equation of the line is:
$latex y=\frac{1}{3}x-1$
EXAMPLE 6
Find the equation of the line that passes through the points (-3, 1) and (3, -3).
Solution
The following is the graph of the line that passes through the given points:

We have the points (-3, -1) and (3, -3), so we can use the formula of the line:
$latex y-y_{1}=\frac{y_{2}-y_{1}}{x_{2}-x_{1}}(x-x_{1})$
$latex y-(-1)=\frac{-3-(-1)}{3-(-3)}(x-(-3))$
$latex y+1=\frac{-2}{6}(x+3)$
$latex y+1=\frac{-1}{3}x-1$
$latex y=-\frac{1}{3}x-2$
Linear equation through two points – Practice problems
Practice and test your knowledge of the equation of the line that passes through two points with the following problems. Select an answer and check it to see if you chose the correct answer. Check out the solved examples above if you have a problem.
See also
Interested in learning more about linear equations? Take a look at these pages: