Sum of Geometric Sequence

Theorem
Let $$x \in \mathbb{R}, x \ne 1$$ and $$n \in \mathbb{N}^*$$.

Then $$\sum_{j = 0}^{n - 1} x^j = \frac {x^n - 1} {x - 1}$$.

Proof
Let $$S_n = \sum_{j = 0}^{n - 1} x^j = 1 + x + x^2 + \cdots + x^{n-1}$$.

Then $$x S_n = x \sum_{j = 0}^{n - 1} x^j = x + x^2 + x^3 + \cdots + x^{n-1} + x^n$$.

Then $$x S_n - S_n = -1 + x - x + x^2 - x^2 + \cdots + x^{n-1} - x^{n-1} + x^n = x^n - 1$$.

The result follows.

Using Sum Notation
$$S_n(x - 1) = x S_n - S_n = x \sum_{j = 0}^{n - 1} x^j - \sum_{j = 0}^{n - 1} x^j = \sum_{j = 1}^{n} x^j - \sum_{j = 0}^{n - 1} x^j = x^n + \sum_{j = 1}^{n-1} x^j - \left({x^0 + \sum_{j = 1}^{n - 1} x^j}\right) = x^n - x^0 = x^n - 1$$

The result follows.

Alternative Proof
You can directly use the result Difference of Two Powers by setting $$a = 1$$ and $$b = x$$.

Comment
Note that when $$x < 1$$ the result is usually given as $$\sum_{j = 0}^{n - 1} x^j = \frac {1 - x^n} {1 - x}$$.