Sub topic 5
Slope-Intercept Form: y = mx + b
This chapter assumes you can do arithmetic with fractions and negative numbers, solve a linear equation in one variable, and substitute values into a formula. It also assumes you know what slope means (rise over run) from the previous chapters, and that horizontal lines have slope 0 while vertical lines have undefined slope.
Why this form matters
Slope-intercept form writes a line as
y = mx + b
Here m is the slope and b is the y-intercept, the y-value where the line crosses the y-axis (the point (0, b)). The form shows both numbers directly, and on the GRE you often need only one of them. The test commonly asks for a slope, an intercept, a missing coefficient, or whether a point lies on a line, and this form answers all of these quickly.
The equation y = 3x - 1 has slope 3 and y-intercept -1. Starting at (0, -1), each step of 1 to the right moves the line up 3.
What each part does
- m (slope): the change in y for each 1-unit increase in x. A positive m means the line rises left to right. A negative m means it falls. A larger absolute value means a steeper line.
- b (y-intercept): the value of y when x = 0. It shifts the whole line up (b > 0) or down (b < 0) without changing its tilt.
- x and y: the coordinates of any point on the line. A point is on the line exactly when its coordinates make the equation true.
Reading m and b from an equation
When the equation is already in the form y = mx + b, read the numbers off.
| Equation | Slope m | y-intercept b |
|---|---|---|
| y = 2x + 5 | 2 | 5 |
| y = -x + 7 | -1 | 7 |
| y = x/4 - 3 | 1/4 | -3 |
| y = 6 | 0 | 6 |
| y = -3x | -3 | 0 |
Two cases trip people up. In y = -x + 7 the slope is -1, not "no slope", because -x means -1 · x. In y = 6 the slope is 0, because you can write it as y = 0x + 6.
Rearranging into slope-intercept form
Many GRE equations arrive in another arrangement, such as 4x + 2y = 10. To find m and b, solve for y.
- Move the x-term to the other side: 2y = -4x + 10.
- Divide every term by the coefficient of y: y = -2x + 5.
So m = -2 and b = 5.
The most common error here is dividing only one term. If you divide by 2, every term gets divided, including the one with x and the constant.
For a general equation Ax + By = C, the slope is -A/B and the y-intercept is C/B (when B is not 0). Check this against 4x + 2y = 10. The slope is -4/2 = -2 and the intercept is 10/2 = 5, which matches. This shortcut saves time, but derive the result by hand if you doubt the signs.
Finding the equation from two pieces of information
From the slope and the y-intercept
Substitute directly. A line with slope -2 that crosses the y-axis at 4 is y = -2x + 4.
From the slope and one point
Substitute the point into y = mx + b and solve for b. The line has slope 3 and passes through (1, 2).
- Write 2 = 3(1) + b.
- Solve: b = -1.
- The line is y = 3x - 1.
The code below does the same computation and also finds where the line crosses the x-axis, which is the topic of the next chapter.
x1, y1 = 1, 2
m = 3
b = y1 - m * x1 # y-intercept: -1
x_intercept = -b / m # set y = 0: 1/3
print(f"y = {m}x + {b}")
print(x_intercept)From two points
First find the slope, then use one of the points to find b.
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 slope between (1, 2) and (3, 8) is (8 - 2) / (3 - 1) = 3. Substituting (1, 2) gives b = -1, so the line is y = 3x - 1. You can use either point and get the same b. Using the second point as a check is cheap: 3(3) - 1 = 8, which matches.
The function above fails with a division by zero when x1 = x2. That case is a vertical line, which cannot be written in slope-intercept form. Its equation is x = a constant.
Testing whether a point is on a line
Substitute the point's coordinates. If both sides are equal, the point is on the line.
Is (4, 9) on y = 2x + 1? Compute 2(4) + 1 = 9. The two sides match, so yes.
Is (3, 5) on y = 2x + 1? Compute 2(3) + 1 = 7, which is not 5, so no.
You can also use this to solve for a missing constant. If (2, k) lies on y = 5x - 3, then k = 5(2) - 3 = 7. If the line y = mx + 1 passes through (3, 10), then 10 = 3m + 1, so m = 3.
How changing m and b changes the line
Comparing lines is a common quantitative comparison task, so it helps to know what each change does.
- Increasing b by 2 with m fixed moves the line up 2 units. The new line is parallel to the old one.
- Increasing m with b fixed tilts the line more steeply upward. All such lines pass through the same point (0, b).
- Changing the sign of m reflects the tilt. The line y = 2x + 1 rises, while y = -2x + 1 falls, and both pass through (0, 1).
- Multiplying both m and b by the same factor gives a different line, not the same one. The equations y = 2x + 1 and y = 4x + 2 are different lines. The equations 2y = 4x + 2 and y = 2x + 1 are the same line, because the first is the second with both sides multiplied by 2.
A worked GRE-style example
The line L has equation 3x + 4y = 24. What is the slope of L, and where does it cross the y-axis?
Solve for y: 4y = -3x + 24, so y = -(3/4)x + 6.
The slope is -3/4 and the y-intercept is 6. The line crosses the y-axis at (0, 6). A quick check with the shortcut gives -A/B = -3/4 and C/B = 24/4 = 6.
Now a second question: for which value of x does the line have y = 0? Substitute y = 0 into the original equation: 3x = 24, so x = 8. The line also passes through (8, 0).
Common errors
- Forgetting to divide every term. Solving 2y = 6x + 8 as y = 6x + 4 is wrong. The result is y = 3x + 4.
- Sign errors with negative coefficients. Watch -A/B when B is negative.
- Misreading b as a point. The y-intercept b is a number. The point is (0, b).
- Reading the slope from the wrong form. In 2y = 4x + 6, the slope is not 4. Divide by 2 first to get y = 2x + 3, so the slope is 2.
- Treating a vertical line as having a slope-intercept form. The line x = 5 has no m and no b.
- Mixing up the order of subtraction. In the slope formula, subtract the coordinates in the same order in the numerator and denominator.
Summary of the method
- If the equation is not solved for y, isolate y and divide every term.
- Read m as the coefficient of x and b as the constant.
- To build an equation, find m, then substitute a known point to find b.
- To test a point, substitute both coordinates and compare.
- If the line is vertical, use x = a constant instead.
Exercise
A line passes through the points (2, 7) and (5, 1). Write its equation in slope-intercept form, then decide whether the point (4, 3) lies on it.
Show answer
The slope is (1 - 7) / (5 - 2) = -6/3 = -2. Substitute (2, 7): 7 = -2(2) + b, so b = 11. The line is y = -2x + 11. Check (5, 1): -2(5) + 11 = 1, which matches. For (4, 3): -2(4) + 11 = 3, which equals the y-coordinate, so (4, 3) lies on the line.
Exercise
The line 6x - 3y = 9 has slope m and y-intercept b. What is m + b?
Show answer
Solve for y: -3y = -6x + 9, so y = 2x - 3. Then m = 2 and b = -3, so m + b = -1. The shortcut agrees: m = -A/B = -6/(-3) = 2 and b = C/B = 9/(-3) = -3.
Exercise
The line y = kx + 5 passes through the point (3, -4). What is k?
Show answer
Substitute: -4 = 3k + 5, so 3k = -9 and k = -3.