# Show that the distance between two nonparallel lines is given by $\frac{|(p_2-p_1)\cdot (a_1\times a_2)|}{|| a_2\times a_1||}$

Show that the distance between two nonparallel lines is given by
$$\frac{|(p_2-p_1)\cdot (a_1\times a_2)|}{|| a_2\times a_1||}$$
where $p_1, p_2$ are any two points on the lines $l_1$ and $l_2$, and $a_1$ and $a_2$ are the directions of $l_1$ and $l_2$.