Sum of a Geometric Sequence Formula Proof

The sum of the first n terms of a geometric sequence is given by:

$S_n=\frac{a(1-r^n)}{1-r}$

where the first term is a and the common ratio is r. The sum to infinity is given by:

$S_\infty = \frac{a}{1-r}$

given that abs(r)<1.

Proof for $$S_n$$

Suppose we have a general geometric sequence with first term a and a common ratio r. The sum of the first n terms is given by:

$S_n=a+ar+ar^2+ \cdots +ar^{n-3}+ar^{n-2}+ar^{n-1}$

Now consider $$rS_n$$:

$rS_n=ar+ar^2+ar^3+ \cdots +ar^{n-2}+ar^{n-1}+ar^n$

$S_n-rS_n=[a+ar+ar^2+ \cdots +ar^{n-3}+ar^{n-2}+ar^{n-1}]-[ar+ar^2+ar^3+ \cdots +ar^{n-2}+ar^{n-1}+ar^n]$

$S_n-rS_n=a-ar^n$

$S_n(1-r)=a-ar^n$

$S_n=\frac{a-ar^n}{1-r}$

$\therefore S_n=\frac{a(1-r^n)}{1-r}$

$Q.E.D.$

Proof for $$S_\infty$$

We know that:

$S_n=\frac{a(1-r^n)}{1-r}$

If abs(r)<1, as $$n \to \infty$$ ,  $$r^n \to 0$$ and $$(1-r^n) \to 1$$ . Therefore:

$\lim_{n \to \infty} S_n = \frac{a}{1-r}$

$\therefore S_\infty = \frac{a}{1-r}$

$Q.E.D.$