We can calculate the equation of a line, if we know what the slope is and one of the points.

Say we know what the value of the slope is, *m*. And we know the value of one of the points on the line (x_{1}, y_{1}). Then we can use the equation,

y - y_{1} = m(x - x_{1}) to give us an equation for the line, that would end up looking like,

y = mx + (some number)

Question: Find the equation for the line with the slope 3 and that passes through the point (1, 4).

We know two things from the question,

The slope of the line is 3

A point along that line is (1, 4)

We are looking for the equation of that line,

The equation y - y_{1} = m(x - x_{1}) can give us that equation,

m = 3

x_{1} = 1 and y_{1} = 4,

Subbing those values in,

y - 4 = 3(x - 1)

y - 4 = 3x -3

Add 4 to both sides,

y + 0 = 3x - 3 + 4

y = 3x + 1

There we have our equation for the line that has the slope of 3 and passes through the point (1, 4)

[for “fun” lets sub (1, 4) into our equation,

(4) = 3(1) + 1

4 = 3 + 1

4 = 4]

We can also find the equation for a line when we only know two points on the line.

[We will use the same equation as we did when we knew one point and the slope]

y - y_{1} = m(x - x_{1})

Say our two points on the line are *A*(x_{1}, y_{1}) and *B*(x_{2}, y_{2}), we can actually use either of those points and sub them into the equation above. However, we still need to calculate *m* (slope). Remember,

m =

change in y

change in x

=

Δ y

Δ x

=

y_{2} - y_{1}

x_{2} - x_{1}

So our first step to working out what the equation is will be calculating the slope. As we know two points on the line

*A*(x_{1}, y_{1}) and *B*(x_{2}, y_{2}) we can calculate the slope.

m =

y_{2} - y_{1}

x_{2} - x_{1}

Once we have the slope, *m*, sub that into,

y - y_{1} = m(x - x_{1})

Then solve by subbing in the values of either *A* or *B*. So our general equation for calculating an equation when we know two points of a line is

y - y_{1} = m(x - x_{1}), with m =

y_{2} - y_{1}

x_{2} - x_{1}

Question: Calculate the equation to the line with the points *M *(3, 7) and *N* (4, 8).

We know when working with two points to calculate the equation of the line that those two points lie on,

y - y_{1} = m(x - x_{1}), with m =

y_{2} - y_{1}

x_{2} - x_{1}

First, we need to calculate m,

So, with *M*(3, 7) as our first point, x_{1} = 3 and y_{1} = 7

And *N* (4, 8) as our second point, x_{2} = 4 and y_{2} = 8

So,

m =

y_{2} - y_{1}

x_{2} - x_{1}

m =

8 - 7

4 - 3

=

1

1

= 1

Now we have our slope, m = 1, this is only half of the work we need to do! Now we can sub this into,

y - y_{1} = m(x - x_{1}),

y - y_{1} = (1)(x - x_{1})

And now, sub in either our *M* or *N* point (both will work as the x_{1} and y_{1} we sub in can be any point on the line we are trying to calculate the equation for)

Lets choose *M*(3, 7), with x_{1} = 3 and y_{1} = 7,

y - 7 = (1)(x - 3)

y - 7 = x - 3

Add 7 to both sides,

y - 7 + 7 = x - 3 + 7

y = x + 4

And there we have our equation for the line with the two points *M* and *N* on it.