Step-by-step explanation:
1) place the compass needle on the external point r.
2) make the compass width greater than the distance from r to the given line.
3) draw an arc cutting the given line at two points.
4) mark and label the points of intersection p and q.
5) without changing the compass width, move the compass needle to q and draw another arc below the line crossing the previous arc.
6) move the compass needle to p and make an arc below the line.
7) mark and label the point of intersection s.
8) draw a line from the external point r to the point where the arcs intersect, s.
9) line rs is perpendicular to line pq and passes through the external point r.
I hope this helps