**Linear Algebra**

*chevron_left*

**Series and Sequences**

# Geometric sequence

*schedule*Aug 12, 2023

*toc*Table of Contents

*expand_more*

**mathematics behind data science**with 100+ top-tier guides

Start your free 7-days trial now!

In a geometric sequence, each term is the previous term multiplied by a constant. The constant we multiply each term by to get the next term is referred to as the common ratio.

# General form

The general form of a geometric sequence can be expressed as follows:

where:

$a$ is the first term in the geometric sequence

$r$ is the common ratio

Note that $r$ cannot be 0 or else the sequence is not geometric and will result in $\{a, 0, 0, 0,\ldots\}$.

# Example

Consider the following geometric sequence:

Here we start with 2 and multiply by 2 to get the next term in the geometric sequence.

Therefore in terms of the general form of the geometric sequence we can say:

$a$ = 2 (first term)

$r$ = 2 (common ratio)

Note that elements do not necessarily have to get larger in the sequence:

The above is a perfectly valid geometric sequence with:

$a$ = 4

$r$ = 0.5

# Sum of a geometric sequence

## Finite

The general formula for calculating the sum of a finite geometric sequence:

where:

$n$: number of terms in the geometric sequence

$a$: first term in the geometric sequence

$r$: common ratio

### Example

Consider the following finite geometric sequence with 5 terms:

Here we can see that:

$n$ = 5

$a$ = 2

$r$ = 2

Therefore the sum can be calculated as:

### Derivation

Let us represent the sum of the finite geometric sequence using $S$:

Multiplying both sides by $r$:

If we subtract the bottom equation from the top equation:

Note that when we subtract the bottom equation from the top equation the terms such as $ar, ar^2$ etc all cancel each other out.

## Infinite

The general formula for calculating the sum of a infinite geometric sequence:

We can only calculate a sum when $-1< r < 1$ (i.e. when elements in the geometric sequence progressively get closer and closer to 0). Otherwise, we are not able to calculate a sum.

### Example

Consider the following infinite geometric sequence:

Here we can see that:

$a$ = 1

$r$ = $\frac{1}{2}$

Therefore the sum can be calculated as: