Skip to content

Difference of Two Squares

The algebraic identity a² − b² = (a − b)(a + b), converting a difference of commuting squares into conjugate factors.

Version
v1 · 2026-10-03 · History
Domain-specific #
13139
Domain group
Formal Sciences
Origin domain
Mathematics
Subdomains
Algebra, Factorization → Mathematics
Aliases
Difference of squares, Conjugate product identity

Core Idea

The difference-of-two-squares identity converts a²−b² to (a−b)(a+b) when a and b commute. Expanding the conjugate factors yields two mixed products that cancel. The pattern works in ordinary arithmetic and polynomial algebra, but noncommuting elements can leave a residual ab−ba term.

How would you explain it like I'm…

Square-to-Rectangle Trick

Make a big square out of tiles, then take a smaller square of tiles out of one corner. You can cut what is left and slide the pieces into a neat rectangle. The rectangle is as long as the two square sides added together and as wide as the big side minus the small side.

Minus-Plus Shortcut

If you take one square number and subtract another, like 5×5 minus 3×3, you can get the same answer by multiplying (5 − 3) times (5 + 3). Both ways give 16. This trick is called the Difference of Two Squares. It works because, when you multiply out (5 − 3)(5 + 3), the two middle pieces cancel each other out. You can use it either way: to turn a subtraction into a multiplication, or to do a multiplication quickly.

Conjugate Factor Identity

The difference of two squares is the identity a² − b² = (a − b)(a + b). If you expand the right side you get a² + ab − ba − b², and the two middle terms cancel because ab and ba are equal. So a subtraction of squares and a product of 'conjugate' factors (same terms, opposite middle sign) are really one expression written two ways. You can use it to factor polynomials like x² − 9 = (x − 3)(x + 3), or to multiply conjugates without expanding term by term. It relies on multiplication being commutative, which is always true for ordinary numbers and polynomials.

 

The Difference of Two Squares states that a² − b² = (a − b)(a + b) whenever a and b commute. Expanding the product gives a² + ab − ba − b², and the mixed terms cancel exactly when ab = ba. In number and polynomial algebra multiplication is commutative, so the identity becomes a standard factoring rule. It can be read in either direction. Read forward, it factors a difference, as in polynomial factoring or Fermat's method for factoring integers. Read backward, it lets you multiply conjugates directly. A broader reverse formula, xy = ((x+y)/2)² − ((x−y)/2)², writes any product as a difference of squares, but it needs division by 2. That makes it unavailable in an arbitrary ring. The forward identity needs no square roots when a² and b² are already recognizable as squares.

Scope of Application

The identity is used in polynomial factorization, conjugate multiplication and integer factor searches such as Fermat's method. It is an equality once the two squared terms are identified; an algorithm that searches for such terms is additional work. The reverse half-sum expression for an arbitrary product requires division by 2 and is not universal in all rings.

Clarity

The defining clues are two squared terms and subtraction, not just a two-term expression. 9x²−16=(3x−4)(3x+4) is a positive case. A sum of squares or a noncommuting matrix expression is not justified by the same visual shortcut.

Manages Complexity

The identity replaces a four-term distributive expansion with two conjugate factors. It can lower the apparent degree of a polynomial problem or turn a product into a simple square difference, while keeping commutation visible when the algebra is not automatically commutative.

Abstract Reasoning

Given an expression, identify a² and b², check the subtraction sign and commutation, then verify by expanding (a−b)(a+b). For integer factorization, a successful search for N=x²−y² yields factors x−y and x+y, though they may be trivial.

Knowledge Transfer

The equality transfers literally among commuting algebraic structures, not by the surface appearance of variables. A broader cancellation idea outside mathematics would need its own identity and evidence. See the staged V2 for exact examples and source checks.

Neighborhood in Abstraction Space

Difference of Two Squares sits in a moderately populated region (49th percentile for distinctiveness): it has near-neighbors but no dense thicket of look-alikes.

Family — Abstract Algebra & Category Theory (26 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-11-14