How to get perpendicular line to an edge of a polygon. This is a pretty basic geometry question, but I couldn't find an answer clear enough for me on Google (I don't know much about math).
Let's say I have a rectangle. I have the coordinates for the four vertices, thus I have the angles of the rectangle and the lengths of the edges.
I need to find one perpendicular line for each of the shape's edges. How can I do that, the simplest way?
Thanks
Edit:
What I mean: I need to know how to find the lines that come out of the rectangle's edges.

 A: With a straightedge and compass, the lines specified can be constructed as follows:


*

*Take the compass, set the size to draw circles slightly larger than half the length of the long side of the rectangle

*With this fixed size, draw four circles, each one centered on one corner of the rectangle

*Take the straightedge and line it up with the locations where the circles intersect in four collinear locations

*Draw the perpendicular bisectors of each side of the rectangle where the straightedge crosses it


See the picture below for more info.

The colored circles are centered on each of the four corners of the rectangle; the long sides have closer-together circle intersections so it is possible to see all of them and easy to connect them with a line.  For the shorter sides, it may be necessary to construct a second set of four circles that are smaller and have closer-together intersections, depending on the size of the piece of paper you are using.
Alternatively, it is possible to construct these lines using midpoints.  If the four corners of the rectangle are $A,B,C,D$ where $\exists x_A,y_A\in\Bbb R: A=(x_A,y_A)$, etc., then the midpoints of each side are connectable as perpendicular bisectors as well.  Let $M_{XY}$ be the midpoint of side $XY$, then we have coordinates:
$$M_{AB}=(\frac {x_A+x_B}2,\frac {y_A+y_B}2)\\
M_{BC}=(\frac {x_B+x_C}2,\frac {y_B+y_C}2)\\
M_{CD}=(\frac {x_C+x_D}2,\frac {y_C+y_D}2)\\
M_{DA}=(\frac {x_D+x_A}2,\frac {y_D+y_A}2)$$
It is further possible to create these as lines extending beyond each side, using the generic line formula
$$(E_x-S_x)(y-S_y)=(E_y-S_y)(x-S_x)$$
Where $E,S$ are "starting" and "ending" points of the lines in question.
A: EDIT1

Deleted an earlier computational given solution for this construction: Choose a radius more than half the larger side length of the rectangle and draw four circles centered at each corner of the rectangle with this same radius. Join either the outermost (or innermost) points of circle intersection lying on opposite sides of rectangle as shown by the required purple perpendicular bisectors.
