Sub topic 3
Slope: Rise Over Run
Prerequisites and what this chapter covers
This chapter assumes you can plot ordered pairs on the coordinate plane, do arithmetic with fractions and negative numbers, and solve a linear equation in one variable. It also assumes you read distance and midpoint in the previous chapter. Here you will learn to compute slope from two points, from a graph, and from an equation. You will also learn to interpret its sign and size, and to avoid the errors that cost points on the GRE.
Horizontal and vertical lines get their own chapter next. This chapter mentions them only as limits you should recognize.
What slope measures
The slope of a line is the amount y changes for each 1 unit that x increases. It is a single number that describes how steep the line is and which way it tilts. Every non-vertical line has one slope, and that slope is the same no matter which two points on the line you use.
Slope is usually written as m. Its definition is:
m = (change in y) / (change in x) = rise / run
"Rise" is the vertical change between two points. "Run" is the horizontal change. Moving up is a positive rise, and moving right is a positive run. Moving down or left is negative.
The slope formula
Given two points (x₁, y₁) and (x₂, y₂) on a line:
m = (y₂ − y₁) / (x₂ − x₁)
For the points (1, 2) and (3, 8), the rise is 8 − 2 = 6 and the run is 3 − 1 = 2, so m = 6/2 = 3. This means that each time x goes up by 1, y goes up by 3.
def slope(p, q):
(x1, y1), (x2, y2) = p, q
return (y2 - y1) / (x2 - x1)
m = slope((1, 2), (3, 8))
print(m) # 3.0The order rule
You can label the points in either order, but you must be consistent. If y₂ comes from the second point in the numerator, x₂ must come from that same point in the denominator. Reversing the points in both places gives the same answer, because the two negative signs cancel:
(2 − 8) / (1 − 3) = (−6) / (−2) = 3
Reversing only one of them flips the sign and gives −3, which is wrong.
Reading the sign and size of slope
The sign tells you the direction of the line as you read it from left to right.
| Slope | Direction of the line | Example |
|---|---|---|
| Positive | Rises | m = 2 |
| Negative | Falls | m = −1/2 |
| Zero | Flat (horizontal) | m = 0 |
| Undefined | Vertical | run = 0 |
The absolute value of the slope tells you the steepness. A line with m = 4 is steeper than a line with m = 1. A line with m = −4 is just as steep as m = 4, but it falls instead of rising. A line with |m| less than 1 is flatter than the 45-degree line y = x, which has slope 1.
Finding slope from a graph
To read slope from a graph, follow these steps:
- Choose two points on the line that sit exactly on grid intersections, so that you can read their coordinates without guessing.
- Count the rise from the left point to the right point. Up is positive and down is negative.
- Count the run from the left point to the right point. Because you start on the left, the run is positive.
- Divide rise by run and simplify.
If you move 2 units right and 3 units down to get from one point to the next, the slope is −3/2. Check your answer against the picture. A line that falls should give a negative number.
Pick points far apart when you can. Far-apart points reduce the chance of misreading a coordinate by one grid square.
Finding slope from an equation
If a line is written as y = mx + b, the coefficient of x is the slope. For y = 3x − 1, the slope is 3. The next chapter develops this form fully. For now, the key skill is to get y alone on one side.
Suppose a GRE question gives 2x + 4y = 12. To find the slope:
- Subtract 2x from both sides: 4y = −2x + 12.
- Divide every term by 4: y = −(1/2)x + 3.
- Read the coefficient of x: m = −1/2.
The step that students skip is dividing every term. If you divide only the x term, you get the wrong slope.
For a line in the form Ax + By = C, you can use the shortcut m = −A/B. Check it with 2x + 4y = 12: A = 2 and B = 4, so m = −2/4 = −1/2. The shortcut matches the long method. It works only when the equation is in the form Ax + By = C, with both x and y terms on the same side.
def slope_from_standard(A, B):
# Line: A*x + B*y = C, with B != 0
return -A / B
print(slope_from_standard(2, 4)) # -0.5Slope is constant along a line
Because a line has the same slope everywhere, you can use slope to test whether three points lie on one line. Points P, Q, and R are collinear (on the same line) exactly when the slope from P to Q equals the slope from Q to R.
For (0, 1), (2, 5), and (5, 11):
- Slope from the first to the second: (5 − 1)/(2 − 0) = 4/2 = 2.
- Slope from the second to the third: (11 − 5)/(5 − 2) = 6/3 = 2.
The slopes match, so the three points are collinear.
You can also use constant slope to find a missing coordinate. If a line passes through (1, 2) and (4, k) and has slope 3, then:
(k − 2)/(4 − 1) = 3
k − 2 = 9
k = 11
Slope and the missing-coordinate pattern
A faster way to think about slope is as a rate. A slope of 3 means "up 3 for every 1 right." To go from x = 1 to x = 4, you move 3 units right, so y rises by 3 × 3 = 9. That gives y = 2 + 9 = 11 with no fractions to clear. This rate approach is often quicker on timed questions than setting up the full equation.
def y_at(x, point, m):
# Follow the slope from a known point to a new x
x0, y0 = point
return y0 + m * (x - x0)
print(y_at(4, (1, 2), 3)) # 11Edge cases and common errors
Zero rise and zero run
If the two points have the same y-value, the rise is 0 and the slope is 0. For (2, 5) and (7, 5), the slope is 0/5 = 0. If the two points have the same x-value, the run is 0 and the slope is undefined, because you cannot divide by zero. For (3, 1) and (3, 9), the slope is 8/0, which is undefined.
Do not confuse the two. Zero slope is a real number and means a flat line. Undefined slope means the line is vertical.
Fraction slopes and simplifying
Leave slope as a fraction in lowest terms unless the question asks for a decimal. A slope of 6/4 should be written 3/2. A GRE numeric entry question accepts a fraction or a decimal, but an unsimplified answer wastes time and risks arithmetic mistakes later.
Negative signs in the numerator and denominator
When both rise and run are negative, the slope is positive. When exactly one is negative, the slope is negative. Put the negative sign in the numerator or in front of the whole fraction, never in the denominator alone, so that −3/2, 3/(−2), and (−3)/2 are all read as the same number.
Mixing up x and y
Slope is change in y over change in x. Writing it as change in x over change in y gives the reciprocal. If you notice your slope for a rising line is less than 1 when the line looks steep, check whether you inverted the fraction.
Comparing slopes of lines with different signs
A slope of −5 is steeper than a slope of 2, even though −5 is less than 2. When a question asks "which line is steeper," compare absolute values. When it asks "which slope is greater," compare the signed numbers.
Worked example in the style of the GRE
Quantity A is the slope of the line through (−2, 3) and (4, −3). Quantity B is the slope of the line 3x + 3y = 5.
For Quantity A, the rise is −3 − 3 = −6 and the run is 4 − (−2) = 6. The slope is −6/6 = −1.
For Quantity B, use m = −A/B with A = 3 and B = 3. The slope is −3/3 = −1.
The two quantities are equal.
The common wrong answer is to treat 4 − (−2) as 2. Subtracting a negative number adds, so the run is 6.
def slope(p, q):
(x1, y1), (x2, y2) = p, q
return (y2 - y1) / (x2 - x1)
a = slope((-2, 3), (4, -3))
b = -3 / 3
print(a, b, a == b) # -1.0 -1.0 TrueSummary of methods
| You are given | Method |
|---|---|
| Two points | m = (y₂ − y₁)/(x₂ − x₁) |
| A graph | Count rise over run between two clear grid points |
| y = mx + b | Read the coefficient of x |
| Ax + By = C | m = −A/B, or solve for y |
| A known slope and one point | Move m units up for each 1 unit right to find other points |
Exercise
A line passes through (−1, 4) and (5, k). Its slope is −2/3. What is k?
Show answer
Set up (k − 4)/(5 − (−1)) = −2/3. The run is 6, so (k − 4)/6 = −2/3. Multiply both sides by 6 to get k − 4 = −4. Then k = 0.
Exercise
Find the slope of the line 5x − 2y = 10, and state whether the line rises or falls from left to right.
Show answer
Using m = −A/B with A = 5 and B = −2 gives m = −5/(−2) = 5/2. Check by rearranging: −2y = −5x + 10, so y = (5/2)x − 5. The slope is 5/2, which is positive, so the line rises.
Exercise
Are the points (0, −1), (3, 1), and (9, 5) on one line? Explain.
Show answer
The slope from the first to the second is (1 − (−1))/(3 − 0) = 2/3. The slope from the second to the third is (5 − 1)/(9 − 3) = 4/6 = 2/3. The slopes are equal, so the points are collinear.