If this is a 2D problem, then the points are (x, y). Anyway ...

The shortest distance between a line, defined by points (x1, y1) and (x2, y2), and a third point (x3, y3) is:

Shortest Distance...