Matrix squaring can also rapidly sum the geometric series

The geometric series, S_{n}(x) = \sum_{k=0}^{n} x^k, satisfies a linear recurrence S_{n+1}(x) = x \, S_n(x) + 1 with constant (in n ) coefficients. This means it can also be written as a matrix power, S_{n}(x) = \begin{pmatrix} 1 & 0 \end{pmatrix} M^{n} \begin{pmatrix} 1 \\ 1 \end{pmatrix}, with M = \begin{pmatrix} x & 1 \\ 0 & 1 \end{pmatrix}. Repeatedly squaring M can rapidly generate high…