# 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

\(\displaystyle \paren {x + y} \circ \paren {x + \paren {-y} }\) | \(=\) | \(\displaystyle x \circ x + y \circ x + x \circ \paren {-y} + y \circ \paren {-y}\) | Distributivity of $\circ$ over $+$ in a ring | ||||||||||

\(\displaystyle \) | \(=\) | \(\displaystyle x \circ x + x \circ y + x \circ \paren {-y} + y \circ \paren {-y}\) | $R$ is a commutative ring | ||||||||||

\(\displaystyle \) | \(=\) | \(\displaystyle x \circ x + x \circ \paren {y + \paren {-y} } + \paren {-\paren {y \circ y} }\) | various ring properties | ||||||||||

\(\displaystyle \) | \(=\) | \(\displaystyle x \circ x + x \circ 0_R + \paren {-\paren {y \circ y} }\) | |||||||||||

\(\displaystyle \) | \(=\) | \(\displaystyle x \circ x + \paren {-\paren {y \circ y} }\) |

$\blacksquare$

## Algebraic Proof 2

This is a special case of Difference of Two Powers:

- $\displaystyle a^n - b^n = \left({a - b}\right) \left({a^{n - 1} + a^{n - 2} b + a^{n - 3} b^2 + \cdots + a b^{n - 2} + b^{n - 1} }\right) = \left({a - b}\right) \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.*

(*The Elements*: Book $\text{II}$: Proposition $5$)

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$.

From Complements of Parallelograms are Equal:

- $\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$

## Sources

- 1959: A.H. Basson and D.J. O'Connor:
*Introduction to Symbolic Logic*(3rd ed.) ... (previous) ... (next): $\S 1.2$: The Use of Symbols - 1968: Murray R. Spiegel:
*Mathematical Handbook of Formulas and Tables*... (previous) ... (next): $\S 2$: Special Products and Factors: $2.11$ - 2014: Christopher Clapham and James Nicholson:
*The Concise Oxford Dictionary of Mathematics*(5th ed.) ... (previous) ... (next): Entry:**difference of two squares**