Manipulate the points to see that given a line l and a point P the shortest distance from P to l is PX where X is the point on l with the line through P and X is perpendicular to l. In the app we see that PY is always greater than or equal to PX. The proof is provided.