Lesson Objectives

- Demonstrate an understanding of how to graph a Linear Equation in Two Variables
- Learn how to calculate the slope of a line from its graph
- Learn how to calculate the slope of a line using the slope formula
- Learn how to identify a positive slope, negative slope, slope of zero, and an undefined slope

## How to Find the Slope of a Line

In the last lesson, we learned how to graph a linear equation in two variables. When graphing equations, we will be interested in a certain property known as slope. The slope of a line is a measure of its steepness. The way we measure slope is to compare the change in y-values (vertical change) to the change in x-values (horizontal change) while moving along our line from one point to another.

-3x + y = 4

At this point, we know how to graph the equation. We can generate three points (ordered pairs) that satisfy the equation. We then plot the points and draw a line through the points with arrows at each end. Let's start by making a table of ordered pairs:

We generated 4 ordered pairs for the purpose of demonstrating slope. Let's plot the points: (0,4), (-2,-2), (-3,-5), and (-1,1) and sketch our graph: Starting at the point (-3,-5), notice how as we move up our line, each new point is 3 units up and 1 unit to the right: These amounts can be written as a ratio of the vertical change over the horizontal change known as our slope: $$\text{slope}=\frac{\text{rise}}{\text{run}}$$ The slope is the rise or change in y values over the run or change in x values. In our example, our rise was 3 since we moved up 3 units to get to the next point. Our run was 1 since we moved right 1 unit to get to the next point. Our slope can be written as: $$\text{slope}=\frac{\text{rise}}{\text{run}}=\frac{3}{1}=3$$ In most cases, we don't have time to pull out a sheet of graphing paper, sketch a graph, and calculate the slope in such a way. Luckily, there are easier methods. The slope formula allows us to calculate the slope for any line, given two points on the line. Slope Formula: $$m=\frac{y_{2}- y_{1}}{x_{2}- x_{1}}$$ First and foremost, the "m" on the left stands for slope. We will normally see "m" when asked for slope. Secondly, the small number to the bottom right of each variable is known as a subscript. We can read these as: y-sub-two, y-sub-one, x-sub-two, and x-sub-one. This is just a way to keep track of different x and y values from different ordered pairs. Let's look at our procedure for using the slope formula:

-3x + y = 4

We can use any two points from the line, let's just take the first two from our table: (0,4) and (-2,-2). Let's label the first point as point 1, meaning it is: (x

x

y

x

y

Now we can just plug into our formula: $$m=\frac{y_{2}- y_{1}}{x_{2}- x_{1}}$$ $$\require{cancel}m=\frac{-2 - 4}{-2 - 0}=\frac{3\cancel{-6}}{\cancel{-2}}=3$$ We can see that we got the same result for our slope (3) as we found from our graph. Let's try a few examples.

Example 1: Find the slope of the line that passes through the given points:

(4,7), (5,2)

Let's let our first point be: (4,7) and our second point be: (5,2)

x

y

x

y

Now we plug into our slope formula: $$m=\frac{y_{2}- y_{1}}{x_{2}- x_{1}}$$ $$m=\frac{2 - 7}{5 - 4}=\frac{-5}{1}=-5$$ Our slope, m, is -5.

Example 2: Find the slope of the line that passes through the given points:

(2,-3), (1,7)

Let's let our first point be: (2,-3) and our second point be: (1,7)

x

y

x

y

Now we plug into our slope formula: $$m=\frac{y_{2}- y_{1}}{x_{2}- x_{1}}$$ $$m=\frac{7 - (-3)}{1 - 2}=\frac{10}{-1}=-10$$ Our slope, m, is -10.

Example 3: Find the slope of the line that passes through the given points:

(6,2), (3,4)

Let's let our first point be: (6,2) and our second point be: (3,4)

x

y

x

y

Now we plug into our slope formula: $$m=\frac{y_{2}- y_{1}}{x_{2}- x_{1}}$$ $$m=\frac{4 - 2}{3 - 6}=\frac{2}{-3}=-\frac{2}{3}$$ Our slope, m, is -2/3.

-x + y = 3

Here we have an example of a line with a positive slope. The slope of this equation is 1. We can find this from the slope formula, or we can use something much faster known as slope-intercept form. To place a linear equation in two variables in slope-intercept form, we just solve the equation for y:

y = x + 3

The slope-intercept form gives us the slope as the coefficient of the variable x. We will discuss this in more detail in the next lesson, for now, we can use it as a shortcut to find the slope. Our coefficient for x here is 1:

y = 1x + 3

Since our slope is +1, we know the line rises as we move from left to right: When we see a negative slope, the line falls from left to right. As another example, suppose we had the equation:

2x + y = 7

If we solve this equation for y and obtain slope-intercept form:

y = -2x + 7

Our slope here is the coefficient of x, which is (-2):

y = -2x + 7

Since our slope is -2, we know the line falls as we move left to right: Additionally, we may see a line that has a slope of zero. This happens when we encounter a horizontal line. When we calculate slope, the top part of the formula is the change in y-values. Since y is a constant value for a horizontal line, the result of the slope formula will be 0 over some number. We know 0 over any non-zero number is 0. We can also see that a horizontal line does not have any slant as we move from left to right. It is completely flat. Let's take a look at:

y = 5

We can write this in slope-intercept form as:

y = 0x + 5

m our slope is 0 in this case. We can also show this using the slope formula. We can pick any two points such as (3,5) and (1,5). Let's say (3,5) is our point 1 and (1,5) is our point 2. If we plug into the slope formula, we will get:

$$m=\frac{y_{2}- y_{1}}{x_{2}- x_{1}}$$ $$m=\frac{5 - 5}{1 - 3}=\frac{0}{-2}=0$$ Our slope, m, is 0.

Let's take a look at this graphically: Lastly, when we encounter a vertical line, the slope is said to be "undefined". Recall that we can never divide by zero. When we have a vertical line, the value for x is always the same. This means we will end up dividing by zero in our slope equation. Let's take a look at:

x = -2

m our slope is undefined. We can show this using the slope formula. We can pick any two points such as (-2,4) and (-2,7). Let's say (-2,4) is our point 1 and (-2,7) is our point 2. If we plug into the slope formula, we will get: $$m=\frac{y_{2}- y_{1}}{x_{2}- x_{1}}$$ $$m=\frac{7 - 4}{-2 - (-2)}=\frac{3}{0}$$ Since we can't divide by 0, the slope m is undefined.

### Slope Formula

Let's suppose we have the following equation:-3x + y = 4

At this point, we know how to graph the equation. We can generate three points (ordered pairs) that satisfy the equation. We then plot the points and draw a line through the points with arrows at each end. Let's start by making a table of ordered pairs:

x | y |
---|---|

0 | 4 |

-2 | -2 |

-3 | -5 |

-1 | 1 |

- Pick or generate any two points on the line
- Label one point as (x
_{1},y_{1}) and the other as (x_{2}, y_{2}) - Plug into the slope formula

_{1},y_{1}) or (x_{2}, y_{2}). The answer is no, we will get the same result either way. Let's look at our equation from earlier:-3x + y = 4

We can use any two points from the line, let's just take the first two from our table: (0,4) and (-2,-2). Let's label the first point as point 1, meaning it is: (x

_{1},y_{1}) and the second point as point 2, meaning it is: (x_{2}, y_{2}).x

_{1}= 0y

_{1}= 4x

_{2}= -2y

_{2}= -2Now we can just plug into our formula: $$m=\frac{y_{2}- y_{1}}{x_{2}- x_{1}}$$ $$\require{cancel}m=\frac{-2 - 4}{-2 - 0}=\frac{3\cancel{-6}}{\cancel{-2}}=3$$ We can see that we got the same result for our slope (3) as we found from our graph. Let's try a few examples.

Example 1: Find the slope of the line that passes through the given points:

(4,7), (5,2)

Let's let our first point be: (4,7) and our second point be: (5,2)

x

_{1}= 4y

_{1}= 7x

_{2}= 5y

_{2}= 2Now we plug into our slope formula: $$m=\frac{y_{2}- y_{1}}{x_{2}- x_{1}}$$ $$m=\frac{2 - 7}{5 - 4}=\frac{-5}{1}=-5$$ Our slope, m, is -5.

Example 2: Find the slope of the line that passes through the given points:

(2,-3), (1,7)

Let's let our first point be: (2,-3) and our second point be: (1,7)

x

_{1}= 2y

_{1}= -3x

_{2}= 1y

_{2}= 7Now we plug into our slope formula: $$m=\frac{y_{2}- y_{1}}{x_{2}- x_{1}}$$ $$m=\frac{7 - (-3)}{1 - 2}=\frac{10}{-1}=-10$$ Our slope, m, is -10.

Example 3: Find the slope of the line that passes through the given points:

(6,2), (3,4)

Let's let our first point be: (6,2) and our second point be: (3,4)

x

_{1}= 6y

_{1}= 2x

_{2}= 3y

_{2}= 4Now we plug into our slope formula: $$m=\frac{y_{2}- y_{1}}{x_{2}- x_{1}}$$ $$m=\frac{4 - 2}{3 - 6}=\frac{2}{-3}=-\frac{2}{3}$$ Our slope, m, is -2/3.

### Positive and Negative Slope

Now that we understand the basics of slope, let's talk about the difference between a positive and negative slope. When we see a positive slope, the line rises from left to right. As an example, let's look at the equation:-x + y = 3

Here we have an example of a line with a positive slope. The slope of this equation is 1. We can find this from the slope formula, or we can use something much faster known as slope-intercept form. To place a linear equation in two variables in slope-intercept form, we just solve the equation for y:

y = x + 3

The slope-intercept form gives us the slope as the coefficient of the variable x. We will discuss this in more detail in the next lesson, for now, we can use it as a shortcut to find the slope. Our coefficient for x here is 1:

y = 1x + 3

Since our slope is +1, we know the line rises as we move from left to right: When we see a negative slope, the line falls from left to right. As another example, suppose we had the equation:

2x + y = 7

If we solve this equation for y and obtain slope-intercept form:

y = -2x + 7

Our slope here is the coefficient of x, which is (-2):

y = -2x + 7

Since our slope is -2, we know the line falls as we move left to right: Additionally, we may see a line that has a slope of zero. This happens when we encounter a horizontal line. When we calculate slope, the top part of the formula is the change in y-values. Since y is a constant value for a horizontal line, the result of the slope formula will be 0 over some number. We know 0 over any non-zero number is 0. We can also see that a horizontal line does not have any slant as we move from left to right. It is completely flat. Let's take a look at:

y = 5

We can write this in slope-intercept form as:

y = 0x + 5

m our slope is 0 in this case. We can also show this using the slope formula. We can pick any two points such as (3,5) and (1,5). Let's say (3,5) is our point 1 and (1,5) is our point 2. If we plug into the slope formula, we will get:

$$m=\frac{y_{2}- y_{1}}{x_{2}- x_{1}}$$ $$m=\frac{5 - 5}{1 - 3}=\frac{0}{-2}=0$$ Our slope, m, is 0.

Let's take a look at this graphically: Lastly, when we encounter a vertical line, the slope is said to be "undefined". Recall that we can never divide by zero. When we have a vertical line, the value for x is always the same. This means we will end up dividing by zero in our slope equation. Let's take a look at:

x = -2

m our slope is undefined. We can show this using the slope formula. We can pick any two points such as (-2,4) and (-2,7). Let's say (-2,4) is our point 1 and (-2,7) is our point 2. If we plug into the slope formula, we will get: $$m=\frac{y_{2}- y_{1}}{x_{2}- x_{1}}$$ $$m=\frac{7 - 4}{-2 - (-2)}=\frac{3}{0}$$ Since we can't divide by 0, the slope m is undefined.

#### Skills Check:

Example #1

Find the slope of the line that passes through the given points. $$(0,-4), \left(-\frac{5}{2}, 0\right)$$

Please choose the best answer.

A

$$m=-\frac{8}{5}$$

B

$$m=-\frac{4}{3}$$

C

$$m=-\frac{2}{3}$$

D

$$m=-4$$

E

$$m=6$$

Example #2

Find the slope of the line that passes through the given points. $$(9,2), (5,-3)$$

Please choose the best answer.

A

$$m=\frac{5}{4}$$

B

$$m=\frac{4}{3}$$

C

$$m=\frac{20}{13}$$

D

$$m=-5$$

E

$$m=-\frac{3}{5}$$

Example #3

Find the slope of the line. $$7x + 4y=12$$

Please choose the best answer.

A

$$m=-12$$

B

$$m=-10$$

C

$$m=-3$$

D

$$m=-\frac{4}{7}$$

E

$$m=-\frac{7}{4}$$

Congrats, Your Score is 100%

Better Luck Next Time, Your Score is %

Try again?

Ready for more?

Watch the Step by Step Video Lesson Take the Practice Test