Square from 4 points

You are given one point from each side of a square. Reconstruct the square with compass and straightedge.

Connect two opposite points (in this example B and D):

Step 1

Drop perpendicular from A onto BD:

Step 1

Mark point E on this perpendicular such that AE = BD. Point E will fall on the side of the square with C (or its extension):

Step 1

Once you have the orientation of one side of the square (line EC), drop the remaining perpendiculars to find the corners.

Source: problem 20 in https://arxiv.org/pdf/1110.1556v2.pdf