First find the slope between any two points:

Where

are the two points
So calculating the slope:

So the slope is

And our equation will be in the format of

where

and

So, now we have half of the equation:

Now to calculate b, we can plug in a point

and solve for b.
So

Lets use the point

So:

And then:

So our final equation is
