Perpendicular is Shortest Straight Line from Point to Straight Line

Theorem
Let $AB$ be a straight line.

Let $C$ be a point which is not on $AB$.

Let $D$ be a point on $AB$ such that $CD$ is perpendicular to $AB$.

Then the length of $CD$ is less than the length of all other line segments that can be drawn from $C$ to $AB$.

Proof
Let $E$ on $AB$ such that $E$ is different from $D$.

Then $CDE$ forms a right triangle where $CE$ is the hypotenuse.

By Pythagoras's Theorem:
 * $CD^2 + DE^2 = CE^2$

and so $CD < CE$.