Square of Difference

Theorem

 * $$\forall x, y \in \R: \left({x - y}\right)^2 = x^2 - 2 x y + y^2$$

Algebraic Proof
Follows directly from the Binomial Theorem:
 * $$\forall n \in \Z_+: \left({x+y}\right)^n = \sum_{k=0}^n {n\choose k}x^{n-k}y^k$$

putting $$n = 2$$ and $$y = -y$$.

Geometric Proof
As Euclid put it:


 * "If a straight line be cut at random, the square on the whole and that on one of the segments together equal twice the rectangle contained by the whole and the said segment and the square on the remaining segment."


 * Euclid-II-7.png

(That is: $$x^2 + y^2 = \left({x - y}\right)^2 + 2 x y$$.)

Let the straight line $$AB$$ be cut at random at $$C$$.

Construct the square $ADEB$ on $$AB$$ and join $$DB$$.

Construct $CI$ parallel to $$AD$$ through $$C$$ and let it cross $$DB$$ at $$F$$.

Construct $HG$ parallel to $$AB$$ through $$F$$.

From Complements of Parallelograms are Equal, $$\Box ACFH = \Box FGEI$$, so add $$\Box BCGF$$ to each.

So the whole of $$\Box ABGH$$ equals the whole of $$\Box CBEI$$, and so $$2 \Box ABGH = \Box ABGH + \Box CBEI$$.

But $$\Box ABGH + \Box CBEI$$ equals the area of the gnomon $$ABEIFH$$ together with $$\Box CBGF$$.

So the gnomon $$ABEIFH$$ together with $$\Box CBGF$$ equals $$2 \Box ABGH$$.

But twice the rectangle contained by $$AB$$ and $$BC$$ is also equal to $$2 \Box ABGH$$, as $$BG = BC$$.

So the gnomon $$ABEIFH$$ together with $$\Box CBGF$$ equals twice the rectangle contained by $$AB$$ and $$BC$$.

Add $$\Box DHFI$$ to each. Note that $$\Box DHFI$$ equals the square on $$AC$$.

Then the gnomon $$ABEIFH$$ together with $$\Box CBGF$$ and $$\Box DHFI$$ equals the whole of $$\Box ABED$$ and $$\Box CBGF$$, which are the squares on $$AB$$ and $$BC$$.

Hence the result.