# Slope of a Line Between Two Points

The slope of a line between two given points is equal to

where "rise" and "run" mean the same things they did when we first learned about the slopes of lines.

### Sample Problem

Consider the line drawn here:

We have

{rise} = ({ending *y*-value}) - ({starting *y*-value}) = 8 - 4 = 4

and

{run} = ({ending *x*-value}) - ({starting *x*-value}) = 5 - 3 = 2.

This means the slope of the line is

When we calculate the slope this way, we're assuming that we start at the point (3, 4) and travel to the point (5, 8). If the equation of the line is given by the function *f*, we think of our starting point as (*a*, *f*(*a*)) and our ending point as (*b*, *f*(*b*)):

However, if we want to be contrary, we can instead start at the point (5, 8) and travel to the point (3, 4):

Now our starting point is (a, *f*(*a*)) = (5, 8) and our ending point is (*b*, *f*(*b*)) = (3, 4). We find

{rise} = ({ending *y*-value}) - ({starting *y*-value}) = 4 - 8 = -4

and

{run} = ({ending *x*-value}) - ({starting *x*-value}) = 3 - 5 = -2.

This means the slope of the line is

When we switched our starting and ending points in the example we changed the signs of both the rise and the run. These two sign changes canceled each other out, we got the same value of slope either way. The moral of the story is that when we're asked to find the slope of the line between two points, it doesn't matter which point we think of as the "start."

If we have two numbers *a* and *b* and a line *f*(*x*), we can say that "run" is the distance from *a* to *b* and "rise" is the distance from *f*(*a*) to *f*(*b*). This produces the formulas

{run} = *b* - *a*

{rise} = *f*(*b*) - *f*(*a*).

This will work regardless of which point is to the left.