Difference of two squares

From Wikipedia, the free encyclopedia

In mathematics, the difference of two squares refers to the identity

a2b2 = (a + b)(ab)

from elementary algebra. The proof is straightforward, starting from the RHS: apply the distributive law to get a sum of four terms, and set

baab = 0

as an application of the commutative law. The resulting identity is one of the most commonly used in all of mathematics.

The proof just given indicates the scope of the identity in abstract algebra: it will hold in any commutative ring R.

Also, conversely, if this identity holds in a ring R for all pairs of elements a and b of the ring, then R is commutative. To see this, we apply the distributive law to the right-hand side of the original equation and get

a2ab + bab2

and if this is equal to a2b2, then we have

a2ab + bab2 − (a2b2) = 0

and by associativity and the rule that rr = 0, we can rewrite this as

baab = 0

If the original identity holds, then, we have baab = 0 for all pairs a, b of elements of R, so the ring R is commutative.

A geometric illustration of the difference of two squares. The sum of the shaded parts simplifies to (a − b)(a + b).
A geometric illustration of the difference of two squares. The sum of the shaded parts simplifies to (ab)(a + b).

The difference of two squares can also be illustrated geometrically as the difference of two squares in a plane. The sum of the difference area equals the RHS

2b(ab) + (ab)2
2b(ab) + (ab)(ab)
(2b + ab)(ab)
(a + b)(ab)
In other languages