Steply

Line (1, 2) (3, 8)

Step by step, with the reason for every step · Equation of a line through two points · Algebra 1

Step by step

The question

Question: find the equation of the line through (1, 2) and (3, 8).

(1, 2) and (3, 8)

Every line that is not straight up and down is y = mx + b.

m is the slope.

b is where the line crosses the y-axis: where we start.

So we need m and b.

y = mx + b
m = slope
b = start

1 Find the slope

We call the slope m.

m = rise over run.

m = riserun

The top is the change in y: second y minus first y.

The bottom is the change in x: second x minus first x.

m = y2 − y1x2 − x1

Put the numbers in.

The second point is (3, 8).

The first point is (1, 2).

m = 8 − 23 − 1

8 minus 2 is 6.

3 minus 1 is 2.

m = 62

6 divided by 2 is 3.

So m = 3.

m = 3

2 Find b

In y = mx + b, put m = 3.

Then use the point (1, 2): put x = 1 and y = 2 in.

2 = 3 × 1 + b

3 times 1 is 3.

2 = 3 + b

We want b by itself.

The 3 is in the way.

To remove 3, we take away 3.

We do it on both sides, so they stay equal.

2 − 3 = 3 + b − 3

3 and − 3 make zero.

Cross them out.

2 minus 3 is −1.

So b = −1.

−1 = b

3 Write the equation

Put m = 3 and b = −1 into y = mx + b.

So the line is y = 3x − 1.

y = 3x − 1

4 Check

Let's check: put x = 1 in.

We get 2, the y of (1, 2).

y = 3(1) − 1 = 3 − 1 = 2

Now x = 3 in.

We get 8, the y of (3, 8).

y = 3(3) − 1 = 9 − 1 = 8

Let's see it.

Both points are on the line y = 3x − 1.

And it crosses the y-axis at −1, just like b says.

Let's look back.

First: find the slope.

Then: find b.

Then: write the equation.

Last: check.

Answer
y = 3x − 1

Your turn

Try this one yourself, then check:

Find the equation of the line through (1, 2) and (3, 10)
Show the answer
y = 4x − 2

More from Equation of a line through two points

The whole lesson: Equation of a line through two points →