 So even though Descartes and Fermat were, in many senses, rivals, one result of their rivalry is a powerful method of solving many different types of problems by shifting between an algebraic and a geometric viewpoint. So let's take care of the easy cases first. We have the following result. Every linear equation in two variables corresponds to the graph of a straight line, and every straight line corresponds to a linear equation in two variables. So the problem is, given a line, how do we find its equation? Well, let's start off with a couple of simple cases. Let's find the equations for the vertical and horizontal lines through the point 5-3. So we know that the graph of x equals h is a vertical line through the point hk. So if we compare this result, then we might say that the vertical line through 5-3 has equation x equal to 5. Likewise, we know that the graph of y equals k is a horizontal line through hk. And so comparing our result, we might conclude that the horizontal line through 5-3 has the equation y equals 3. What if our line isn't vertical or horizontal? To write the equation of any other line, we'll rely on a useful property. The slope of a line is the same regardless of which points on the line are used to calculate it. So how can we use this result? Well, let's try to write the equation of a line through the points 2, 5, and 1-3. So remember, the slope of a line is the same regardless of which points on the line are used to calculate it. So we want to find an equation involving the coordinates x, y of any point on the line. So one thing we might note is that the slope between the point 2, 5 and x, y will be the difference in the y values, y minus 5, over the difference in the x values, x minus 2. Well, what about the slope between the point 1, 3 and x, y? So I can calculate that slope as well. And at this point, something that Descartes said is very useful to keep in mind. Any time we get two different expressions for the same thing, we can put them together to form an equation. So here we have an expression for the slope. Here we have an expression for the slope. Our theorem says that the slopes should be the same because therefore points on the same line. And so I can put the two expressions equal to each other and get an equation for the line. And again, if you're a politician, you can say, I've done something so I've solved the problem. But if you're a good human being or a mathematician, you might look at this and say, you know, while this is the equation of a line, it's not obviously a linear equation. And so the important question to ask is, can we do better? Well, let's think about that. Suppose a line passes between two known points. Then the slope of the line can be determined by formula. Since the slope of any two points is the same, then if x, y is any other point of the line, we have to have the slope between x, y and x1, y1 has to be equal to m. And so this gives us an equation and we can rearrange our terms slightly. We'll multiply both sides by the denominator x minus x1 to get rid of the fraction. And this gives us what's known as the point-slope form of a line. The equation of the line through x1, y1 with slope m is y minus y1 equals m times the quantity x minus x1. So let's try to find the equation of the line through the points 2, 5 and 1, 3, and then determine if the point 3, 8 is on the line. So first, we'll calculate the slope of the line, which works out to be 2. Now we can write the point-slope form of the line. We need to know the slope, got it, and we need to know a point on the line. And we can use either point. If we use the point 2, 5, we can substitute in our m, x1, and y1 values to obtain the equation of the line in point-slope form. So good organization is important, and we might want to say that we're writing the equation of the line with slope m equals 2 through the point 2, 5. And that equation will be y minus the y value equals m times x minus the x value. How can we determine if 3, 8 is on the line? So remember that every point on the line must satisfy the equation of the line, and any point that fails to satisfy the equation of the line is not on the line. So we'll see if 3, 8 satisfies the equation of the line. Substituting x equals 3, y equals 8 into our equation. And this statement is false. And since our statement is false, then 3, 8 is not on the line. Well, let's take another example to find the equation of the line through the points 5, 3, and 8, 3. So first we'll find the slope between the two points, which works out to be 0. So if we want to put our equation in point-slope form, we can use either point, so using 5, 3 as our point, we obtain the equation. And we can do a little bit of simplification here. This 0 times x minus 5 can be dropped out entirely. And while we could leave this in the form y minus 3 equals 0, let's go ahead and solve for y, getting y equals 3. There's actually a better solution. Unfortunately, it's easier. And while you might not want to do things the easy way, while you might insist on doing things the hard way, every now and then it's important to do things the easy way. So in particular, once we know the slope is m equals 0, then we know the line is horizontal, because the slope of a horizontal line is 0. But we know how to write the equation of a horizontal line. The graph of y equals k is a horizontal line through the point hk. Well, we do have to be a little bit careful. There are two points given here. So let's think about that. If we use the point 5, 3, we get the equation y equals 3. But what if we use the point 8, 3? Well, if we use the point 8, 3, we get the equation y equals 3. So maybe it doesn't actually matter which point we use. The importance of doing things the easy way once in a while is that sometimes you have to do things the easy way. So let's try to write the equation of this line. So we can calculate the slope of the line through the points. Except we can't because our denominator is 0 and our slope is undefined. And since the slope is undefined, we can't use the point slope form of the line. So we should consider what we know about lines with undefined slope. And what we know is that vertical lines have undefined slope. So since the slope is undefined, we know the line is vertical. Well, we do have an easy way of writing the equation for a vertical line. The graph of x equals h is a vertical line through hk. And again, we should be careful about which point we use. If we use the point 3, 5, we get the equation x equals 3. But if we use the point 3, 8, we get the equation x equals 3. Maybe we don't have to be too careful about the point. So since the slope is undefined, this means the line is vertical, so its equation is x equal to 3.