Mathwords logoMathwords

Slope — Definition, Formula & Examples

Slope is a number that describes how steep a line is and which direction it tilts. It tells you how much the line goes up or down for every unit it moves to the right.

The slope of a line through two distinct points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) is defined as the ratio of the vertical change (rise) to the horizontal change (run) between those points, expressed as m=y2y1x2x1m = \frac{y_2 - y_1}{x_2 - x_1}, provided x1x2x_1 \neq x_2.

Key Formula

m=y2y1x2x1=riserunm = \frac{y_2 - y_1}{x_2 - x_1} = \frac{\text{rise}}{\text{run}}
Where:
  • mm = The slope of the line
  • (x1,y1)(x_1, y_1) = Coordinates of the first point on the line
  • (x2,y2)(x_2, y_2) = Coordinates of the second point on the line

How It Works

To find the slope, pick any two points on the line and calculate how far apart they are vertically (the rise) and horizontally (the run). Divide the rise by the run, and you get the slope. A positive slope means the line goes upward from left to right, while a negative slope means it goes downward. A slope of zero gives a perfectly horizontal line, and a vertical line has an undefined slope because you would be dividing by zero. The larger the absolute value of the slope, the steeper the line.

Worked Example

Problem: Find the slope of the line that passes through the points (2, 3) and (6, 11).
Identify the coordinates: Label the two points: (x1,y1)=(2,3)(x_1, y_1) = (2, 3) and (x2,y2)=(6,11)(x_2, y_2) = (6, 11).
Calculate the rise: Subtract the y-values to find the vertical change.
y2y1=113=8y_2 - y_1 = 11 - 3 = 8
Calculate the run: Subtract the x-values to find the horizontal change.
x2x1=62=4x_2 - x_1 = 6 - 2 = 4
Divide rise by run: Compute the slope by dividing.
m=84=2m = \frac{8}{4} = 2
Answer: The slope is m=2m = 2. This means the line rises 2 units for every 1 unit it moves to the right.

Another Example

Problem: Find the slope of the line through (-1, 5) and (3, -3).
Set up the formula: Use (x1,y1)=(1,5)(x_1, y_1) = (-1, 5) and (x2,y2)=(3,3)(x_2, y_2) = (3, -3).
m=353(1)m = \frac{-3 - 5}{3 - (-1)}
Simplify: Compute the numerator and denominator separately, then divide.
m=84=2m = \frac{-8}{4} = -2
Answer: The slope is m=2m = -2. The negative value confirms the line falls from left to right.

Visualization

Why It Matters

Slope is one of the first ideas you meet in algebra and it reappears throughout high-school math, physics, and economics. In pre-algebra and Algebra 1, you need slope to write equations of lines, graph linear functions, and solve systems of equations. Beyond the classroom, slope describes real rates of change — like speed (distance per hour) or cost per item.

Common Mistakes

Mistake: Swapping rise and run by putting the x-difference on top instead of the y-difference.
Correction: Remember: slope = rise over run. The y-values (vertical) always go in the numerator, and the x-values (horizontal) go in the denominator.
Mistake: Subtracting the coordinates in mismatched order, such as computing y2y1y_2 - y_1 in the numerator but x1x2x_1 - x_2 in the denominator.
Correction: Whichever point you list first in the numerator must also be listed first in the denominator. Mixing the order flips the sign and gives the wrong slope.