Algebra - Using slope and point-slope equations
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:
Now, I should point out that it makes absolutely no difference which of the points you pick as x1 and y1 and x2 and y2. 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 x1 and y1, or we could say the second point (-1,-1) is x1 and y1. It makes no difference. So let’s just go with the traditional method and say (2,5) is x1 and y1. So plugging into our slope equation, we get:
-1 – 5 = -6 = 2
y – y1 = m(x – x1).
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 x1 and y1:
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
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!