What is the Slope of a Line?

Slope measures how steep a line is. It tells you how much a line rises or falls as you move from left to right. If you've ever driven up a mountain road and seen a sign that says "6% grade," that's slope — the road rises 6 feet for every 100 feet of horizontal distance.

In algebra, slope is usually represented by the letter \(m\). A line with a larger absolute value of \(m\) is steeper. A line with \(m\) close to zero is nearly flat.

Rise Over Run

The most intuitive way to think about slope is "rise over run."

$$m = \frac{\text{rise}}{\text{run}}$$

Rise is the vertical change (how much you go up or down).

Run is the horizontal change (how much you go left or right).

To find the slope from a graph, pick two points on the line. Count how many units up or down you move (rise), then count how many units left or right you move (run). The slope is rise divided by run.

Visual showing rise over run calculation with two points on a line

Example: A line passes through \((1, 2)\) and \((5, 6)\).

From \((1, 2)\) to \((5, 6)\), you rise 4 units (from \(y = 2\) to \(y = 6\)) and run 4 units to the right (from \(x = 1\) to \(x = 5\)).

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

The slope is 1. This means for every 1 unit you move to the right, the line goes up 1 unit.

The Slope Formula

If you know the coordinates of two points, you can use the slope formula:

$$m = \frac{y_2 - y_1}{x_2 - x_1}$$

This formula is just rise over run written algebraically. The numerator \((y_2 - y_1)\) is the change in \(y\) (the rise), and the denominator \((x_2 - x_1)\) is the change in \(x\) (the run).

Example: Find the slope of the line through \((2, 3)\) and \((5, 11)\).

Let \((x_1, y_1) = (2, 3)\) and \((x_2, y_2) = (5, 11)\).

$$m = \frac{11 - 3}{5 - 2} = \frac{8}{3}$$

The slope is \(\frac{8}{3}\), which is about 2.67. This is a fairly steep upward line.

It doesn't matter which point you call "point 1" and which you call "point 2," as long as you're consistent with the order in both the numerator and denominator.

Example: Find the slope through \((4, 7)\) and \((1, 2)\).

$$m = \frac{2 - 7}{1 - 4} = \frac{-5}{-3} = \frac{5}{3}$$

Reversing the order of the points gives the same result:

$$m = \frac{7 - 2}{4 - 1} = \frac{5}{3}$$

Same answer either way.

Positive, Negative, Zero, and Undefined Slope

Comparison of positive, negative, zero, and undefined slopes

Positive slope: The line goes upward from left to right. As \(x\) increases, \(y\) increases. Example: a line through \((0, 0)\) and \((3, 4)\) has slope \(\frac{4}{3}\).

Negative slope: The line goes downward from left to right. As \(x\) increases, \(y\) decreases. Example: a line through \((0, 5)\) and \((2, 1)\) has slope \(\frac{1 - 5}{2 - 0} = \frac{-4}{2} = -2\).

Zero slope: The line is horizontal. It doesn't rise or fall at all. Example: the line \(y = 3\) has slope \(m = 0\) because it stays at \(y = 3\) no matter what \(x\) is.

Undefined slope: The line is vertical. It has no run because \(x\) doesn't change. Since you can't divide by zero, the slope is undefined. Example: the line \(x = 5\) has undefined slope.

Finding Slope from an Equation

If you have a linear equation in the form \(y = mx + b\), the coefficient of \(x\) is the slope.

Example: What is the slope of \(y = 3x - 7\)?

The slope is \(m = 3\).

Example: What is the slope of \(y = -\frac{1}{2}x + 4\)?

The slope is \(m = -\frac{1}{2}\).

If the equation isn't in this form, you can rearrange it or pick two points and use the slope formula.

Example: Find the slope of \(2x + 3y = 12\).

Method 1: Solve for \(y\). $$3y = -2x + 12$$ $$y = -\frac{2}{3}x + 4$$

The slope is \(-\frac{2}{3}\).

Method 2: Find two points and use the formula.

When \(x = 0\): \(3y = 12\), so \(y = 4\). Point: \((0, 4)\).

When \(x = 3\): \(2(3) + 3y = 12\), so \(6 + 3y = 12\), thus \(y = 2\). Point: \((3, 2)\).

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

Same answer.

Parallel and Perpendicular Lines

Lines that are parallel have the same slope. If one line has slope 2, any line parallel to it also has slope 2.

Lines that are perpendicular have slopes that are negative reciprocals. If one line has slope \(m\), a perpendicular line has slope \(-\frac{1}{m}\).

Comparison of parallel lines with same slope and perpendicular lines with negative reciprocal slopes

Example: Is the line \(y = 4x + 1\) parallel to \(y = 4x - 3\)?

Both have slope 4, so yes, they're parallel.

Example: What slope would make a line perpendicular to \(y = 2x + 5\)?

The original slope is 2. The negative reciprocal is \(-\frac{1}{2}\). So any line with slope \(-\frac{1}{2}\) is perpendicular to \(y = 2x + 5\).

Example: Are \(y = \frac{3}{4}x + 1\) and \(y = -\frac{4}{3}x - 2\) perpendicular?

The slopes are \(\frac{3}{4}\) and \(-\frac{4}{3}\). Before checking — what is the negative reciprocal of \(\frac{3}{4}\)? Show answerThe negative reciprocal of \(\frac{3}{4}\) is \(-\frac{4}{3}\). Yes, they match! These lines are perpendicular.

Interpreting Slope in Context

Slope has meaning in real-world problems. It represents a rate of change.

Example: A car rental costs $30 plus $0.25 per mile. The equation is \(C = 0.25m + 30\), where \(C\) is cost and \(m\) is miles.

The slope is 0.25, which means the cost increases by $0.25 for each additional mile driven.

Example: Water drains from a tank at a constant rate. After 5 minutes, there are 40 gallons left. After 15 minutes, there are 20 gallons left.

$$m = \frac{20 - 40}{15 - 5} = \frac{-20}{10} = -2$$

The slope is -2, meaning the water level decreases by 2 gallons per minute.

Work Through These

  1. Find the slope of the line through \((3, 4)\) and \((7, 10)\). Show answer\(m = \frac{10 - 4}{7 - 3} = \frac{6}{4} = \frac{3}{2}\)

  2. Find the slope of the line through \((-2, 5)\) and \((1, -1)\). Show answer\(m = \frac{-1 - 5}{1 - (-2)} = \frac{-6}{3} = -2\)

  3. What is the slope of \(y = -5x + 3\)? Show answerThe slope is -5 (the coefficient of \(x\)).

  4. What is the slope of a horizontal line? Show answerZero. Horizontal lines don't rise or fall.

  5. Find the slope of \(3x - y = 9\). Show answerSolve for \(y\): \(-y = -3x + 9\), so \(y = 3x - 9\). The slope is 3.

  6. Are the lines \(y = 2x + 1\) and \(y = -\frac{1}{2}x + 4\) perpendicular? Show answerYes. The slopes are 2 and \(-\frac{1}{2}\). The negative reciprocal of 2 is \(-\frac{1}{2}\), so they're perpendicular.

What's Next?

A few things to keep straight as you work. The slope formula is rise over run, which means change in \(y\) over change in \(x\) — vertical first, horizontal second. Whatever order you subtract the \(y\) values in, subtract the \(x\) values in the same order; you can't swap point 1 and point 2 partway through. Horizontal lines have slope zero (no rise); vertical lines have undefined slope (no run, so you'd be dividing by zero). For perpendicular lines, both the flip and the sign change matter: the negative reciprocal of 3 is \(-\frac{1}{3}\), not \(\frac{1}{3}\). And always simplify your final fraction — \(\frac{6}{4}\) is \(\frac{3}{2}\).

Once slope feels routine, the natural next step is slope-intercept form, which puts slope and the \(y\)-intercept right at the front of the equation.