When two lines are parallel, both are either vertical or non-vertical. If both are vertical, then b1 = b2 = 0 so that a1b2 = a2b1 = 0. If both are non-vertical, their slopes are equal.
Thus
- a1/b1 = -a2/b2
Hence, a1b2 = a2b1 or a1:b1 = a2:b2
Conversely, when a1b2 = a2b1 and if b1 = 0, then a1 ≠ 0 so that b2 = 0. Therefore, b1 = 0 ⇔ b2 = 0 and hence if one of the lines is vertical, then the other is also vertical so that the given lines are parallel. If both b1 and b2 are non-zero, then

Since the slopes are equal, the lines are parallel.