If a straight line be cut at random, the square on the whole is equal to the squares on the segments and twice the rectangle contained by the segments.
Proof
Let the straight line AB be cut at random at C. Describe on AB
the square ADEB (I.46), and draw the diagonal BD. Through C
draw CGF parallel to either AD or BE (I.31), meeting BD at
G and DE at F. Through G draw HK parallel to either AB
or DE (I.31), meeting AD at H and BE at K.
Since CF is parallel to AD and BD falls on them, the exterior
angle ∠BGC equals the interior and opposite ∠BDA
(I.29). But ∠BDA=∠DBA since BA=AD (I.5 applied
to the isoceles right triangle inside the square). Hence
∠BGC=∠GBC, so BC=CG (I.6), and therefore CBKG
is equilateral. Since it has a right angle at B, it is a square
on CB (Definition I.22). By the same reasoning HDFG is the
square on HD=AC.
The complements AGHD and GFBK in the square ADEB are equal
rectangles by I.43; each is contained by AC and CB (since
AH=AC, HG=CB, etc.), so each is the rectangle on AC, CB.
The four pieces sum to the whole (Common Notion 2):
\[
AB^2 \;=\; AC^2 + CB^2 + 2\cdot(AC\cdot CB),
\]
which is (a+b)2=a2+2ab+b2 in geometric form.
Figure
Proposition II.4. The square ADEB on AB=a+b is decomposed by the parallels CF∥AD and HK∥AB