Proof: (Euclid)
(related to Proposition: 1.12: Constructing a Perpendicular Segment to a Straight Line From a Given Point Not On the Straight Line)
 For let point $D$ have been taken at random on the other side (to $C$) of the straight line $AB$, and let the circle $EFG$ have been drawn with center $C$ and radius $CD$ [Post. 3] , and let the straight line $EG$ have been cut in half at (point) $H$ [Prop. 1.10], and let the straight lines $CG$, $CH$, and $CE$ have been joined.
 I say that the (straight line) $CH$ has been drawn perpendicular to the given infinite straight line $AB$ from the given point $C$, which is not on ($AB$).
 For since $GH$ is equal to $HE$, and $HC$ (is) common, the two (straight lines) $GH$, $HC$ are equal to the two (straight lines) $EH$, $HC$, respectively, and the base $CG$ is equal to the base $CE$.
 Thus, the angle $CHG$ is equal to the angle $EHC$ [Prop. 1.8], and they are adjacent.
 But when a straight line stood on a(nother) straight line makes the adjacent angles equal to one another, each of the equal angles is a right angle, and the former straight line is called a perpendicular to that upon which it stands [Def. 1.10] .
 Thus, the (straight line) $CH$ has been drawn perpendicular to the given infinite straight line $AB$ from the given point $C$, which is not on ($AB$).
 (Which is) the very thing it was required to do.
∎
Thank you to the contributors under CC BYSA 4.0!
 Github:

 nonGithub:
 @Fitzpatrick
References
Adapted from (subject to copyright, with kind permission)
 Fitzpatrick, Richard: Euclid's "Elements of Geometry"