Sub topic 11
Converting from standard form to slope-intercept form
This chapter assumes you can solve two-step linear equations, work with signed numbers and fractions, and read slope and y-intercept from y = mx + b. The goal is a reliable procedure for turning an equation written as Ax + By = C into y = mx + b, so you can graph the line, compare it to other lines, or interpret it in context.
Why two forms exist
Standard form is Ax + By = C, where A, B, and C are usually integers and A is usually not negative. People like it because it has no fractions to carry around, and it makes it easy to find both intercepts. It also handles situations where two quantities are combined, such as "2 adult tickets and 3 child tickets cost $6 in total" (in smaller units).
The drawback is that standard form hides the slope and the y-intercept. Slope-intercept form, y = mx + b, shows both at a glance. Conversion is just solving the equation for y.
| Feature | Standard form Ax + By = C | Slope-intercept form y = mx + b |
|---|---|---|
| Slope visible | No | Yes, m |
| y-intercept visible | No | Yes, b |
| Fractions needed | Rarely | Often |
| Can describe a vertical line | Yes (B = 0) | No |
The last row matters. Every line can be written in standard form, but vertical lines have no slope-intercept form. A conversion procedure therefore has to check for that case first.
The procedure
Start with Ax + By = C and isolate y in two steps.
- Subtract Ax from both sides: By = -Ax + C.
- Divide every term on both sides by B: y = (-A/B)x + C/B.
Comparing with y = mx + b gives a shortcut:
- The slope is m = -A/B.
- The y-intercept is b = C/B.
Two details cause most of the errors. In step 2, you must divide every term by B, including -Ax and C. In step 1, the x-term changes sign when it moves across the equals sign, so the slope has the opposite sign of A/B.
Worked examples
Example 1: a positive B
Convert 2x + 3y = 6.
- Subtract 2x: 3y = -2x + 6.
- Divide every term by 3: y = (-2/3)x + 2.
The slope is -2/3 and the y-intercept is 2. The line falls as x increases, which matches the negative sign.
Example 2: a negative B
Convert 4x - 2y = 8.
- Subtract 4x: -2y = -4x + 8.
- Divide every term by -2: y = 2x - 4.
Here B is -2, so the formula gives m = -4/(-2) = 2 and b = 8/(-2) = -4. The two negatives cancel in the slope. When B is negative, the slope has the same sign as A, and the intercept has the opposite sign of C.
Example 3: a result with fractions
Convert x + 4y = 10.
- Subtract x: 4y = -x + 10.
- Divide every term by 4: y = (-1/4)x + 10/4, which simplifies to y = (-1/4)x + 5/2.
Leave the intercept as the fraction 5/2 (or write 2.5). Do not round it to a decimal like 2.5 if you plan to keep computing with it and the exact value matters, because a fraction such as 1/3 has no exact decimal form.
Example 4: a coefficient that does not divide evenly
Convert 3x - 5y = 15.
- Subtract 3x: -5y = -3x + 15.
- Divide every term by -5: y = (3/5)x - 3.
The slope 3/5 means rise 3, run 5. The y-intercept is -3, so the line crosses the y-axis at (0, -3).
Checking your answer
A conversion produces an equivalent equation, so any point on the new line must satisfy the original. Pick an easy x-value, compute y from your result, and substitute both into the standard form.
For Example 1, y = (-2/3)x + 2 at x = 3 gives y = -2 + 2 = 0. Then 2(3) + 3(0) = 6, which matches C. The check also confirms the intercept: at x = 0 the standard form gives 3y = 6, so y = 2.
A second quick check uses the intercepts. In standard form, setting x = 0 gives the y-intercept C/B, and setting y = 0 gives the x-intercept C/A. If your slope-intercept form does not pass through (0, C/B), you made an error.
Special cases
A = 0: horizontal lines
If A = 0, the equation becomes By = C, so y = C/B. The slope is -0/B = 0 and the line is horizontal. For example, 0x + 2y = 6 is usually written 2y = 6, which gives y = 3. In y = mx + b form this is y = 0x + 3.
B = 0: vertical lines
If B = 0, the equation becomes Ax = C, so x = C/A. You cannot divide by B = 0, and a vertical line has undefined slope. For 5x = 10, the line is x = 2. It has no slope-intercept form, and it has no y-intercept either unless the line is the y-axis itself (C = 0), where every point is on the line.
C = 0: lines through the origin
If C = 0, then b = 0. For example, 3x + 2y = 0 gives 2y = -3x, so y = (-3/2)x. The line passes through (0, 0).
Non-integer coefficients
Sometimes you see equations such as x/2 + y/3 = 1. Either convert directly (y/3 = -x/2 + 1, then multiply by 3 to get y = -3x/2 + 3) or clear fractions first by multiplying every term by the common denominator 6, giving 3x + 2y = 6. Both routes give y = (-3/2)x + 3.
Automating the conversion
The function below applies the formulas m = -A/B and b = C/B using exact fractions, and rejects the vertical case.
from fractions import Fraction
def standard_to_slope_intercept(A, B, C):
if B == 0:
raise ValueError("B = 0 gives a vertical line x = C/A")
return Fraction(-A, B), Fraction(C, B)
def check_point(A, B, C, x):
m, b = standard_to_slope_intercept(A, B, C)
y = m * x + b
return y, A * x + B * y == C
for A, B, C in [(2, 3, 6), (4, -2, 8), (1, 4, 10), (3, -5, 15)]:
m, b = standard_to_slope_intercept(A, B, C)
y, ok = check_point(A, B, C, 5)
print(f"{A}x + {B}y = {C} -> m = {m}, b = {b}, point (5, {y}) on line: {ok}")Running it prints:
2x + 3y = 6 -> m = -2/3, b = 2, point (5, -4/3) on line: True
4x + -2y = 8 -> m = 2, b = -4, point (5, 6) on line: True
1x + 4y = 10 -> m = -1/4, b = 5/2, point (5, 5/4) on line: True
3x + -5y = 15 -> m = 3/5, b = -3, point (5, 0) on line: TrueUsing Fraction instead of floating-point division keeps the results exact, so the equality test A * x + B * y == C is reliable. With floats, a value such as -2/3 cannot be stored exactly, and the comparison can fail by a tiny rounding error.
Common errors
| Error | Example | Correction |
|---|---|---|
| Forgetting to change the sign of the x-term | From 2x + 3y = 6, writing 3y = 2x + 6 | Subtracting 2x gives 3y = -2x + 6 |
| Dividing only one term by B | 3y = -2x + 6 becomes y = -2x + 2 | Divide -2x by 3 as well: y = (-2/3)x + 2 |
| Losing the sign when B is negative | -2y = -4x + 8 becomes y = -2x + 4 | Divide by -2: y = 2x - 4 |
| Reading the slope as A/B | Taking 2/3 as the slope of 2x + 3y = 6 | The slope is -A/B = -2/3 |
| Reading the intercept as C | Taking 6 as the y-intercept of 2x + 3y = 6 | The intercept is C/B = 2 |
| Converting a vertical line | Trying to solve 5x = 10 for y | There is no y to solve for; the line is x = 2 |
Using the result
Once the equation is in y = mx + b form, the earlier tools apply directly.
- To graph, plot (0, b) and use the slope as rise over run to find a second point.
- To compare lines, compare slopes. The lines 2x + 3y = 6 and 2x + 3y = 12 both have slope -2/3 and different intercepts (2 and 4), so they are parallel. In general, lines with the same A and B and different C are parallel.
- To test for perpendicular lines, multiply the slopes. The slopes of perpendicular lines multiply to -1. The line 3x - 2y = 4 has slope 3/2, and 2x + 3y = 9 has slope -2/3. Since (3/2)(-2/3) = -1, they are perpendicular.
- To interpret a situation, treat m as the rate of change and b as the starting value. If 5x + y = 40 describes the money y left after buying x items, then y = -5x + 40, so each item costs 5 and you began with 40.
Exercises
Exercise
Convert 6x + 2y = 10 to slope-intercept form and state the slope and y-intercept.
Show answer
Subtract 6x: 2y = -6x + 10. Divide every term by 2: y = -3x + 5. The slope is -3 and the y-intercept is 5.
Exercise
Convert 5x - 4y = 12 to slope-intercept form. Then check the result with x = 4.
Show answer
Subtract 5x: -4y = -5x + 12. Divide every term by -4: y = (5/4)x - 3. At x = 4, y = 5 - 3 = 2. Substituting into the original gives 5(4) - 4(2) = 20 - 8 = 12, which matches C.
Exercise
Explain why 3x = 9 has no slope-intercept form, and write the line in a form that does describe it.
Show answer
Here B = 0, so there is no y-term to isolate and the slope formula -A/B would divide by zero. The equation simplifies to x = 3, a vertical line through (3, 0) with undefined slope.
Exercise
The lines 4x + 6y = 5 and 2x + 3y = 11 are given. Without converting both fully, decide whether they are parallel, perpendicular, or neither. Then confirm by computing both slopes.
Show answer
The slope of the first is -4/6 = -2/3. The slope of the second is -2/3. The slopes are equal and the y-intercepts differ (5/6 and 11/3), so the lines are parallel.
Exercise
A phone plan is modeled by 2y - 30x = 40, where y is the total cost in dollars after x months. Convert to slope-intercept form and interpret m and b.
Show answer
Add 30x: 2y = 30x + 40. Divide by 2: y = 15x + 20. The slope 15 is the monthly cost in dollars, and the intercept 20 is a one-time starting charge paid before any months pass.