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$.

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 $C\neq C'$.

Let $P =(p_1,p_2)$ now be a point belonging to the straight line $r$. Then we have: $$\displaystyle d(r,s)=d(P,s)=\frac{|A\cdot p_1+B\cdot p_2+C'|}{\sqrt{A^2+b^2}}$$ But since $P$ belongs to the straight line $r$ we have $$A\cdot a_1+B\cdot a_2+C=0 \Leftarrow A\cdot a_1+B\cdot a_2=-C$$ substituting, $$d(r,s)=d(P,S)=\displaystyle \frac{|C'-C|}{\sqrt{A^2+B^2}}$$

Calculate the distance between the straight lines $r: 2x + 3y - 4 = 0$ and $s:-4x - 6y + 24 = 0$.

To begin, we divide the equation of the straight line $s$ by $-2$: $$s: 2x + 3y - 12 = 0$$ Now we are in condition to apply the formula: $$\displaystyle d (r, s) = d (P, s) =\frac{|C'-C|}{\sqrt{A^2+b^2}}=\frac{|-4-(-12)|}{\sqrt{2^2+3^2}}=\frac{8}{\sqrt{13}}$$

Practice exercises