Suppose there are two parallel lines: $w_1x_1+w_2x_2=c_1$ (Line 1) and $w_1x_1+w_2x_2=c_2$ (Line 2). What is the distance between them (the shortest distance between any two points)?
I know the answer is $d=\frac{|c_1-c_2|}{||w||}$ where $||w||=\sqrt{w_1^2+w_2^2}$.
The method I was going to calculate is as follows:
1) find any point on Line 1 $(x_1^0,x_2^0)$ such that $w_1x_1^0+w_2x_2^0=c_1$
2) calculate the perpendicular line (Line 3) to Line 1 and passing through $(x_1^0,x_2^0)$
3) find the point $(x_1^1,x_2^1)$ where Line 3 intersects Line 2
4) calculate the distance between $(x_1^0,x_2^0)$ and $(x_1^1,x_2^1)$
However I couldn't figure out the algebra of this method. Can someone show me the steps of the above calculation? Or is there any simpler way to calculate this? Thanks.