Sub topic 2
Where Slope-Intercept Form Falls Short
This chapter assumes you can plot points, compute slope as rise over run, and solve a linear equation for one variable. You should also be comfortable with fractions and negative numbers. Slope-intercept form, y = mx + b, gets most of the attention in early algebra, and it is a good form. This chapter shows where it becomes awkward or fails. Those cases are the reason point-slope form and standard form exist.
A quick look at what y = mx + b promises
In y = mx + b, m is the slope and b is the y-intercept, the y-value where the line crosses the y-axis (where x = 0). Reading the form takes no work:
- Start at (0, b).
- For each 1 unit you move right, move m units up (or down, if m is negative).
This is a strong property. You can graph the line almost immediately, and you can compare slopes of different lines at a glance. The form works best when the data you are given matches what the form asks for: a slope and the y-intercept.
Real problems often give you something else. The rest of this chapter covers what happens then.
Shortfall 1: you must know the y-intercept
To write y = mx + b, you need both m and b. Suppose a problem gives you a slope and a point that is not on the y-axis. You do not have b, so you must compute it first.
The procedure has three steps:
- Substitute the slope for m and the point's coordinates for x and y.
- Solve the resulting equation for b.
- Write the final equation with m and b.
For example, find the line with slope 3/4 through (5, 2).
- Substitute: 2 = (3/4)(5) + b.
- Solve: b = 2 − 15/4 = 8/4 − 15/4 = −7/4.
- Write: y = (3/4)x − 7/4.
Nothing here is conceptually hard, but there are several places to slip. You must multiply a fraction by an integer, subtract fractions with different denominators, and keep track of signs. The computed b is then an intermediate number that is not part of what the problem told you.
The following program does the same arithmetic. It uses Python's Fraction type so the results stay exact instead of turning into rounded decimals.
from fractions import Fraction
def intercept_from_point(m, x1, y1):
"""Return b so that y = m*x + b passes through (x1, y1)."""
m, x1, y1 = Fraction(m), Fraction(x1), Fraction(y1)
return y1 - m * x1
print(intercept_from_point(Fraction(3, 4), 5, 2)) # -7/4
print(intercept_from_point(Fraction(-5, 6), 8, -3)) # 11/3
print(intercept_from_point(Fraction(-2, 3), 4, -5)) # -7/3All three intercepts are fractions, even though every input was a small whole number or a simple fraction. This is typical. When the slope is not an integer, the y-intercept usually is not one either.
Shortfall 2: the intercept can be far from the data
The y-intercept is the value of y at x = 0. In many real situations, x = 0 is outside the range where the data lives, or does not make sense at all.
- A line models the cost of a taxi ride from distances between 2 and 15 kilometers. The y-intercept describes a ride of zero kilometers, which is a base fee, if there is one.
- A line models population from the years 2010 to 2020. The y-intercept describes the year 0, which is about 2,000 years away from your data.
When you build y = mx + b from a point near your data, you extrapolate back to x = 0 and then rely on that extrapolated b. Small errors in the slope get multiplied by a large x-distance. If the slope is 0.37 but the true value is 0.38, and your point sits at x = 2015, the computed b is off by about 20.15. The line is still nearly right near your data, but the stored b is badly off.
Point-slope form avoids this. It anchors the line at the known point, so the number that matters is the one you were actually given.
Shortfall 3: vertical lines cannot be written
Consider the two points (3, 1) and (3, 7). Both have x = 3. The run between them is 3 − 3 = 0, so the slope formula divides by zero:
m = (7 − 1) / (3 − 3) = 6 / 0
The slope is undefined, so there is no m to put in y = mx + b. The line is perfectly ordinary: it is the set of all points with x = 3. But slope-intercept form has no way to say so.
from fractions import Fraction
def slope_intercept(p, q):
"""Return (m, b) for the line through p and q, or raise for a vertical line."""
(x1, y1), (x2, y2) = p, q
if x1 == x2:
raise ValueError(f"vertical line: x = {x1}")
m = Fraction(y2 - y1, x2 - x1)
b = y1 - m * x1
return m, b
print(slope_intercept((1, 3), (4, 9))) # (Fraction(2, 1), Fraction(1, 1))
try:
slope_intercept((3, 1), (3, 7))
except ValueError as err:
print(err) # vertical line: x = 3The first call gives m = 2 and b = 1, so the line is y = 2x + 1. The second call fails by design. Any program or method built only on y = mx + b needs a special case for vertical lines.
Standard form, Ax + By = C, has no such gap. The vertical line x = 3 is 1x + 0y = 3. A later chapter covers this case in full. For now, notice that the limitation belongs to slope-intercept form and not to the line.
Shortfall 4: many equations do not start in this form
Equations often arrive as Ax + By = C. Examples include budget constraints, mixture problems, and conversions between two quantities. Take the equation
2x + 3y = 6
To get slope-intercept form, you solve for y:
- Subtract 2x from both sides: 3y = −2x + 6.
- Divide every term by 3: y = −(2/3)x + 2.
Now you can read the slope, −2/3, and the intercept, 2. The conversion introduces a fraction that was not in the original equation. For 5x + 7y = 1, the conversion gives y = −(5/7)x + 1/7, and now both the slope and the intercept are fractions.
The original form had integer coefficients and no fractions, which is easier to check and to compare. Converting loses that tidiness. It also hides the intercepts on the x-axis, which you can read from the original form by setting y = 0. Standard form is a better fit for this kind of data.
Summary table
| Situation | Slope-intercept form | What works better |
|---|---|---|
| Given slope and y-intercept | Direct, no work | Slope-intercept |
| Given slope and a point not on the y-axis | Must solve for b first | Point-slope |
| Given two points | Compute m, then solve for b | Point-slope, using either point |
| Line is vertical | Cannot be written | Standard form, x = c |
| Equation is given as Ax + By = C | Must rearrange, often creates fractions | Standard form |
| Data far from x = 0 | b is an extrapolation | Point-slope |
How to decide, step by step
The next diagram shows the decision you would make when asked to write a line's equation. The question is what information the problem gives you.
You do not have to follow this diagram rigidly. It shows which form asks the least work for each kind of input.
Common errors when forcing slope-intercept form
These errors happen when students use y = mx + b even though another form fits better.
- Substituting the point into the wrong place. When solving for b, the point's x-value goes into x and its y-value goes into y. Putting the y-value where m belongs, or using the point as (0, b), gives a wrong line.
- Sign errors with negative slopes. For slope −5/6 through (8, −3), b = −3 − (−5/6)(8) = −3 + 20/3 = 11/3. Dropping the double negative gives −29/3, which is wrong.
- Rounding b early. If b is 11/3 and you write 3.67, the equation passes only near the point and not through it. Substituting the original point will not give a true statement.
- Reporting a vertical line as "no equation". The line exists. Write it as x = c.
- Assuming the y-intercept is meaningful. It is only a number the line passes through at x = 0. In a model, it may not describe anything real.
A preview of the alternative
Point-slope form removes the need to compute b. For slope 3/4 through (5, 2), you write the equation directly from the given numbers:
y − 2 = (3/4)(x − 5)
To check this line, put x = 5 on the right side: (3/4)(0) = 0, so y − 2 = 0 and y = 2. The point is on the line without any arithmetic. You can expand the equation later if you need y = mx + b.
Exercises
Exercise
A line has slope −5/6 and passes through (8, −3). Find b so the line can be written as y = mx + b, then check your answer by substituting the point.
Show answer
Substitute: −3 = (−5/6)(8) + b, so −3 = −20/3 + b. Then b = −3 + 20/3 = −9/3 + 20/3 = 11/3. The line is y = −(5/6)x + 11/3. Check: at x = 8, −(5/6)(8) + 11/3 = −20/3 + 11/3 = −9/3 = −3. ✓
Exercise
Explain why the line through (3, 1) and (3, 7) cannot be written as y = mx + b, and give an equation that does describe it.
Show answer
Both points have x = 3, so the run is 0 and the slope 6/0 is undefined. Without a slope there is no m. Every point on the line has x = 3, so the line is x = 3, which in standard form is 1x + 0y = 3.
Exercise
Rewrite 5x + 7y = 1 in slope-intercept form. Which coefficients become fractions, and which form is neater for this equation?
Show answer
Subtract 5x: 7y = −5x + 1. Divide by 7: y = −(5/7)x + 1/7. Both the slope and the intercept become fractions. The original standard form has integer coefficients only, so it is neater to store and to check.