---
tag: 05APWSX53S
kind: statement
role: proposition
name: Sum of a finite geometric series
msc: [40A05]
uses: [0MNM54WB99]
sources:
  - url: https://en.wikipedia.org/wiki/Geometric_series
    locator: 'Definition: finite geometric series'
---

## Statement

Let $r$ be a real number with $r \ne 1$, and let $n$ be a natural number.
Then
$$\sum_{k=0}^{n-1} r^k = 1 + r + r^2 + \cdots + r^{n-1} = \frac{1 - r^n}{1 - r}.$$

## Remarks

The proof multiplies the sum $S$ by $1 - r$. The product $(1 - r) S$ telescopes to $1 - r^n$.
For $r = 1$ the sum is $n$.
The identity holds in each commutative ring in the form $(1 - r) \sum_{k=0}^{n-1} r^k = 1 - r^n$, with no division.
Mathlib also states the version for a sum over the indices $m \le k < n$, as `geom_sum_Ico`.
Letting $n \to \infty$ gives the [[geometric series|01X5CVV1Q5]].

## Explanations

### L1 human

Write $S = 1 + r + \cdots + r^{n-1}$ and $rS = r + r^2 + \cdots + r^n$.
Subtract, and almost all terms cancel: $S - rS = 1 - r^n$.
For example, $1 + 2 + 4 + 8 = (1 - 16)/(1 - 2) = 15$.
