Write a line from conditions (two points / point+slope / table / parallel-perpendicular)
The rule. To write the equation of a line you need two things: its slope and its y-intercept. The slope might be given, or you find it from two points (change in y over change in x), or from a parallel line (same slope) or a perpendicular line (flip the slope and change its sign). Once you have the slope, plug one known point into y = mx + b and solve for b, the y-intercept. Then write the finished equation.
How to approach it
Start here. Look at what you are given: a slope, two points, a table, or a line to be parallel or perpendicular to.
Plan
- Find the slope — use it directly, compute it from two points, or flip-and-negate it for a perpendicular line.
- Substitute one known point and the slope into y = mx + b.
- Solve for b, the y-intercept.
- Write the equation as y = mx + b.
Work it
- Carry the signs through the substitution.
- Solve for b.
- If you started from point-slope form, distribute fully to finish.
Check yourself. Check that the line really passes through the given point by plugging that point back in and seeing that both sides match.
Worked examples
Worked example 1
Write the equation of the line with slope 3 that passes through the point (2, 7).
We know the slope is m = 3 and the line goes through (2, 7). We need the y-intercept b, then we can write y = 3x + b.
Plan
- Substitute the slope 3 and the point (2, 7) into y = mx + b.
- Solve the resulting equation for b.
- Write the final equation with the slope and b.
| y = mx + b | slope-intercept form |
| 7 = 3(2) + b | substitute m = 3 and the point (2, 7) |
| 7 = 6 + b | multiply |
| b = 1 | subtract 6 from both sides |
Check. The equation is y = 3x + 1. Testing the point: 3(2) + 1 = 7, which matches the given y-value, so the line passes through (2, 7).
Answer: y = 3x + 1
Worked example 2
Write the equation of the line through the points (-1, 4) and (3, -4).
We are given two points but no slope, so first we find the slope from them, then use one point to find the y-intercept b.
Plan
- Find the slope from the two points: change in y over change in x.
- Substitute the slope and one point into y = mx + b, and solve for b.
- Write the final equation.
| m = (-4 - 4)/(3 - (-1)) = (-8)/(4) = -2 | slope from the two points |
| 4 = -2(-1) + b | substitute m = -2 and the point (-1, 4) |
| 4 = 2 + b | multiply |
| b = 2 | subtract 2 from both sides |
Check. The equation is y = -2x + 2. Test the other point (3, -4): -2(3) + 2 = -4, which matches. Both points lie on the line.
Answer: y = -2x + 2
Common mistakes
Using the point's y-value as the intercept
- Has slope 3 and the point (2, 7).
- Writes y = 3x + 7, using the 7 from the point as the intercept.
- But the intercept b is not the point's y-value — it must be solved for.
- Fix: substitute (2, 7): 7 = 3(2) + b gives b = 1, so y = 3x + 1.
Sign or distribution slip
Distributes or handles a sign wrong when expanding point-slope form into y = mx + b, or when solving for b. Multiply the slope through every term inside the parentheses and keep track of negatives.
Wrong slope for parallel or perpendicular
Uses the same slope for a perpendicular line, or flips the slope without changing its sign, or changes the sign without flipping. Parallel lines share the slope; perpendicular slopes are negative reciprocals — flip and change the sign.
Related lessons
- Before this: Slope as ratio (rise/run, geometric)
- Before this: Forms of a line (slope-intercept, point-slope, standard)
- After this: Interpret slope & intercept of a linear model in context
Practice this until it sticks
The adaptive tutor has 5 practice questions on this skill, names the exact mistake when you miss one, and gives you a fresh problem to confirm the fix. It is part of the Digital SAT program: $59 once, 12 months of access, no renewal.
See the Digital SAT programEnroll