Back
How to Find the Slope of a Line Between Two Points
> ... Math > Slopes, Intercepts, Equation of a Straight Line > How to Find the Slope of a Line Between Two Points

Introduction

In this lesson, you will learn how to find the slope of a line between two given points.


These videos illustrate the lesson material below. Watching the videos is optional.


How to Find the Slope of a Line

Slope measures the steepness of a line or the rise divided by the run. Another way to think of this is the comparison of the amount a line goes up or down compared to how much it changes left or right between two points. This is shown as a step. This is also known as the rate of change of a line.

Example 1
Figure 1 gives a line segment with two points: \((-2,-1)\) and \((5,3)\). Suppose that this line represents data that a company has collected. They want to know the rate of change that the data describes.

This figure shows a line segment with two points: (-2, -1) and (5, 3).

Figure 1

The slope is the rate of change. To find the slope, create a stair step. First calculate the rise. This is because you need to find the slope, m, which equals the rise over the run. This can also be written as:

\begin{align*} m=\frac{rise}{run}\end{align*}

The points from figure 1 now forms a triangle, as shown in this figure.

Figure 2

Note the triangle in Figure 2. What is the length of the short leg of this triangle? From the information given, you know that the greatest y-value is 3 and the lowest y-value is -1. What is the distance between 3 and -1? In this scenario, the length of this side of the triangle is 4 units, because you are going down from 3 to -1.

\begin{align*} Rise &= y_2-y_1\\Rise &= 3-(-1)&\color{red}\small\text{Subtract lowest y-value from greatest}\\Rise &= 3+ 1\\\mathbf {Rise\space} &\mathbf{= 4} \end{align*}

This figure whos that the run is represented by the dashed line in blue. It also shows that for you to find the run, start at -2 and run to positive 5 to get 7. Another way to do it us by subtracting -2 from -5.

Figure 3

The run is represented by the dashed line in blue. The greatest x-value is 5 and the lowest x-value is -2. To find the run, start at -2 and run to positive 5 to get 7. You could also subtract -2 from -5.

\begin{align*} Run &= x_2-x_1\\Run &= 5-(-2)&\color{red}\small\text{Subtract lowest x-value from greatest}\\Run &= 5+ 2\\\mathbf{Run\space} &\mathbf{= 7} \end{align*}

Now, it is time to find the slope of the line, or \(m\). The slope is the rise over the run. You just determined that the rise is 4 and the run is 7, so:
\begin{align*}m&= \frac{Rise}{Run}\\\\m& = \frac{4}{7}\end{align*}

The Slope Formula

As was shown in Example 1, you can use the slope formula to find the slope when you have two points on that line given to you:

\begin{align*} m=\frac{y_{2}-y_{1}}{x_{2}-x_{1}} \end{align*}

One important thing to always keep in mind is to keep the points organized. Once you designate or label the points, it doesn't matter which point you label as \((x_1,y_1)\) or \((x_2,y_2)\), but remember to keep them in order.

Example 2
Find the slope of a line with these two points: \((-4,2)\) and \((5, -1)\).

This figure shows a graph with two point (-4, 2) and (5, -1).

Figure 4

First, identify which point is \((x_1,y_1)\) and which point is \((x_2,y_2)\). It does not matter which point you use first but keep them in order. Label \((5,-1)\) as \((x_1,y_1)\) and \((-4, 2)\) as \((x_2,y_2)\). Now start substituting these numbers into the slope formula to find the slope of this line.

\begin{align*} & m=\frac{y_{2-}y_{1}}{x_{2-}x_{1}} &\color{red}\small\text{Start with the slope formula} \\\\ & m=\frac{2 - (-1)}{-4-5} &\color{red}\small\text{Substitute x and y-values into formula} \\\\ &m=\frac{2 + 1}{-4-5} &\color{red}\small\text{Subtracting a negative is positive} \\\\ &m=\frac{3}{-9} &\color{red}\small\text{Simplify numerator and denominator} \\\\ &m=\frac{1}{-3} &\color{red}\small\text{Simplify the fraction} \\\\ \end{align*}

Don’t forget the negative sign. It doesn’t matter if you put the negative sign on the numerator, denominator, or just out front. It all means the same thing. As long as there is one negative sign, it makes the fraction negative.

So, the slope of this line is \(m = -\frac{1}{3}\).

In other words, if you start at one point and go down one unit and over three units, you will cross another point on the line.


Things to Remember


  • To find the slope of an equation when a line graph is given, use \(m=\frac{rise}{run}\). 
  • To find the slope of an equation when two points are given, use the slope formula:
    • \(m=\frac{y_{2-}y_{1}}{x_{2-}x_{1}}\). 
      • Remember that the y’s go on top, and the x’s go on the bottom:
  • The slope-intercept equation for a line is \(y=mx+b\).

Practice Problems

  1. Find the slope of the line that contains the points \((10,−9)\) and \((7,6)\). (
    Solution
    x
    Solution: \(-5\)

    Details:
    You are trying to find the slope of the line that connects the points \((10,−9)\) and \((7,6)\).

    Remember: \(\displaystyle{\text{Slope}}={\text{m}}=\frac{\text{rise}}{\text{run}}=\frac{{\text{y}}_{2}-{\text{y}}_{1}}{{\text{x}}_{2}-{\text{x}}_{1}}\)

    Step 1: Decide which ordered pair is point 1, and which is point 2. For this problem \({\color{Red}(10,−9)}\) will be \({\color{Red}{\text{point 1}}}\) and \({\color{Blue}(7,6)}\) will be \({\color{Blue}{\text{point 2}}}\).
    (Note: It doesn’t matter which is which, just as long as you are consistent throughout the problem.)

    Step 2: Substitute the values of the two points into the formula and simplify:

    \(\displaystyle\frac{{\color{Blue}{\text{y}}_{2}}-{\color{Red}{\text{y}}_{1}}}{{\color{Blue}{\text{x}}_{2}}-{\color{Red}{\text{x}}_{1}}} = \frac{{\color{Blue}6}-{\color{Red}(-9)}}{{\color{Blue}7}-{\color{Red}10}} = \frac{15}{-3} = -5\)

    So the slope of the line is \(-5\).
    )
  2. Find the slope of the line that contains the points \((10,−1)\) and \((14,−9)\). (
    Solution
    x
    Solution: \(-2\)
    )
  3. Find the slope of the line that contains the points \((10,0)\) and \((17,−42)\). (
    Solution
    x
    Solution: \(-6\)
    )
  4. Find the slope of the line that contains the points \((3,5)\) and \((13,20)\). (
    Solution
    x
    Solution: \(\dfrac{3}{2}\)

    Details:
    You are trying to find the slope of the line that connects the coordinate points \((3,5)\) and \((13,20)\).

    Remember: \(\displaystyle{\text{Slope}}={\text{m}}=\frac{\text{rise}}{\text{run}}=\frac{{\text{y}}_{2}-{\text{y}}_{1}}{{\text{x}}_{2}-{\text{x}}_{1}}\)

    Step 1: Decide which ordered pair is point 1, and which is point 2. For this problem \({\color{Red}(3, 5)}\) will be \({\color{Red}{\text{point 1}}}\) and \({\color{Blue}(13, 20)}\) will be \({\color{Blue}{\text{point 2}}}\).
    (Note: It doesn’t matter which is which, just as long as you are consistent throughout the problem.)

    Step 2: Substitute the values of the two points into the formula and simplify:

    \(\displaystyle\frac{\text{rise}}{\text{run}}=\frac{{\color{Blue}{\text{y}}_{2}}-{\color{Red}{\text{y}}_{1}}}{{\color{Blue}{\text{x}}_{2}}-{\color{Red}{\text{x}}_{1}}} = \frac{{\color{Blue}20}-{\color{Red}5}}{{\color{Blue}13}-{\color{Red}3}} = \frac{15}{10}\)

    You can divide the numerator and denominator by 5 since it is a common factor of both, so \(\dfrac{15}{10}\) simplifies to \(\dfrac{3}{2}\)

    So the slope of the line is \(\dfrac{3}{2}\)
    )
  5. Find the slope of the line that contains the points \((−8,10)\) and \((−32,2)\). (
    Solution
    x
    Solution: \(\dfrac{1}{3}\)
    )
  6. Find the slope of the line that contains the points \((8,−9)\) and \((−27,−30)\). (
    Solution
    x
    Solution: \(\dfrac{3}{5}\)
    )

Need More Help?


  1. Study other Math Lessons in the Resource Center.
  2. Visit the Online Tutoring Resources in the Resource Center.
  3. Contact your Instructor.
  4. If you still need help, Schedule a Tutor.