Distance Between Parallel Lines and Point of Intersection
17.7
Distance Between Parallel Lines and Point of Intersection
Once we know that ax2+2hxy+by2+2gx+2fy+c=0 represents a genuine pair of straight lines (via the condition of the previous section), two further practical questions arise: if the two lines are parallel, how far apart are they; and if they intersect, where exactly do they meet?
Distance between parallel lines. Two lines are parallel exactly when they share the same homogeneous (degree-2) part, i.e. when h2=ab, so we may write them as lx+my+c1=0 and lx+my+c2=0 for the same l,m but different constants c1,c2. Their product is
so matching coefficients, a=l2, b=m2, 2g=l(c1+c2), c=c1c2. The distance between the two parallel lines is the standard formula l2+m2∣c1−c2∣. To express ∣c1−c2∣ via a,g,c, use (c1−c2)2=(c1+c2)2−4c1c2=l24g2−4c=a4(g2−ac) (since l2=a), so ∣c1−c2∣=2ag2−ac. Since l2+m2=a+b, the distance becomes
d=a+b2(g2−ac)/a=2a(a+b)g2−ac.
As a worked check, 4x2+12xy+9y2−10x−15y+4=0 has a=4,h=6,b=9 (indeed h2=36=ab, confirming parallel lines), g=−5,c=4, giving d=24×1325−16=2529=13313 — matching the direct computation from the factored lines 2x+3y−1=0 and 2x+3y−4=0.
Point of intersection. When the lines are not parallel (h2=ab), their point of intersection is found using elementary calculus: the point where two linear factors meet is where both partial derivatives of the quadratic expression vanish simultaneously. Differentiating ax2+2hxy+by2+2gx+2fy+c with respect to x and to y and setting each to zero gives
ax+hy+g=0,hx+by+f=0,
a pair of simultaneous linear equations solved by Cramer's rule:
x=ab−h2hf−bg,y=ab−h2gh−af.
For example, x2−y2−x+5y−6=0 has a=1,h=0,b=−1,g=−21,f=25; solving x−21=0 and −y+25=0 gives the intersection point (21,25), which indeed satisfies both factored lines x−y+2=0 and x+y−3=0. …