Constructing a Square with a Given Base

Construction Algorithm
1 Construct a line AB as a given base of the square.
2 Construct two perpendicular lines to AB at A and B.
3 Construct a point C on the perpendicular line at B so that AB = BC.
4 Construct a point D on the perpendicular line at A so that AB = AD.
5 Join up the four points A, B, C, and D to get the required square.
6 Switch to drag mode. Pick a free element. Move it around to check your construction.
Construction Theorem
A square is a quadrilateral whose four right angles and four sides equal in length.
Please enable Java for an interactive construction (with Cinderella).