Sub topic 4
Slope-intercept, point-slope, and standard form
A line has one geometry but several algebraic descriptions. Slope-intercept, point-slope, and standard form each make a different fact easy to see. Later chapters need all three. You test parallel and perpendicular lines by comparing slopes. You write a new line from a point and a slope. The distance formula starts from a line in standard form.
This chapter assumes you can solve linear equations in one variable, do fraction arithmetic, and compute a slope from two points as the rise over the run.
The three forms at a glance
| Form | Equation | What it shows directly | Weakness |
|---|---|---|---|
| Slope-intercept | y = mx + b | Slope m and y-intercept b | Cannot describe vertical lines |
| Point-slope | y - y₁ = m(x - x₁) | Slope m and one known point (x₁, y₁) | Not unique, since any point on the line works |
| Standard | Ax + By = C | Both intercepts, and integer coefficients | Slope is hidden: m = -A/B |
All three describe the same set of points. Choosing a form is a matter of what you know and what you need next.
Slope-intercept form
In y = mx + b, m is the slope and b is the y-intercept. At x = 0 the equation gives y = b, so the line crosses the y-axis at (0, b).
For y = -2/3 x + 4, the line crosses the y-axis at (0, 4). From there, each step of 3 to the right takes you 2 down.
This form is the fastest way to compare slopes. If two lines are both written as y = mx + b, you can read the slopes at a glance. It fails for vertical lines such as x = 5, because no value of m fits. Those are covered in a later chapter.
Point-slope form
Suppose a line has slope m and passes through (x₁, y₁). Take any other point (x, y) on the line. The slope between the two points must equal m:
(y - y₁) / (x - x₁) = m
Multiply both sides by (x - x₁) and you get point-slope form:
y - y₁ = m(x - x₁)
This is the form you use when you know a point and a slope but not the intercept. That is exactly the situation when you write a parallel or perpendicular line through a given point.
Example: a line has slope 2 and passes through (4, 3).
- Substitute: y - 3 = 2(x - 4).
- Distribute: y - 3 = 2x - 8.
- Add 3 to both sides: y = 2x - 5.
The y-intercept is -5. You did not need to know it in advance.
Standard form
Standard form writes the line as Ax + By = C. The usual conventions are that A, B, and C are integers with no common factor, and that A is not negative. Some courses and the distance formula later in this tutorial use the equivalent Ax + By + C = 0, where C has moved to the left side and changed sign.
Standard form has three practical uses:
- It describes every line, including vertical ones. The line x = 5 is 1x + 0y = 5.
- It gives intercepts quickly. Set y = 0 to get the x-intercept C/A. Set x = 0 to get the y-intercept C/B.
- It keeps coefficients as integers, which avoids fractions in later arithmetic.
Its drawback is that the slope is not visible. To find it, solve for y:
Ax + By = C By = -Ax + C y = (-A/B)x + C/B
So the slope is -A/B and the y-intercept is C/B, provided B ≠ 0. If B = 0, the line is vertical.
Converting between forms
Each conversion is a few steps of algebra. The diagram shows which direction each one goes.
Standard form to slope-intercept form
Convert 2x + 3y = 12.
- Subtract 2x from both sides: 3y = -2x + 12.
- Divide every term by 3: y = -2/3 x + 4.
The slope is -2/3, which matches -A/B = -2/3. The y-intercept is 4, which matches C/B = 12/3.
Point-slope form to standard form
Start from y - 3 = 2(x - 4), which simplifies to y = 2x - 5.
- Move the x term to the left: -2x + y = -5.
- Multiply by -1 so that A is positive: 2x - y = 5.
The result has A = 2, B = -1, C = 5. B is allowed to be negative. Only A is required to be non-negative.
When fractions get in the way
Start with y = -2/3 x + 4 and convert to standard form.
- Move the x term: 2/3 x + y = 4.
- Multiply every term by 3 to clear the denominator: 2x + 3y = 12.
Multiply by the least common multiple of all the denominators. Multiplying only some of the terms changes the line.
Checking conversions in code
The functions below do the same conversions with exact fractions, so you can check your hand work. The second one clears denominators, divides out the common factor, and makes A non-negative.
import math
from fractions import Fraction
def standard_to_slope_intercept(A, B, C):
"""Return (m, b) for Ax + By = C, or None for a vertical line."""
if B == 0:
return None
return Fraction(-A, B), Fraction(C, B)
def point_slope_to_standard(m, point):
"""Return (A, B, C) for the line through point with slope m."""
x1, y1 = point
m = Fraction(m)
# y - y1 = m(x - x1) -> -m*x + y = y1 - m*x1
A, B, C = -m, Fraction(1), y1 - m * x1
scale = math.lcm(A.denominator, C.denominator)
A, B, C = (int(v * scale) for v in (A, B, C))
g = math.gcd(math.gcd(A, B), C)
A, B, C = A // g, B // g, C // g
if A < 0:
A, B, C = -A, -B, -C
return A, B, C
print(standard_to_slope_intercept(2, 3, 12))
print(point_slope_to_standard(2, (4, 3)))
print(point_slope_to_standard(Fraction(-2, 3), (3, 2)))The three lines print (Fraction(-2, 3), Fraction(4, 1)), then (2, -1, 5), then (2, 3, 12). Each matches a worked example above. The code needs Python 3.9 or later because it uses math.lcm.
Why the form matters for parallel and perpendicular lines
Each form gives a different shortcut for the tests in this tutorial.
- In slope-intercept form, parallel lines have the same m. The lines y = 2x + 1 and y = 2x - 5 are parallel because both have slope 2.
- In standard form, compute the slope as -A/B for each line before comparing. The lines 2x + 3y = 12 and 4x + 6y = 7 both have slope -2/3, so they are parallel.
- Lines with the same A and B but different C are always parallel. This is the setup for the distance-between-parallel-lines formula.
- In standard form, a line perpendicular to Ax + By = C has the form Bx - Ay = D for some constant D. For 2x + 3y = 12, a perpendicular line is 3x - 2y = D. Check the slopes: the first is -2/3, the second is 3/2, and the product is -1.
- Point-slope form is the quickest way to build a new line. Once you know the slope (the same for a parallel line, the negative reciprocal for a perpendicular one) and the given point, you can write the equation without finding b first.
The perpendicular shortcut works because swapping the coefficients and changing one sign inverts and negates the slope. The next chapters justify the slope rules geometrically.
Edge cases and common errors
- Dividing by B when B = 0. The formula m = -A/B fails for vertical lines. Check B first.
- Horizontal lines. If A = 0, the line is By = C, which is y = C/B. The slope is 0, and the slope-intercept form is y = b with m = 0.
- Forgetting to multiply every term. When clearing fractions or multiplying by -1, apply the factor to both sides, including terms without fractions.
- Different-looking equations for the same line. The equations 2x + 3y = 12 and 4x + 6y = 24 are the same line. Before concluding that two lines are different, reduce both to a common form.
- Mixing up the roles of (x₁, y₁) and (x, y). In point-slope form, (x₁, y₁) is the fixed known point, and x and y stay as variables.
- Assuming the intercept is a point. The y-intercept is the number b, and the point is (0, b). The x-intercept of Ax + By = C is the point (C/A, 0), which exists only if A ≠ 0.
Exercises
Exercise
Write the line with slope -3 that passes through (-2, 5) in point-slope form, then in slope-intercept form.
Show answer
Point-slope form: y - 5 = -3(x + 2). Distribute: y - 5 = -3x - 6. Add 5: y = -3x - 1. The slope is -3 and the y-intercept is -1.
Exercise
Convert 4x - 6y = 9 to slope-intercept form. Then say whether it is parallel to the line 2x - 3y = 1.
Show answer
Solve for y: -6y = -4x + 9, so y = (2/3)x - 3/2. The slope is 2/3. For 2x - 3y = 1, the slope is -2/-3 = 2/3. The slopes are equal and the y-intercepts differ (-3/2 and -1/3), so the lines are parallel and distinct.
Exercise
A line has slope 3/4 and passes through (8, -1). Write its equation in standard form with integer coefficients, A non-negative, and no common factor.
Show answer
Point-slope form: y + 1 = (3/4)(x - 8). Multiply by 4: 4y + 4 = 3x - 24. Rearrange to put x and y on the left: -3x + 4y = -28. Multiply by -1 so A is positive: 3x - 4y = 28.
Exercise
Without converting to slope-intercept form, write a line in standard form that is perpendicular to 5x + 2y = 10. Verify with slopes.
Show answer
Swap the coefficients and change one sign: 2x - 5y = D, for any constant D, for example 2x - 5y = 0. The original slope is -5/2. The new slope is -2/(-5) = 2/5. The product is (-5/2)(2/5) = -1, so the lines are perpendicular.