Ok, so your teacher gives you the two points on the coordinate plane (2,5) and (-1,-1) and asks you to find the equation of the line that passes through those two points. Do what??? Ok, it's really not a big deal. We just need two equations: the equation for the slope of a line, and the point-slope equation. So here we go, the first thing we're going to do is find the slope using both points. The equation for the slope (written as "m" in algebra) of any line on the coordinate plane is:

__y__

_{2}– y_{1}_{2}– x

_{1}

Now, I should point out that it makes absolutely no difference which of the points you pick as x_{1} and y_{1} and x_{2} and y_{2}. You will get the exact same answer if you switch your points around (try it and see for yourself)!
So in our example above, we could say the first point (2,5) is x_{1} and y_{1}, or we could say the second point (-1,-1) is x_{1} and y_{1}. It makes no difference. So let’s just go with the traditional method and say (2,5)
is x_{1} and y_{1}. So plugging into our slope equation, we get:

__-1 – 5__ = __-6__ = 2

y – y_{1} = m(x – x_{1}).

So here, since we have already calculated the slope (or “m”), all we have to do is plug in one of our original points, and we’ll be left with the familiar form y = mx + b. Again it doesn’t matter which point, but let’s take our first point again and plug
in for x_{1} and y_{1}:

y – 5 = 2(x – 2)

Distributing the 2, we get:

y – 5 = 2x – 4

Now using basic algebra manipulation, let’s add 5 to both sides of the equation to get y by itself:

y – 5 = 2x – 4

+5 +5

y = 2x + 1, and there is our final answer for writing the equation of a line that passes through our original two points. Algebra is awesome!