Answer
See the answer for detailed proof
Work Step by Step
We wish to prove that the statement $S_{n}: \quad \sum_{i=0}^{n-1} a r^{i}=\frac{a\left(1-r^{n}\right)}{1-r}, \quad r \neq 1$
is valid for all positive integers $\mathrm{n}$.
1. (Anchor step.)
We verify that for $\mathrm{n}=1$ (when we have one term in the sum), the formula holds true
$a=a \frac{1-r}{1-r}$
The statement is valid for $\mathrm{n}=1$.
2. Induction step.
If, from the assumption that the formula is valid for $\mathrm{k}(\mathrm{n}=\mathrm{k})$ we prove that it will be valid for $\mathrm{n}=\mathrm{k}+1$ terms, the formula will be valid for all integers $n$.
$(*)$ Assume that $S_{k}: \sum_{i=0}^{k-1} a r^{i}=\frac{a\left(1-r^{k}\right)}{1-r}$ is valid
(is $S_{k+1}: \sum_{i=0}^{k} a r^{i}=\frac{a\left(1-r^{k+1}\right)}{1-r}$ valid ?)
$\sum_{i=0}^{k} a r^{i}=\left(\sum_{i=0}^{k-1} a r^{i}\right)+a r^{k}=\frac{a\left(1-r^{k}\right)}{1-r}+a r^{k}$
The sum of the first k terms is defined by our assumption $\left(^{*}\right)$.
We bring the second term up to the common denominator and simplify:
$=\frac{a\left(1-r^{k}+r^{k}-r^{k+1}\right)}{1-r}=\frac{a\left(1-r^{k+1}\right)}{1-r}$
By mathematical induction, the formula is valid for all positive integer values of $n$.