TITLE: How to factor $a^n - b^n$?
QUESTION [15 upvotes]: 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?

REPLY [9 votes]: 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$.