Difference of Squares

Difference of squares (something squared minus something else squared):

$$$\color{purple}{a^2-b^2=\left(a-b\right)\left(a+b\right)}$$$

Proof of this fact is straightforward.

We just prove it from right to left.

Apply FOIL to $$${\left({a}-{b}\right)}{\left({a}+{b}\right)}$$$:

$$${\left({a}-{b}\right)}{\left({a}+{b}\right)}={a}\cdot{a}+{a}\cdot{b}+{\left(-{b}\right)}\cdot{a}+{\left(-{b}\right)}\cdot{b}={{a}}^{{2}}+{a}{b}-{a}{b}-{{b}}^{{2}}={{a}}^{{2}}-{{b}}^{{2}}$$$.

This formula can also be derived by applying techniques from Factoring Quadratics note.

Note: formula is valid only for $$${{a}}^{{2}}-{{b}}^{{2}}$$$. Sum of squares $$${{a}}^{{2}}+{{b}}^{{2}}$$$ can't be factored at all.

Example 1. Factor $$${{x}}^{{2}}-{9}$$$.

Notice, that $$${9}={{3}}^{{2}}$$$.

Thus, $$${{x}}^{{2}}-{9}={{x}}^{{2}}-{{3}}^{{2}}={\left({x}-{3}\right)}{\left({x}+{3}\right)}$$$.

Answer: $$${{x}}^{{2}}-{9}={\left({x}-{3}\right)}{\left({x}+{3}\right)}$$$.

Of course, there can be more complex expressions.

Example 2. Factor $$${9}{{y}}^{{2}}-{49}$$$.

Notice, that $$${9}{{y}}^{{2}}={{\left({3}{y}\right)}}^{{2}}$$$ and $$${49}={{7}}^{{2}}$$$.

Thus, $$${9}{{y}}^{{2}}-{49}={{\left({3}{y}\right)}}^{{2}}-{{7}}^{{2}}={\left({3}{y}-{7}\right)}{\left({3}{y}+{7}\right)}$$$.

Answer: $$${9}{{y}}^{{2}}-{49}={\left({3}{y}-{7}\right)}{\left({3}{y}+{7}\right)}$$$.

And even harder...

Example 3. Factor the following: $$${{\left({x}+{y}\right)}}^{{2}}-{25}{{u}}^{{4}}{{b}}^{{6}}$$$.

Notice, that $$${25}{{u}}^{{4}}{{b}}^{{6}}={{\left({5}{{u}}^{{2}}{{b}}^{{3}}\right)}}^{{2}}$$$.

Thus, $$${{\left({x}+{y}\right)}}^{{2}}-{25}{{u}}^{{4}}{{b}}^{{6}}={{\left({x}+{y}\right)}}^{{2}}-{{\left({5}{{u}}^{{2}}{{b}}^{{3}}\right)}}^{{2}}={\left({\left({x}+{y}\right)}-{5}{{u}}^{{2}}{{b}}^{{3}}\right)}{\left({\left({x}+{y}\right)}+{5}{{u}}^{{2}}{{b}}^{{3}}\right)}$$$.

Answer: $$${{\left({x}+{y}\right)}}^{{2}}-{25}{{u}}^{{4}}{{b}}^{{6}}={\left({x}+{y}-{5}{{u}}^{{2}}{{b}}^{{3}}\right)}{\left({x}+{y}+{5}{{u}}^{{2}}{{b}}^{{3}}\right)}$$$.

Now, it is time to exercise.

Exercise 1. Factor the following: $$${{n}}^{{2}}-{36}$$$.

Answer: $$${\left({n}-{6}\right)}{\left({n}+{6}\right)}$$$.

Exercise 2. Factor the following: $$$-{1}+{49}{{x}}^{{2}}$$$.

Answer: $$${\left({7}{x}-{1}\right)}{\left({7}{x}+{1}\right)}$$$. Hint: $$$-{1}+{49}{{x}}^{{2}}={49}{{x}}^{{2}}-{1}$$$.

Exercise 3. Factor $$${144}{{c}}^{{10}}{{d}}^{{8}}-{{\left({m}+{n}\right)}}^{{2}}$$$.

Answer: $$${\left({12}{{c}}^{{5}}{{d}}^{{4}}-{m}-{n}\right)}{\left({12}{{c}}^{{5}}{{d}}^{{4}}+{m}+{n}\right)}$$$.

Exercise 4. Factor $$${{\left({x}+{y}\right)}}^{{2}}-{{\left({x}-{y}\right)}}^{{2}}$$$.

Answer: $$${4}{x}{y}$$$.