MathNana Learn with wisdom

Examples · Graphing

Slope Intercept Form Examples: 9 Worked Problems

Nine problems, each adding one new difficulty. The last two are the ones that come up in exams and catch people out.

7 min read Updated 2026-08-17 Checked by Aziza Smailovic

From two points

These slope intercept form examples all end in y = mx + b. The core skill is the same each time: find the slope, substitute one point, read off b, then check with the other point.

1. Through (0, 2) and (4, 0)worked example
  1. m = (0 − 2) ÷ (4 − 0) = −0.5rise over run
  2. 2 = −0.5(0) + bsubstitute (0, 2)
  3. y = −0.5x + 2b = 2, because that point was already on the y-axis
2. Through (1, 3) and (5, 11)worked example
  1. m = (11 − 3) ÷ (5 − 1) = 2the slope
  2. 3 = 2(1) + bsubstitute (1, 3)
  3. y = 2x + 1b = 1
3. Through (−2, 5) and (2, −3)worked example
  1. m = (−3 − 5) ÷ (2 − (−2))careful with the negatives
  2. m = −8 ÷ 4 = −2the run is 4, not 0
  3. y = −2x + 1substituting either point gives b = 1

From standard form

One rearrangement, with every term divided.

4. 3x + 2y = 12worked example
  1. 2y = −3x + 12subtract 3x
  2. y = −1.5x + 6divide all three terms by 2
5. 5x − y = 7worked example
  1. y = −5x + 7subtract 5x
  2. y = 5x − 7multiply through by −1

Parallel and perpendicular

Both start from a known line and one point.

6. Parallel to y = 3x − 4, through (2, 1)worked example
  1. m = 3parallel lines share a slope
  2. 1 = 3(2) + bsubstitute the point
  3. y = 3x − 5b = −5
7. Perpendicular to y = 2x + 1, through (4, 3)worked example
  1. m = −½the negative reciprocal of 2
  2. 3 = −½(4) + bsubstitute the point
  3. y = −½x + 5b = 5

The two special cases

These are the examples worth practising, because a formula applied blindly gets both wrong.

8. Through (1, 4) and (6, 4)worked example
  1. m = (4 − 4) ÷ (6 − 1) = 0no rise at all
  2. y = 4a horizontal line; the x term vanishes
9. Through (3, 1) and (3, 7)worked example
  1. run = 3 − 3 = 0division by zero
  2. x = 3a vertical line — no slope-intercept form exists

Example 9 has no y = mx + b answer at all, and saying so is the correct response. A calculator that returns infinity here is giving a wrong answer rather than a useful one.

Two more, from a graph and a table

Real questions do not always hand you two tidy coordinates.

10. From a table of valuesworked example
  1. x: 0, 1, 2, 3   y: 5, 8, 11, 14the table
  2. m = 3y rises by 3 each time x rises by 1
  3. y = 3x + 5b is the y value when x = 0, read straight off
11. From a graph crossing at (0, −2) and (3, 4)worked example
  1. b = −2read the y-intercept off the axis
  2. m = (4 − (−2)) ÷ 3 = 2rise over run to the second point
  3. y = 2x − 2no substitution needed

A table with evenly spaced x values is the easiest case of all: the constant difference in y is the slope, and the value at x = 0 is b.

Checking each answer

Substitute both original points back into the final equation. Both must satisfy it, and checking the point you did not use to find b is the check that actually tests anything.

ExampleEquationCheck with the unused point
2y = 2x + 12(5) + 1 = 11 ✓
3y = −2x + 1−2(2) + 1 = −3 ✓
4y = −1.5x + 63(0) + 2(6) = 12 ✓

Questions about slope intercept form examples

How do I find the equation of a line from two points?

Find the slope with (y₂ − y₁)/(x₂ − x₁), substitute either point into y = mx + b, and solve for b. Then check with the other point.

What is the equation of a horizontal line?

y = c, where c is the shared y value. The slope is zero, so the x term disappears entirely.

What if the two points have the same x value?

The line is vertical, its slope is undefined, and it is written x = a. There is no slope-intercept form for it.

How do I find a perpendicular line?

Take the negative reciprocal of the original slope, then substitute the given point to find the new b.