Distance between two straight lines

The distance between two straight lines, r and s, is the minimal distance between any point of r and any point of s.

  • If the straight lines are secant or coincidental, their distance is obviously zero. Namely d(r,s)=0.
  • If the straight lines are parallel, the distance between r and s is the distance from a point of any of both straight lines to any other.

To find the analytical expression of the distance from r to s, we will suppose that we have r:Ax+By+C=0 and s:Ax+By+C=0. As the straight lines need to have parallel director vectors, we can suppose that they do have the same, which is why A=A and B=B.

As the straight lines cannot be coincidental, we will obviously have CC.

Let P=(p1,p2) now be a point belonging to the straight line r. Then we have: d(r,s)=d(P,s)=|Ap1+Bp2+C|A2+b2 But since P belongs to the straight line r we have Aa1+Ba2+C=0Aa1+Ba2=C substituting, d(r,s)=d(P,S)=|CC|A2+B2

Example

Calculate the distance between the straight lines r:2x+3y4=0 and s:4x6y+24=0.

To begin, we divide the equation of the straight line s by 2: s:2x+3y12=0 Now we are in condition to apply the formula: d(r,s)=d(P,s)=|CC|A2+b2=|4(12)|22+32=813