SME
Grade 8 Math · Problem type

The equation from two points

Use this for “A line passes through (1, 3) and (2, 5). What is its equation?”

Chart

−6−5−4−3−2−1123456−6−5−4−3−2−1123456xyrun 2rise 4(0, 1)(2, 5)
y₂ = 2x₂ + 1
Slope m = 2: up 2 for every 1 across
Intercept b = 1: it crosses the y-axis at (0, 1)
y₂ = 2 × 2 + 1 = 5 when x₂ = 2
This is an example. Type your own values to start a new problem.
y
=
m
x
+
b
x₁
First x
example
y₁
First y
example
x₂
Second x
example
y₂
Second y
example

Formulas

m
=
(
y₂
−
y₁
)
÷
(
x₂
−
x₁
)
(slope
=
(second
y
−
first
y)
÷
(second
x
−
first
x))
2 = (5 − 3) ÷ (2 − 1)
b
=
y₁
−
m
×
x₁
(y-intercept
=
first
y
−
slope
×
first
x)
1 = 3 − 2 × 1

Assumptions

•
The slope is the change in y divided by the change in x between the two points.
•
Then b = y − m × x at either point: go back along the line to x = 0.
•
The equation is y = mx + b.

Step-by-step

WE KNOW
x₁ = 1 (first x), y₁ = 3 (first y), x₂ = 2 (second x), y₂ = 5 (second y)
FIND
slope (m), y-intercept (b)
Step 1 · Find slope (m)
Use m = (y₂ − y₁) ÷ (x₂ − x₁) (slope = (second y − first y) ÷ (second x − first x))
The rise over the run between the two points.
m
=
5 − 3
2 − 1
m
=
2
1
m
=
2
Step 2 · Find y-intercept (b)
Use b = y₁ − m × x₁ (y-intercept = first y − slope × first x)
From
the
first
point,
go
back
x₁
steps
of
the
slope
to
x
=
0.
b
=
3
−
2
×
1
b
=
3
−
2
b
=
1
Check
Put the numbers back in. Both sides should match.
2 = (5 − 3) ÷ (2 − 1) ✓
1 = 3 − 2 × 1 ✓
Topic check
See what you know: 5 questions on this topic
New questions each time. Pass to mark it complete.

Refresh

Nothing to review first. This is a starting point.

Related lessons

© 2026 SME. All rights reserved.