Sub topic 7
Converting Between Point-Slope, Slope-Intercept and Standard Forms
This chapter assumes you can plot points, find slope as rise over run, work with y = mx + b, solve a linear equation for one variable, and do arithmetic with fractions and negative numbers. Earlier chapters introduced point-slope form and standard form separately. Here you will move between all three forms, and you will learn to check each conversion.
One line, three descriptions
Each form describes the same set of points. The forms differ in which facts they show directly.
| Form | Template | Shows directly | Typical use |
|---|---|---|---|
| Point-slope | y - y1 = m(x - x1) | The slope and one point | Building an equation from given facts |
| Slope-intercept | y = mx + b | The slope and the y-intercept | Graphing, comparing slopes |
| Standard | Ax + By = C | Integer coefficients, easy intercepts | Intercepts, systems of equations |
A conversion changes only the form. If you end up with a different line, you made an error.
Point-slope to slope-intercept
Distribute m across the parentheses, then add y1 to both sides.
Start with y - 3 = 2(x - 1).
- Distribute: y - 3 = 2x - 2.
- Add 3 to both sides: y = 2x + 1.
Fractions and negative points need more care. Take y + 2 = -3/4(x - 8). The left side y + 2 means y1 = -2, because y - (-2) = y + 2.
- Distribute: y + 2 = -3/4x + 6.
- Subtract 2 from both sides: y = -3/4x + 4.
Check with the given point (8, -2). Then -3/4(8) + 4 = -6 + 4 = -2, which matches.
Slope-intercept to standard form
Standard form wants integer coefficients, with A non-negative and no common factor among A, B and C. Clear fractions by multiplying every term by the common denominator. Then move the x term to the left.
Continue with y = -3/4x + 4.
- Multiply every term by 4: 4y = -3x + 16.
- Add 3x to both sides: 3x + 4y = 16.
Here A = 3, B = 4 and C = 16. They share no common factor, and A is positive, so this is the final form.
Point-slope to standard form
You can skip slope-intercept form and go straight to standard form. Distribute, clear fractions, and collect x and y on the left.
Take y - 3 = 2(x - 1).
- Distribute: y - 3 = 2x - 2.
- Subtract 2x and add 3: -2x + y = 1.
- Multiply by -1 so that A is non-negative: 2x - y = -1.
Now take y - 1 = 1/2(x - 4).
- Multiply both sides by 2: 2y - 2 = x - 4.
- Move terms: -x + 2y = -2.
- Multiply by -1: x - 2y = 2.
The signs flip in the last step of each example. Multiplying every term by -1 keeps the line the same. Multiplying only some terms does not.
Standard form to slope-intercept
Solve Ax + By = C for y, which requires B ≠ 0.
- By = -Ax + C
- y = (-A/B)x + C/B
So the slope is -A/B and the y-intercept is C/B. The minus sign is the part people forget.
Take 5x - 2y = 10.
- Subtract 5x: -2y = -5x + 10.
- Divide by -2: y = 5/2x - 5.
The slope is 5/2, which equals -A/B = -5/(-2). The y-intercept is -5, which equals C/B = 10/(-2).
Standard form to point-slope
Point-slope form needs one point and the slope. Find the slope as -A/B, then choose any point on the line. Setting x = 0 or y = 0 usually gives an easy point.
For 5x - 2y = 10, set y = 0. Then 5x = 10, so x = 2, and the point is (2, 0). With slope 5/2:
y - 0 = 5/2(x - 2)
Point-slope form is not unique. Using the point (0, -5) instead gives y + 5 = 5/2(x - 0). Both equations describe the same line, and both simplify to y = 5/2x - 5.
Automating the conversions
The function below uses exact fractions, so no rounding error creeps in. It converts point-slope to standard form, converts standard form to slope-intercept form, and checks the result by substitution.
from fractions import Fraction
from math import gcd
def point_slope_to_standard(m, x1, y1):
"""Convert y - y1 = m(x - x1) to Ax + By = C with integer A, B, C and A >= 0."""
m, x1, y1 = Fraction(m), Fraction(x1), Fraction(y1)
# y - y1 = m(x - x1) -> -m*x + y = y1 - m*x1
a, b, c = -m, Fraction(1), y1 - m * x1
den = a.denominator * c.denominator
a, b, c = int(a * den), int(b * den), int(c * den)
g = gcd(gcd(a, b), c)
a, b, c = a // g, b // g, c // g
if a < 0 or (a == 0 and b < 0):
a, b, c = -a, -b, -c
return a, b, c
def standard_to_slope_intercept(a, b, c):
"""Return (m, b) for Ax + By = C. A vertical line (B = 0) has no such form."""
if b == 0:
raise ValueError(f"vertical line: x = {Fraction(c, a)}")
return Fraction(-a, b), Fraction(c, b)
A, B, C = point_slope_to_standard(2, 1, 3)
print(A, B, C) # 2 -1 -1
assert A * 1 + B * 3 == C # the original point (1, 3)
m, b = standard_to_slope_intercept(A, B, C)
print(m, b) # 2 1
m, b = standard_to_slope_intercept(5, -2, 10)
print(m, b) # 5/2 -5Running the file prints 2 -1 -1, then 2 1, then 5/2 -5. The first conversion reproduces the by-hand result 2x - y = -1. It then recovers y = 2x + 1.
Special cases: when a conversion fails
Two lines break the usual pattern.
- If A = 0, the standard form is By = C. The line is horizontal, y = C/B, and the slope is 0. Every form still works.
- If B = 0, the standard form is Ax = C. The line is vertical, x = C/A, and the slope is undefined. There is no slope-intercept form and no point-slope form.
Common errors and how to catch them
| Error | Example | Fix |
|---|---|---|
| Reading the sign of y1 wrongly | Treating y + 2 as y1 = 2 | Rewrite y + 2 as y - (-2) |
| Distributing to only one term | 2(x - 1) written as 2x - 1 | Multiply every term in the parentheses |
| Clearing fractions on only some terms | 4y = -3x + 4 instead of 16 | Multiply every term, including the constant |
| Leaving A negative | -2x + y = 1 | Multiply every term by -1 |
| Forgetting the minus in -A/B | Slope of 5x - 2y = 10 read as -5/2 | The slope is -A/B = 5/2 |
| Leaving a common factor | 4x + 6y = 12 | Divide by 2 to get 2x + 3y = 6 |
The most reliable check is substitution. Plug a known point into your final equation and confirm it is true. Then test a second point if you have one. Substitution does not prove the form is correct, but it catches almost every arithmetic slip. A wrong sign or a missed term will usually make the check fail.
For a stronger check, convert your answer into a second form and compare the slope. If the standard form gives -A/B equal to the original m, the slope survived the conversion.
Summary of the method
- Identify your starting form and your target form.
- Distribute and expand if you start from point-slope.
- Clear fractions by multiplying every term by the common denominator.
- Collect x and y on the left and the constant on the right for standard form. Solve for y for slope-intercept form.
- Make A non-negative and divide out any common factor.
- Substitute a known point to check.
Exercise
Write y + 1 = -2/3(x - 6) in standard form Ax + By = C, with integer coefficients and A non-negative. Then check the original point.
Show answer
Distribute: y + 1 = -2/3x + 4. Multiply every term by 3: 3y + 3 = -2x + 12. Move terms: 2x + 3y = 9. Here A = 2, B = 3 and C = 9, with no common factor. Check the point (6, -1): 2(6) + 3(-1) = 12 - 3 = 9, which equals C.
Exercise
Convert x - 3y = 9 to slope-intercept form. State the slope and the y-intercept, and say what happens if the equation were x = 9 instead.
Show answer
Subtract x: -3y = -x + 9. Divide by -3: y = 1/3x - 3. The slope is 1/3, which equals -A/B = -1/(-3), and the y-intercept is -3. If the equation were x = 9, then B = 0. The line is vertical, so it has no slope-intercept form and no point-slope form.