Through two distinct points there is exactly one straight line1. Through a single point you can draw any number of lines, but the moment a second point is fixed the direction is settled and only one line survives. Here we find the line through and .
The slope measures how much increases while increases by . It is the difference in divided by the difference in .
Writing the line as and substituting gives , so . The line is therefore .
Let us check with the other point : , so the line does pass through . Substituting instead of to find the intercept gives the same ; either point will do.
| Form | Equation | This example |
|---|---|---|
| Slope-intercept | ||
| Point-slope | ||
| Two-point |
The point-slope form gives the equation immediately, with no intercept to compute. In the two-point form, each side measures the fraction of the journey from to already covered, vertically on the left and horizontally on the right, and on the line those two fractions always agree. All three rearrange to .
One case needs care: . If the two points share an -coordinate the denominator is and there is no slope. The line through them is vertical, and it cannot be written as at all; it is written . A line parallel to the -axis simply has no slope.
The same idea tests whether three points lie on one line: if the slope from to equals the slope from to , the three points are collinear. This routine, get the slope from two points and then build the equation through one of them, is the foundation for the intersection problems too.
The large dots on the graph are the two points and .