Difference of two squares
From Wikipedia, the free encyclopedia
In mathematics, the difference of two squares refers to the identity
- a2 − b2 = (a + b)(a − b)
from elementary algebra. 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
- a2 − ab + ba − b2
and if this is equal to a2 − b2, then we have
- a2 − ab + ba − b2 − (a2 − b2) = 0
and by associativity and the rule that r − r = 0, we can rewrite this as
- ba − ab = 0
If the original identity holds, then, we have ba − ab = 0 for all pairs a, b of elements of R, so the ring R is commutative.
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(a − b) + (a − b)2
- 2b(a − b) + (a − b)(a − b)
- (2b + a − b)(a − b)
- (a + b)(a − b)