# Difference of Two Squares

## Theorem

Let $\struct {R, +, \circ}$ be a commutative ring whose zero is $0_R$.

Let $x, y \in R$.

Then:

$x \circ x + \paren {- \paren {y \circ y} } = \paren {x + y} \circ \paren {x + \paren {-y} }$

When $R$ is one of the standard sets of numbers, that is $\Z, \Q, \R$, and so on, then this translates into:

$x^2 - y^2 = \paren {x + y} \paren {x - y}$

## Algebraic Proof 1

 $\ds \paren {x + y} \circ \paren {x + \paren {-y} }$ $=$ $\ds x \circ x + y \circ x + x \circ \paren {-y} + y \circ \paren {-y}$ Distributivity of $\circ$ over $+$ in a ring $\ds$ $=$ $\ds x \circ x + x \circ y + x \circ \paren {-y} + y \circ \paren {-y}$ $R$ is a commutative ring $\ds$ $=$ $\ds x \circ x + x \circ \paren {y + \paren {-y} } + \paren {-\paren {y \circ y} }$ various ring properties $\ds$ $=$ $\ds x \circ x + x \circ 0_R + \paren {-\paren {y \circ y} }$ $\ds$ $=$ $\ds x \circ x + \paren {-\paren {y \circ y} }$

$\blacksquare$

## Algebraic Proof 2

This is a special case of Difference of Two Powers:

$\ds a^n - b^n = \paren {a - b} \paren {a^{n - 1} + a^{n - 2} b + a^{n - 3} b^2 + \cdots + a b^{n - 2} + b^{n - 1} } = \paren {a - b} \sum_{j \mathop = 0}^{n - 1} a^{n - j - 1} b^j$

The result follows by setting $n = 2$.

$\blacksquare$

## Geometric Proof

In the words of Euclid:

If a straight line be cut into equal and unequal segments, the rectangle contained by the unequal segments of the whole together with the square on the straight line between the points of section is equal to the square on the half. Let $AB$ be cut into equal segments at $C$ and unequal segments at $D$.

Then the rectangle contained by $AD$ and $DB$ together with the square on $CD$ equals the square on $BC$.

(That is, let $x = AC, y = CD$. Then $\paren {x + y} \paren {x - y} + y^2 = x^2$.)

This is proved as follows.

Construct the square $CBFE$ on $CB$, and join $BE$.

Construct $DG$ parallel to $CE$ through $G$, and let $DG$ cross $BE$ at $H$.

Construct $KM$ parallel to $AB$ through $H$.

Construct $AK$ parallel to $BF$ through $A$.

$\Box CDHL = \Box FGHM$.

Add the square $DBMH$ to each.

Then $\Box CBML = \Box DBFG$.

But as $AC = CB$, from Parallelograms with Equal Base and Same Height have Equal Area we have that:

$\Box ACLK = \Box CBML$

Add $\Box CDHL$ to each.

Then $\Box ADHK$ is equal in area to the gnomon $CBFGHL$.

But $\Box ADHK$ is the rectangle contained by $AD$ and $DB$, because $DB = DH$.

So the gnomon $CBFGHL$ is equal in area to the rectangle contained by $AD$ and $DB$.

Now $\Box LHGE$ is equal to the square on $CD$.

Add $\Box LHGE$ to each of the gnomon $CBFGHL$ and $\Box ADHK$.

Then the gnomon $CBFGHL$ together with $\Box LHGE$ equals the rectangle contained by $AD$ and $DB$ and the square on $CD$.

But the gnomon $CBFGHL$ together with $\Box LHGE$ is the square $CBFE$.

Hence the result.

$\blacksquare$