## Finding the Slope of a Line From Its Graph

### Learning Outcomes

• Given the graph of a line, determine the slope of the line
• Identify the slope of a horizontal line given it’s equation
• Identify the slope of a vertical line given it’s equation

Now we’ll look at some graphs on a coordinate grid to find their slopes. The method will be very similar to what we just modeled on our geoboards.

To find the slope, we must count out the rise and the run. But where do we start?

We locate any two points on the line. We try to choose points with coordinates that are integers to make our calculations easier. We then start with the point on the left and sketch a right triangle, so we can count the rise and run.

### example

Find the slope of the line shown: Solution
Locate two points on the graph, choosing points whose coordinates are integers. We will use $\left(0,-3\right)$ and $\left(5,1\right)$.

Starting with the point on the left, $\left(0,-3\right)$, sketch a right triangle, going from the first point to the second point, $\left(5,1\right)$. Count the rise on the vertical leg of the triangle. The rise is $4$ units. Count the run on the horizontal leg. The run is $5$ units. Use the slope formula. $m={\Large\frac{\text{rise}}{\text{run}}}$ Substitute the values of the rise and run. $m={\Large\frac{4}{5}}$ The slope of the line is ${\Large\frac{4}{5}}$ .

Notice that the slope is positive since the line slants upward from left to right.

### Find the slope from a graph

1. Locate two points on the line whose coordinates are integers.
2. Starting with the point on the left, sketch a right triangle, going from the first point to the second point.
3. Count the rise and the run on the legs of the triangle.
4. Take the ratio of rise to run to find the slope. $m={\Large\frac{\text{rise}}{\text{run}}}$

### example

Find the slope of the line shown: Notice that the slope is negative since the line slants downward from left to right.

What if we had chosen different points? Let’s find the slope of the line again, this time using different points. We will use the points $\left(-3,7\right)$ and $\left(6,1\right)$. Starting at $\left(-3,7\right)$, sketch a right triangle to $\left(6,1\right)$. Count the rise. The rise is $−6$. Count the run. The run is $9$. Use the slope formula. $m=\Large\frac{\text{rise}}{\text{run}}$ Substitute the values of the rise and run. $m={\Large\frac{-6}{9}}$ Simplify the fraction. $m=-{\Large\frac{2}{3}}$ The slope of the line is $-{\Large\frac{2}{3}}$.

It does not matter which points you use—the slope of the line is always the same. The slope of a line is constant!

### try it

The lines in the previous examples had $y$ -intercepts with integer values, so it was convenient to use the y-intercept as one of the points we used to find the slope. In the next example, the $y$ -intercept is a fraction. The calculations are easier if we use two points with integer coordinates.

### example

Find the slope of the line shown: ### try it

In the following video we show another example of how to find the slope of a line given a graph. This graph has a positive slope.

In the following video we show another example of how to find the slope of a line given a graph. This graph has a negative slope.

## Finding the Slope of Horizontal and Vertical Lines

Do you remember what was special about horizontal and vertical lines? Their equations had just one variable.

• horizontal line $y=b$; all the $y$ -coordinates are the same.
• vertical line $x=a$; all the $x$ -coordinates are the same.

So how do we find the slope of the horizontal line $y=4?$ One approach would be to graph the horizontal line, find two points on it, and count the rise and the run. Let’s see what happens. We’ll use the two points $\left(0,4\right)$ and $\left(3,4\right)$ to count the rise and run. What is the rise? The rise is $0$. What is the run? The run is $3$. What is the slope? $m=\Large\frac{\text{rise}}{\text{run}}$ $m={\Large\frac{0}{3}}$ $m=0$

The slope of the horizontal line $y=4$ is $0$.

All horizontal lines have slope $0$ . When the $y$ -coordinates are the same, the rise is $0$ .

### Slope of a Horizontal Line

The slope of a horizontal line, $y=b$, is $0$.

Now we’ll consider a vertical line, such as the line $x=3$, shown below. We’ll use the two points $\left(3,0\right)$ and $\left(3,2\right)$ to count the rise and run. What is the rise? The rise is $2$. What is the run? The run is $0$. What is the slope? $m=\Large\frac{\text{rise}}{\text{run}}$ $m={\Large\frac{2}{0}}$

But we can’t divide by $0$. Division by $0$ is undefined. So we say that the slope of the vertical line $x=3$ is undefined. The slope of all vertical lines is undefined, because the run is $0$.

### Slope of a Vertical Line

The slope of a vertical line, $x=a$, is undefined.

### example

Find the slope of each line:

1. $x=8$
2. $y=-5$

Solution
1. $x=8$
This is a vertical line, so its slope is undefined.

2. $y=-5$
This is a horizontal line, so its slope is $0$.

### Quick Guide to the Slopes of Lines The following example shows you how to determine the slope of horizontal and vertical lines that are plotted on the coordinate axes.