# Matrix machinery to do factorial. Are there algebraic methods, decompositions or functions to work systematically with constructing such machineries?

Assuming we have a row selection matrix $\bf P$, moving up row 2 to row 1 and eliminating row 1:

$${\bf P} = \left[\begin{array}{cc}0&1\\0&0\end{array}\right]$$ And an "adder matrix" $\bf S$:

$${\bf S} = \left[\begin{array}{cc}1&0\\1&1\end{array}\right] \hspace{0.5cm} \text{with property:}\hspace{0.5cm} {\bf S}^k = \left[\begin{array}{cc}1&0\\k&1\end{array}\right]$$ We can construct a matrix that systematically calculates the factorial $$\left(\prod_{k=1}^N {\bf PS}^k\right)\left[\begin{array}{c}1\\0\end{array}\right] = \left[\begin{array}{c}N!\\0\end{array}\right]$$

We can convince ourselves that this works by viewing the purpose of each matrix separately. We kind of use vector index=2 as an "additive accumulator" and index=1 as the place for calculating the product.

But does there exist any theory which allows us to understand or analyze this in some other way? Or at least let us construct it in a cleaner, more systematic way? Maybe matrix logarithms or other functions or decompositions? Maybe there exists power series expansions for factorial?

• There is $\Gamma(n) = \int_0^{\infty} x^{n-1} e^{-x} dx$ and when $n$ is a positive integer $\Gamma(n) = (n-1)!$ – Doug M Mar 24 '17 at 18:06