# Slope Formula of a Line

The **slope** of a straight line describes the line’s angle of steepness from the horizontal whether it rises or falls. When the line neither rises nor falls, then we claim that it has a slope of zero. This is, in fact, the case of a horizontal line where it extends infinitely to its left or right but without any sign of “rising” or “falling”. In this lesson, the focus is to go over lots of worked examples to illustrate how to use the formula itself.

Remember that two points determine a line. Thus,Â it is possible to calculate the slope of a straight line, denoted by the symbol ** m**, when we know at least two points where the line passes through.

**Slope Formula**

The slope, *m*, of a line passing through two arbitrary points (*x*_{1}, *y*_{1})Â and (*x*_{2}, *y*_{2})Â is calculated as follows…

**Few observations**:

- The first point is assigned with subscript 1…

while the second point is assigned with subscript 2.

- The numerical value for slope is expressed in fraction. The numerator contains the difference of y-values, while the denominator contains the difference of x-values.

- The slope formulaÂ is conceptually defined as the
**rise over run**. The “rise” pertains to the movement of the point along the y-axis, and the “run” pertains to the movement along the x-axis.

Another way of remembering the slope formula is to think of it as the ratio of the change in y-coordinates and x-coordinates,Â or the division between the difference in *y*-values and *x*-values. The *y*‘s **must** stay on top the *x*‘s.

### Examples of How to Find the Slope of a Line using the Slope Formula

**Example 1**: Determine the slope of the line passing through the points **(3, 5)** and **(7, 13)**.

Start by assigning which ones will be our first and second points. If we decide to make **(3, 5)** as the first point, then **(7, 13)** should automatically be the second.Â Â The first point uses subscript 1, and the second point uses subscript 2.

The diagram below should help us visualize the first step.

Next, it is now easy toÂ extract the values that we will substitute in the slope formula.

We are now ready to substitute the knownÂ values into the formula.

At *mÂ *= 2, weÂ have a positive slope and therefore the straight line is** rising/increasing** from left to right. In other words, having a positive slope is like climbing up a hill. See the graph below.

**Example 2**: Determine the slope of the line passing through the points **(2, 10)** and **(5, 1)**.

Identify the first and second points.

Plug these values in the slope formula. Make sure that you subtract the numbers correctly. This is usually where students commit errors because they tend to be carelessÂ when doing basic arithmetic operations.

Here is the graph of the line passing through points (2, 10) and (5, 1)Â with its corresponding negative slope of *m* = â€“3. This means that the straight line is **falling/decreasing** from left to right. You may think of it as somebody going down the hill.

**Example 3**: Determine the slope of the line passing through the points **(â€“7, 3)** and **(15,Â â€“5)**.

In this example, I’d like to show you that the numerical value of the slope is **ALWAYS** the same, regardless of which point you pick to be the “first” or “second”. As long as you maintain the correct order by subtracting the corresponding y and x coordinates, the slope should come out unchanged.

Let me illustrate the idea by solving the slope two-ways. See comparison below.

That’s right!Â We have shown that the final answers for slope came out the sameÂ although we switched the order of points.

Just a quick reminder, be very careful when you are subtracting negative numbers. Remember that subtracting by a negative number is the same as adding the positive value of that number. You may have heard before that “two negativeÂ signs” becomes positive. That is the reason why whenÂ I was subtracting by a negative number, I intentionallyÂ placed that **negative number inside a parenthesis** to prompt me to be a little bit careful in dealing with signs.

**Example 4**: Find the slope of the line that goes through the points **(â€“11,Â â€“5)** and **(1,Â â€“12)**.

Solve this again side by side in two ways, to nail down the concept that reversing the order of points doesn’t affect the final outcome of the slope.

This is wonderful! The same final answers using two different routes of calculation.

**Example 5**: Find the slope of the line that goes through the points **(5, 17)** and **(0,Â â€“3)**.

If you want to solve this step by step, you may do it this way.

**Step 1**: Label the points

**Step 2**: Extract values

**Step 3**: Write the slope formula

**Step 4**: Substitute values from Step 2, then simplify.

**Notes:**

- For the numerator: adding two negative numbers yields a negative answer. Since.Â
- Also, dividing two negative numbers results to a positive answer. That’s why our final answer for slope isÂ m = + 4.

**Example 6**: Find the slope of the line that goes through the points **(â€“1,Â â€“2**) and **(â€“3,Â â€“4)**.

This looks like a fun problem because all the entries of the two points are negative numbers. I bet you that your teacher may throw something like this in order to test if you are careful dealing with the subtraction of negative numbers.

Let the first point be (âˆ’3,âˆ’4), and (âˆ’1,âˆ’2) be the second. Labeling their corresponding coordinate values, and substituting we should get

- First point

- Second point

- Evaluate values into the slope formula

**Example 7**: Solve the slope of the line passing through the points **(6,Â â€“8)** and **(14,Â â€“8)**.

This problem is an example where the line passing through the two points is a** horizontal line**. It happens when the computed value of the slope** equals zero**!

SupposeÂ Â andÂ .Â The slope of this straight line equals…

Indeed, the line is horizontal as shown in the graph. The line behaves this way because no matter how the x-coordinates vary, the y-values are constant or not changing. The effect is that as long as the y doesn’t change, the plotted points will all remain in that same horizontal lineÂ where y = -8.

**Example 8**: Solve the slope of the line passing through the points **(10, 0)** and **(10, 9)**.

This last example illustrates when the line passing through two given points is a **vertical line**. All vertical lines have **no slope**Â because theÂ numericalÂ value of their slopes results in the division by zero, commonly known as undefined.

SupposeÂ Â andÂ .Â The slope of the straight line equals

Any nonzero number divided by zero has no answer. That’s why we just call it **undefined**.

Here’s the graph to show the vertical line.

**You might also be interested in:**

Types of Slopes of a Line

Slope-Intercept Form of a Line

Point-Slope Form of a Line