Mathwords logoReference LibraryMathwords

Slope of a Line

Slope of a Line

A number which is used to indicate the steepness of a line, as well as indicating whether the line is tilted uphill or downhill. Slope is indicated by the letter m.

 

Diagram showing slope formula m = rise/run = (y₂-y₁)/(x₂-x₁) with a line through points (x₁,y₁) and (x₂,y₂) on a coordinate plane.
Slope Facts list: m=(y₂-y₁)/(x₂-x₁); horizontal m=0; vertical undefined; parallel lines equal slopes; perpendicular m₁m₂=-1

 

 

See also

Horizontal line equation, vertical line equation, parallel lines, perpendicular

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) = The coordinates of the first point on the line
  • (x2,y2)(x_2, y_2) = The coordinates of the second point on the line
  • rise\text{rise} = The vertical change between the two points (difference in y-values)
  • run\text{run} = The horizontal change between the two points (difference in x-values)

Worked Example

Problem: Find the slope of the line passing through the points (2, 3) and (6, 11).
Step 1: Identify the two points. Let (x1,y1)=(2,3)(x_1, y_1) = (2, 3) and (x2,y2)=(6,11)(x_2, y_2) = (6, 11).
Step 2: Calculate the rise (change in yy).
y2y1=113=8y_2 - y_1 = 11 - 3 = 8
Step 3: Calculate the run (change in xx).
x2x1=62=4x_2 - x_1 = 6 - 2 = 4
Step 4: Divide the rise by the run to find the slope.
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

This example demonstrates a negative slope, showing how the sign of the slope indicates direction. A negative slope means the line decreases as you move from left to right, unlike the first example where the positive slope indicated an increasing line.

Problem: Find the slope of the line passing through the points (1, 9) and (4, 3).
Step 1: Label the points. Let (x1,y1)=(1,9)(x_1, y_1) = (1, 9) and (x2,y2)=(4,3)(x_2, y_2) = (4, 3).
Step 2: Compute the rise.
y2y1=39=6y_2 - y_1 = 3 - 9 = -6
Step 3: Compute the run.
x2x1=41=3x_2 - x_1 = 4 - 1 = 3
Step 4: Divide rise by run.
m=63=2m = \frac{-6}{3} = -2
Answer: The slope is m=2m = -2. The negative value tells you the line falls (goes downhill) from left to right.

Frequently Asked Questions

What does a slope of 0 mean?
A slope of 00 means the line is perfectly horizontal — it has no steepness at all. The yy-value stays the same no matter how much xx changes. Every horizontal line has the equation y=cy = c for some constant cc.
What is the slope of a vertical line?
A vertical line has an undefined slope. When you try to compute it, the run (x2x1x_2 - x_1) equals 00, and division by zero is undefined. This is why vertical lines cannot be written in slope-intercept form and instead have the equation x=cx = c.
Does it matter which point you call (x₁, y₁) and which you call (x₂, y₂)?
No, it does not matter. If you swap the two points, both the numerator and the denominator change sign, so the ratio stays the same. For example, using points (2,3)(2, 3) and (6,11)(6, 11): 31126=84=2\frac{3-11}{2-6} = \frac{-8}{-4} = 2, which matches 11362=2\frac{11-3}{6-2} = 2.

Positive Slope vs. Negative Slope

Positive SlopeNegative Slope
DirectionLine rises from left to right (goes uphill)Line falls from left to right (goes downhill)
Sign of mm > 0m < 0
ExampleThrough (0, 1) and (2, 5): m = 2Through (0, 5) and (2, 1): m = −2
Real-world analogyWalking uphillWalking downhill

Why It Matters

Slope is one of the most fundamental concepts in algebra and appears throughout mathematics, science, and economics. You need it to write equations of lines in slope-intercept form (y=mx+by = mx + b) and point-slope form, and it directly leads into the concept of rate of change and derivatives in calculus. Whenever you interpret a graph — speed vs. time, cost vs. quantity, or temperature vs. altitude — you are reading slopes.

Common Mistakes

Mistake: Putting the x-values in the numerator and the y-values in the denominator (computing run over rise instead of rise over run).
Correction: Remember that slope is always rise over run: the change in yy on top, the change in xx on the bottom. A helpful mnemonic: yy comes before xx alphabetically when going top-to-bottom in the fraction.
Mistake: Mixing up the order of subtraction — using y2y1y_2 - y_1 in the numerator but x1x2x_1 - x_2 in the denominator.
Correction: You must subtract in the same order in both the numerator and denominator. If you compute y2y1y_2 - y_1 on top, you must compute x2x1x_2 - x_1 on the bottom. Swapping the order in only one part flips the sign of your answer.

Related Terms