The distance between two lines and , where and are the respective directions, and and are an arbitrary point along said lines, respectively. Both the directions and points are vectors, of course.