List of formulas related to Analytic-geometry (Line in 2D)
Line forms
Slope y-intercept form:
y=mx+bTwo point form:
y−y1=y2−y1x2−x1(x−x1)Point slope form:
y−y1=m(x−x1)Intercept form:
xa+yb=1 , (a,b≠0)Normal form:
x⋅cosΘ+y⋅sinΘ=pParametric form:
x=x1+t⋅cosαy=y1+t⋅sinαPoint direction form:
x−x1A=y−y1Bwhere (A,B) is the direction of the line and P1(x1,y1) lies on the line. General form:
Ax+By+C=0 , (A≠0 or B≠0)Distance
The distance from Ax+By+C=0 to P1(x1,y1) is
d=|Ax1+By1+C|√A2+B2Concurrent lines
Three lines
A1x+B1y+C1=0A2x+B2y+C2=0A3x+B3y+C3=0are concurrent if and only if:
|A1B1C1A2B2C2A3B3C3|=0Line segment
A line segment P1P2 can be represented in parametric form by
x=x1+(x2−x1)ty=y1+(y2−y1)t0≤t≤1Two line segments P1P2 and P3P4 intersect if any only if the
s=|x2−x1y2−y1x3−x1y3−y1||x2−x1y2−y1x3−x4y3−y4| and t=|x3−x1y3−y1x3−x4y3−y4||x2−x1y2−y1x3−x4y3−y4|satisfy | 0≤s≤1 | and | 0≤t≤1 |