Math Playground
Algebra

Equations of a line

Slope-intercept, point-slope, two-point — every form for y = mx + b.

Lines have many equation forms — pick the one that matches what you know.

Drag the sliders
-8-426
y = m·x + b

Got a point and a slope? Use point-slope: y − y₁ = m(x − x₁), then expand to y = mx + b if you want slope-intercept form.

Your turn

Find the slope-intercept equation of the line through (2, 1) and (4, 7).

Recap
  • Slope-intercept y = mx + b: easiest to graph.
  • Point-slope y − y₁ = m(x − x₁): best when you know a point and the slope.
  • All forms describe the same line — convert freely.

Three common forms

  • Slope-intercept: y = mx + b — m is slope, b is y-intercept.
  • Point-slope: y − y₁ = m(x − x₁) — slope and one point.
  • Two-point: m = (y₂ − y₁)/(x₂ − x₁) — derive slope first.
Try it

Line through (1, 2) with slope 3

y − 2 = 3(x − 1) → y = 3x − 1.