Derivation of Formula For Distance Between Parallel Lines

If two lines are parallel, the coefficients in the Cartesian equations are the same, since the coefficients of the Cartesian equation are the components of the normal, which is the same for parallel lines.
Suppose we want to find the distance between the parallel lines
Suppose a normal connects points  
  in line (1) to point  
  in line (2). Then
(4)-(3) gives  
Let the equation of the normal from line (1) to (2) be  
\[\mathbf{r}(t)= \begin{pmatrix}x_1\\y_\\end{pmatrix} + \begin{pmatrix}a\\b\end{pmatrix} t\]
\[\begin{pmatrix}x_2\\y_2\end{pmatrix}= \begin{pmatrix}x_1\\y_1\end{pmatrix} + \begin{pmatrix}a\\b\end{pmatrix} t_0 \rightarrow \begin{pmatrix}x_2-x_1\\y_2-y_1\end{pmatrix}= \begin{pmatrix}a\\b\end{pmatrix} t_0\]

Substitution into (5) gives
\[a^2t_0+b^2t_0=d_2-d_1 \rightarrow t_0=\frac{d_2-d_1}{a^2+b^2}\]

\[\begin{pmatrix}x_2-x_1\\y_2-y_1-\end{pmatrix}-= \begin{pmatrix}a\\b\\c\end{pmatrix} \frac{d_2-d_1}{a^2+b^2}\]

The distance between the lines is then
\[\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}=\sqrt{a^2+b^2}\frac{d_2-d_1}{a^2+b^2+c^2}= \frac{d_2-d_1}{\sqrt{a^2+b^2}\]