Two-point Line Equation Calculator
The two-point form is a formula for solving the equation of a line in a two-dimensional coordinate system and is an important concept in the theory of lines in analytic geometry.
Line l passes through two points P1(x1,y1)P2(x2,y2)(x1≠x2). So its slope k=(y2-y1)/(x2-x1). Substituting into the point-slope formula, we get y=k·(x-x1)+y1, so the two-point formula is (y-y2)/(y1-y2) = (x-x2)/(x1-x2).
The derivation process
If x1=x2, we know that p1p2 is perpendicular to the x-axis, and the equation of the line l is x=x1
If y1=y2, we know that p1p2 is perpendicular to the y-axis, and the equation of the line l is y=y1
Suppose p(x, y)x is any point different from p1 and p2. Since p, p1 and p2 are all on the straight line l, then kpp1=kp1p2, that is, (y-y1)/(x-x1)=(y2-y1)/(x2-x1), and rearranging it to get (y-y1)/(y2-y1)=(x-x1)/(x2-x1).