two-point straight line equation calculator
the two-point formula is a formula for solving straight line equations in a two-dimensional coordinate system. it is an important concept in the straight line theory of analytical geometry.
the straight line l passes through two points p1(x1,y1)p2(x2,y2)(x1≠x2). so its slope k=(y2-y1)/(x2-x1), substitute 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).
derivation process
if x1=x2, we know that p1p2 is perpendicular to the x-axis, and the equation of the straight line l at this time is x=x1
if y1=y2, we know that p1p2 is perpendicular to the y-axis, and the equation of the straight line l at this time 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), sort out (y-y1)/(y2-y1)=(x-x1)/(x2-x1).