Step by step
The question
Question: find the equation of the line through (2, 2) and (4, 4).
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.
1 Find the slope
We call the slope m.
m = rise over run.
The top is the change in y: second y minus first y.
The bottom is the change in x: second x minus first x.
Put the numbers in.
The second point is (4, 4).
The first point is (2, 2).
4 minus 2 is 2.
4 minus 2 is 2.
2 divided by 2 is 1.
So m = 1.
2 Find b
In y = mx + b, put m = 1.
Then use the point (2, 2): put x = 2 and y = 2 in.
1 times 2 is 2.
We want b by itself.
The 2 is in the way.
To remove 2, we take away 2.
We do it on both sides, so they stay equal.
2 and − 2 make zero.
Cross them out.
2 minus 2 is 0.
So b = 0.
3 Write the equation
Put m = 1 and b = 0 into y = mx + b.
So the line is y = x.
4 Check
Let's check: put x = 2 in.
We get 2, the y of (2, 2).
Now x = 4 in.
We get 4, the y of (4, 4).
Let's see it.
Both points are on the line y = x.
And it crosses the y-axis at 0, just like b says.
Let's look back.
First: find the slope.
Then: find b.
Then: write the equation.
Last: check.