Difference of Squares: A Special FOIL Pattern

Discover why (a + b)(a - b) always simplifies to a² - b². Understand this powerful shortcut and when to use it.

Patterns June 15, 2026 7 min read

Difference of Squares:
A Special FOIL Pattern

If you've been using the FOIL method for a while, you may have noticed something interesting: when you multiply (a + b)(a - b), the middle terms always cancel out, leaving you with a² - b². This isn't a coincidence — it's one of the most elegant and useful patterns in all of algebra: the difference of squares.

The Pattern Revealed

Let's use FOIL on the general form (a + b)(a - b):

  • First: a × a = a²
  • Outer: a × (-b) = -ab
  • Inner: b × a = +ab
  • Last: b × (-b) = -b²

Now combine: a² - ab + ab - b²

The outer and inner terms (-ab and +ab) are exact opposites, so they cancel:

(a + b)(a - b) = a² - b²

This always happens when you multiply the sum and difference of the same two terms. The result is called a "difference of squares" because you end up with one squared term minus another squared term.

Why Does This Work?

The cancellation happens because of a fundamental symmetry: when one binomial has "+b" and the other has "-b", the cross terms (outer and inner products in FOIL) are equal in magnitude but opposite in sign. They always sum to zero.

Algebraically, this is guaranteed because:

  • Outer = a × (-b) = -ab
  • Inner = (+b) × a = +ab
  • -ab + ab = 0

Worked Examples

Example 1: (x + 3)(x - 3)

Using the pattern: a = x, b = 3

(x + 3)(x - 3) = x² - 9

Let's verify with FOIL: x² - 3x + 3x - 9 = x² - 9 ✓

Example 2: (2x + 5)(2x - 5)

Using the pattern: a = 2x, b = 5

(2x + 5)(2x - 5) = (2x)² - 5² = 4x² - 25

Example 3: (x² + 7)(x² - 7)

Using the pattern: a = x², b = 7

(x² + 7)(x² - 7) = (x²)² - 49 = x⁴ - 49

Example 4: (3x + 2y)(3x - 2y)

With two variables: a = 3x, b = 2y

(3x + 2y)(3x - 2y) = 9x² - 4y²

Using Difference of Squares in Reverse

The difference of squares pattern also works in reverse — and this is where it becomes really powerful. If you see an expression in the form a² - b², you can factor it as (a + b)(a - b).

Factoring Examples

  • x² - 16 = (x + 4)(x - 4) because 16 = 4²
  • 9x² - 1 = (3x + 1)(3x - 1) because 9x² = (3x)² and 1 = 1²
  • 25 - y² = (5 + y)(5 - y)
  • x⁴ - 81 = (x² + 9)(x² - 9) = (x² + 9)(x + 3)(x - 3)

Notice the last example: x² - 9 can be factored again because it's also a difference of squares. This technique of repeated factoring appears frequently in algebra and precalculus.

How to Recognize the Pattern

Look for these clues that suggest a difference of squares:

  1. Two terms separated by a subtraction sign
  2. Both terms are perfect squares (like x², 4x², 9, 16, 25, 36...)
  3. For factoring: the expression is a² - b² (not a² + b², which cannot be factored over the reals)
Important: The sum of squares (a² + b²) does NOT factor using real numbers. Only the difference of squares (a² - b²) has the nice (a + b)(a - b) factorization.

Mental Math Trick

The difference of squares pattern is also a powerful mental math shortcut. To multiply 23 × 17 in your head:

  1. Rewrite as (20 + 3)(20 - 3)
  2. Apply the pattern: 20² - 3² = 400 - 9 = 391

Works beautifully when two numbers are equidistant from a round number!

  • 48 × 52 = (50 - 2)(50 + 2) = 2500 - 4 = 2496
  • 99 × 101 = (100 - 1)(100 + 1) = 10000 - 1 = 9999
  • 73 × 67 = (70 + 3)(70 - 3) = 4900 - 9 = 4891

Try It Yourself

Use our FOIL Calculator to verify these difference of squares expansions:

  • (x + 8)(x - 8) → should give x² - 64
  • (5x + 1)(5x - 1) → should give 25x² - 1
  • (x + 10)(x - 10) → should give x² - 100

Notice how the middle term is always zero — that's the hallmark of the difference of squares pattern!

← ブログ