Constructing a Square with a Given Base

Construction Algorithm
1 Construct a line AB as a given base of the square.
2 Construct the perpendicular line at B.
3
Construct a circle centered at B and has a radius AB.
4 Generate the intersection point C between the circle and the perpendicular at B.
5 Construct the line that joins between A and C.
6 Construct the midpoint M between A and C.
7 Construct the line that joins between M and B.
8 Construct a circle centered at M and has MB as a radius.
9 Join up the four points A, B, C and D to get the required square.
10 Switch to drag mode. Pick a free element. Move it around to check your construction.
Construction Theorems
A square is a quadrilateral whose four right angles and four sides equal in length.

The two diagonals of the square are perpendicular to each other and equal in length.