# Square of Difference

## Theorem

$\forall x, y \in \R: \paren {x - y}^2 = x^2 - 2 x y + y^2$

## Algebraic Proof 1

 $\displaystyle \paren {x - y}^2 =$ $=$ $\displaystyle \paren {x - y} \cdot \paren {x - y}$ $\displaystyle$ $=$ $\displaystyle x \cdot \paren {x - y} - y \cdot \paren {x - y}$ Real Multiplication Distributes over Addition $\displaystyle$ $=$ $\displaystyle x \cdot x - x \cdot y - y \cdot x + y \cdot y$ Real Multiplication Distributes over Addition $\displaystyle$ $=$ $\displaystyle x^2 - 2xy + y^2$

$\blacksquare$

## Algebraic Proof 2

Follows directly from the Binomial Theorem:

$\displaystyle \forall n \in \Z_{\ge 0}: \paren {x + y}^n = \sum_{k \mathop = 0}^n \binom n k x^{n - k} y^k$

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

$\blacksquare$

## Geometric Proof

In the words of Euclid:

If a straight line be cut at random, the square on the whole and that on one of the segments both together are equal to twice the rectangle contained by the whole and the said segment and the square on the remaining segment. That is:

$x^2 + y^2 = \paren {x - y}^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 $CN$ parallel to $AD$ through $C$ and let it cross $DB$ at $G$.

Construct $HF$ parallel to $AB$ through $G$.

From Complements of Parallelograms are Equal, $\Box ACGH = \Box FGNE$, so add $\Box CBFG$ to each.

So the whole of $\Box ABFH$ equals the whole of $\Box CBEN$.

So $2 \Box ABFH = \Box ABFH + \Box CBEN$.

But $\Box ABFH + \Box CBEN$ equals the area of the gnomon $KLM$ together with $\Box CBFG$.

So the gnomon $KLM$ together with $\Box CBFG$ equals $2 \Box ABGH$.

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

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

Add $\Box DHGN$ to each.

Note that $\Box DHGN$ equals the square on $AC$.

Then the gnomon $KLM$ together with $\Box CBFG$ and $\Box DHGN$ equals the whole of $\Box ABED$ and $\Box CBFG$, which are the squares on $AB$ and $BC$.

Hence the result.

$\blacksquare$