Construction of Square Equal to Given Polygon
Theorem
A square can be constructed the same size as any given polygon.
Proof
Let $A$ be the given polygon.
Construct the rectangle $BCDE$ equal to the given polygon.
If it so happens that $BE = ED$, then $BCDE$ is a square, and the construction is complete.
Suppose $BE \ne ED$. Then WLOG suppose $BE > ED$.
Produce $BE$ from $E$ and construct on it $EF = ED$.
Bisect $BF$ at $G$.
Construct the semicircle $BHF$ with center $G$ and radius $GF$ (see diagram).
Produce $DE$ from $D$ to $H$.
From Difference of Two Squares, the rectangle contained by $BE$ and $EF$ together with the square on $EG$ is equal to the square on $GF$.
But $GF = GH$.
So the rectangle contained by $BE$ and $EF$ together with the square on $EG$ is equal to the square on $GH$.
From Pythagoras's Theorem, the square on $GH$ equals the squares on $GE$ and $EH$.
Then the rectangle contained by $BE$ and $EF$ together with the square on $EG$ is equal to the squares on $GE$ and $EH$.
Subtract the square on $GE$ from each.
Then the rectangle contained by $BE$ and $EF$ is equal to the square on $EH$.
So the square on $EH$ is equal to the rectangle $BCDE$.
So the square on $EH$ is equal to the given polygon, as required.
$\blacksquare$
Historical Note
This is Proposition 14 of Book II of Euclid's The Elements.