AI Tutor
Train tracks never meet because the perpendicular separation between the rails remains constant everywhere along the line.
Two straight lines on a Cartesian plane are parallel if and only if they share the exact same slope, meaning their standard equations can always be written with matching xx and yy coefficients as Ax+By+C1=0Ax + By + C_1 = 0 and Ax+By+C2=0Ax + By + C_2 = 0.
How do we measure the shortest gap between these two infinite paths without picking random test points?

The Parallel Distance Formula

The exact perpendicular distance dd between two parallel lines Ax+By+C1=0Ax + By + C_1 = 0 and Ax+By+C2=0Ax + By + C_2 = 0 is given by d=∣C1βˆ’C2∣A2+B2d = \frac{|C_1 - C_2|}{\sqrt{A^2 + B^2}}
Why does this simple difference between the constant terms C1C_1 and C2C_2 give the exact distance?

Why the Formula Works

In the late 1700s, French mathematician Gaspard Monge unified coordinate geometry methods to solve spatial design problems for engineering fortifications.
A point (x0,y0)(x_0, y_0) lies on the first line L1L_1 if and only if Ax0+By0+C1=0Ax_0 + By_0 + C_1 = 0, which means Ax0+By0=βˆ’C1Ax_0 + By_0 = -C_1.
The perpendicular distance from any point (x0,y0)(x_0, y_0) to the second line Ax+By+C2=0Ax + By + C_2 = 0 is ∣Ax0+By0+C2∣A2+B2\frac{|Ax_0 + By_0 + C_2|}{\sqrt{A^2 + B^2}}. Substituting βˆ’C1-C_1 in place of Ax0+By0Ax_0 + By_0 gives βˆ£βˆ’C1+C2∣A2+B2=∣C1βˆ’C2∣A2+B2\frac{|-C_1 + C_2|}{\sqrt{A^2 + B^2}} = \frac{|C_1 - C_2|}{\sqrt{A^2 + B^2}}.
Let's put this into action with real numbers.

Worked Example: Matching Coefficients