How to factor $a^n - b^n$?

Wikipedia provides a proof, but I don't understand how:

$$a^n - b^n = (a-b)(a^{n-1} + ba^{n-2} +\cdots + b^{n-1})$$

follows from

$$x^{n-1} + x^{n-2} +\cdots + x + 1 = \frac{x^n - 1}{x-1}$$

Could someone explain to me how the summation of the the geometric series explains the factorization?


Solution 1:

The long parenthesized term is a geometric series with first term $a^{n-1}$ and ratio $\frac ba$ so set $x=\frac ba$

Solution 2:

I see the answer is accepted. But for future reference, another proof would be

Let $p(x)=x^n-a^n$. Clearly, $x=a$ is a solution. This means $x-a$ is a factor of $x^n-a^n.$

It is just a matter of simple polynomial division aafter that and so dividing $x^n-a^n$ by $x-a$ gives us $$x^{n-1} + ax^{n-2} +\cdots + a^{n-1}$$

So, $$x^n-a^n=(x-a)(x^{n-1} + ax^{n-2} +\cdots + a^{n-1}).$$

Replace $x$ and $a$ with $a$ and $b$.

Solution 3:

Just multiply out the right hand side, you'll see that all terms except for the left hand side cancel.