Step 1: Difference of two squares
When the middle terms cancel, only the two squares remain.
(x + a)(x - a) = x2 - ax + ax - a2
x2 - a2 = (x + a)(x - a)
Factoring formulas
When two squared terms are subtracted, they factor into matching brackets with opposite signs.
Detailed notes
These identities work because each factor form expands back into the expression on the left.
When the middle terms cancel, only the two squares remain.
The bracket is repeated, so the middle term appears twice.
The same repeated-bracket idea works with x - a, but the middle term is negative.
The x coefficient comes from adding the two bracket numbers. The constant comes from multiplying them.