Finding Slope Given Two Points on a Line

Learning Outcomes

  • Find the slope of a line given two points on the line


Sometimes we need to find the slope of a line between two points and we might not have a graph to count out the rise and the run. We could plot the points on grid paper, then count out the rise and the run, but there is a way to find the slope without graphing.

Before we get to it, we need to introduce some new algebraic notation. We have seen that an ordered pair

(x,y)\left(x,y\right)
gives the coordinates of a point. But when we work with slopes, we use two points. How can the same symbol
(x,y)\left(x,y\right)
be used to represent two different points?

Mathematicians use subscripts to distinguish between the points. A subscript is a small number written to the right of, and a little lower than, a variable.

  • (x1,y1) read x sub 1,y sub 1\left({x}_{1},{y}_{1}\right)\text{ read }x\text{ sub }1,y\text{ sub }1
  • (x2,y2) read x sub 2,y sub 2\left({x}_{2},{y}_{2}\right)\text{ read }x\text{ sub }2,y\text{ sub }2


We will use
(x1,y1)\left({x}_{1},{y}_{1}\right)
to identify the first point and
(x2,y2)\left({x}_{2},{y}_{2}\right)
to identify the second point. If we had more than two points, we could use
(x3,y3),(x4,y4)\left({x}_{3},{y}_{3}\right),\left({x}_{4},{y}_{4}\right)
, and so on.

To see how the rise and run relate to the coordinates of the two points, let’s take another look at the slope of the line between the points
(2,3)\left(2,3\right)
and
(7,6)\left(7,6\right)
below.

The graph shows the x y-coordinate plane. The x-axis runs from 0 to 7. The y-axis runs from 0 to 7. A line runs through the labeled points 2, 3 and 7, 6. A line segment runs from the point 2, 3 to the unlabeled point 2, 6. It is labeled y sub 2 minus y sub 1, 6 minus 3, 3. A line segment runs from the point 7, 6 to the unlabeled point 2, 6. It os labeled x sub 2 minus x sub 1, 7 minus 2, 5. Since we have two points, we will use subscript notation.

(2,3)x1,y1(7,6)x2,y2\stackrel{{x}_{1},{y}_{1}}{\left(2,3\right)}\stackrel{{x}_{2},{y}_{2}}{\left(7,6\right)}


On the graph, we counted the rise of
33
. The rise can also be found by subtracting the
y-coordinatesy\text{-coordinates}
of the points.

y2y1633\begin{array}{c}{y}_{2}-{y}_{1}\\ 6 - 3\\ 3\end{array}


We counted a run of
55
. The run can also be found by subtracting the
x-coordinatesx\text{-coordinates}
.

x2x1725\begin{array}{c}{x}_{2}-{x}_{1}\\ 7 - 2\\ 5\end{array}


We know
m=riserunm=\frac{\text{rise}}{\text{run}}
So
m=35m=\frac{3}{5}
We rewrite the rise and run by putting in the coordinates.
m=6372m=\frac{6 - 3}{7 - 2}
But
66
is the
yy
-coordinate of the second point,
y2{y}_{2}


and
33
is the
yy
-coordinate of the first point
y1{y}_{1}
.

So we can rewrite the rise using subscript notation.
m=y2y172m=\frac{{y}_{2}-{y}_{1}}{7 - 2}
Also
77
is the
xx
-coordinate of the second point,
x2{x}_{2}


and
22
is the
xx
-coordinate of the first point
x2{x}_{2}
.

So we rewrite the run using subscript notation.
m=y2y1x2x1m=\frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}
We’ve shown that
m=y2y1x2x1m=\frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}
is really another version of
m=riserunm=\frac{\text{rise}}{\text{run}}
. We can use this formula to find the slope of a line when we have two points on the line.

Slope Formula

The slope of the line between two points
(x1,y1)\left({x}_{1},{y}_{1}\right)
and
(x2,y2)\left({x}_{2},{y}_{2}\right)
is

m=y2y1x2x1m=\frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}


Say the formula to yourself to help you remember it:

Slope is y of the second point minus y of the first point\text{Slope is }y\text{ of the second point minus }y\text{ of the first point}


over\text{over}


x of the second point minus x of the first point.x\text{ of the second point minus }x\text{ of the first point.}


 

Doing the Manipulative Mathematics activity "Slope of Lines Between Two Points" will help you develop a better understanding of how to find the slope of a line between two points.

example

Find the slope of the line between the points
(1,2)\left(1,2\right)
and
(4,5)\left(4,5\right)
.

Solution

We’ll call
(1,2)\left(1,2\right)
point #1 and
(4,5)\left(4,5\right)
point #2.
(1,2)x1,y1and(4,5)x2,y2\stackrel{{x}_{1},{y}_{1}}{\left(1,2\right)}\text{and}\stackrel{{x}_{2},{y}_{2}}{\left(4,5\right)}
Use the slope formula.
m=y2y1x2x1m=\frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}
Substitute the values in the slope formula:
yy
of the second point minus
yy
of the first point
m=52x2x1m=\frac{5 - 2}{{x}_{2}-{x}_{1}}
xx
of the second point minus
xx
of the first point
m=5241m=\frac{5 - 2}{4 - 1}
Simplify the numerator and the denominator.
m=33m=\frac{3}{3}
m=1m=1
Let’s confirm this by counting out the slope on the graph.

The graph shows the x y-coordinate plane. The x-axis runs from -1 to 7. The y-axis runs from -1 to 7. Two labeled points are drawn at The rise is
33
and the run is
33
, so

m=riserunm=33m=1\begin{array}{}\\ m=\frac{\text{rise}}{\text{run}}\qquad \\ m=\frac{3}{3}\qquad \\ m=1\qquad \end{array}


 

try it



 

How do we know which point to call #1 and which to call #2? Let’s find the slope again, this time switching the names of the points to see what happens. Since we will now be counting the run from right to left, it will be negative.

We’ll call
(4,5)\left(4,5\right)
point #1 and
(1,2)\left(1,2\right)
point #2.
(4,5)x1,y1and(1,2)x2,y2\stackrel{{x}_{1},{y}_{1}}{\left(4,5\right)}\text{and}\stackrel{{x}_{2},{y}_{2}}{\left(1,2\right)}
Use the slope formula.
m=y2y1x2x1m=\frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}
Substitute the values in the slope formula:
yy
of the second point minus
yy
of the first point
m=25x2x1m=\frac{2 - 5}{{x}_{2}-{x}_{1}}
xx
of the second point minus
xx
of the first point
m=2514m=\frac{2 - 5}{1 - 4}
Simplify the numerator and the denominator.
m=33m=\frac{-3}{-3}
m=1m=1
The slope is the same no matter which order we use the points.

example

Find the slope of the line through the points
(2,3)\left(-2,-3\right)
and
(7,4)\left(-7,4\right)
.





 

try it



 

Licenses and Attributions

More Study Resources for You

Show More