Difference of two squares

From Wikipedia, the free encyclopedia

In mathematics, the difference of two squares is when a number is squared, or multiplied by itself, and is then subtracted from another squared number. It refers to the identity

a^2-b^2 = \left(a+b\right)\left(a-b\right)

from elementary algebra.

[edit] Proof

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

ba - ab = 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

a^2 - ab + ba - b^2\,\!

and if this is equal to a2b2, then we have

a^2 - ab + ba - b^2 - \left(a^2 - b^2\right) = 0\,\!

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

ba - ab = 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 is the difference of the geometric  area and simplifies to .
A geometric illustration of the difference of two squares. The sum of the shaded parts is the difference of the geometric area and simplifies to (a-b)(a+b)\,\!.

[edit] In geometry

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

Languages