# Carleman matrix

In mathematics, a Carleman matrix is a matrix used to convert function composition into matrix multiplication. It is often used in iteration theory to find the continuous iteration of functions which cannot be iterated by pattern recognition alone. Other uses of Carleman matrices occur in the theory of probability generating functions, and Markov chains.

## Definition

The Carleman matrix of an infinitely differentiable function $f(x)$ is defined as:
    $M[f]_{jk}={\frac {1}{k!}}\left[{\frac {d^{k}}{dx^{k}}}(f(x))^{j}\right]_{x=0}~,$
so as to satisfy the (Taylor series) equation:
    $(f(x))^{j}=\sum _{k=0}^{\infty }M[f]_{jk}x^{k}.$
For instance, the computation of $f(x)$ by
    $f(x)=\sum _{k=0}^{\infty }M[f]_{1,k}x^{k}.~$
simply amounts to the dot-product of row 1 of $M[f]$ with a column vector $\left[1,x,x^{2},x^{3},...\right]^{\tau }$.
The entries of $M[f]$ in the next row give the 2nd power of $f(x)$:
    $f(x)^{2}=\sum _{k=0}^{\infty }M[f]_{2,k}x^{k}~,$
and also, in order to have the zeroth power of $f(x)$ in $M[f]$, we adopt the row 0 containing zeros everywhere except the first position, such that
    $f(x)^{0}=1=\sum _{k=0}^{\infty }M[f]_{0,k}x^{k}=1+\sum _{k=1}^{\infty }0\cdot x^{k}~.$
Thus, the dot product of $M[f]$ with the column vector ${\begin{bmatrix}1,x,x^{2},...\end{bmatrix}}^{T}$ yields the column vector $\left[1,f(x),f(x)^{2},...\right]^{T}$, i.e.,
    $M[f]{\begin{bmatrix}1\\x\\x^{2}\\x^{3}\\\vdots \end{bmatrix}}={\begin{bmatrix}1\\f(x)\\(f(x))^{2}\\(f(x))^{3}\\\vdots \end{bmatrix}}.$

## Generalization

A generalization of the Carleman matrix of a function can be defined around any point, such as:
    $M[f]_{x_{0}}=M_{x}[x-x_{0}]M[f]M_{x}[x+x_{0}]$
or $M[f]_{x_{0}}=M[g]$ where $g(x)=f(x+x_{0})-x_{0}$. This allows the matrix power to be related as:
    $(M[f]_{x_{0}})^{n}=M_{x}[x-x_{0}]M[f]^{n}M_{x}[x+x_{0}]$

### General Series

    Another way to generalize it even further is think about a general series in the following way:
    Let $h(x)=\sum _{n}c_{n}(h)\cdot \psi _{n}(x)$ be a series approximation of $h(x)$, where $\{\psi _{n}(x)\}_{n}$ is a basis of the space containing $h(x)$
    Assuming that $\{\psi _{n}(x)\}_{n}$ is also a basis for $f(x)$, We can define $G[f]_{mn}=c_{n}(\psi _{m}\circ f)$, therefore we have $\psi _{m}\circ f=\sum _{n}c_{n}(\psi _{m}\circ f)\cdot \psi _{n}=\sum _{n}G[f]_{mn}\cdot \psi _{n}$, now we can prove that $G[g\circ f]=G[g]\cdot G[f]$, if we assume that $\{\psi _{n}(x)\}_{n}$ is also a basis for $g(x)$ and $g(f(x))$.
    Let $g(x)$ be such that $\psi _{l}\circ g=\sum _{m}G[g]_{lm}\cdot \psi _{m}$ where $G[g]_{lm}=c_{m}(\psi _{l}\circ g)$.
    Now
    Comparing the first and the last term, and from $\{\psi _{n}(x)\}_{n}$ being a base for $f(x)$, $g(x)$ and $g(f(x))$ it follows that $G[g\circ f]=\sum _{m}G[g]_{lm}G[f]_{mn}=G[g]\cdot G[f]$

#### Examples
##### Rederive (Taylor) Carleman Matrix

If we set $\psi _{n}(x)=x^{n}$ we have the Carleman matrix. Because $h(x)=\sum _{n}c_{n}(h)\cdot \psi _{n}(x)=\sum _{n}c_{n}(h)\cdot x^{n}$ then we know that the n-th coefficient $c_{n}(h)$ must be the nth-coefficient of the taylor series of $h$. Therefore $c_{n}(h)={\frac {1}{n!}}h^{(n)}(0)$ Therefore $G[f]_{mn}=c_{n}(\psi _{m}\circ f)=c_{n}(f(x)^{m})={\frac {1}{n!}}\left[{\frac {d^{n}}{dx^{n}}}(f(x))^{m}\right]_{x=0}$ Which is the Carleman matrix given above. (It's important to note that this is not an orthornormal basis)

##### Carleman Matrix For Orthonormal Basis

If $\{e_{n}(x)\}_{n}$ is an orthonormal basis for a Hilbert Space with a defined inner product $\langle f,g\rangle$, we can set $\psi _{n}=e_{n}$ and $c_{n}(h)$ will be ${\displaystyle \langle h,e_{n}\rangle }$. Then $G[f]_{mn}=c_{n}(e_{m}\circ f)=\langle e_{m}\circ f,e_{n}\rangle$.

##### Carleman Matrix for Fourier Series

If $e_{n}(x)=e^{inx}$ we have the analogous for Fourier Series. Let ${\hat {c}}_{n}$ and ${\hat {G}}$ represent the carleman coefficient and matrix in the fourier basis. Because the basis is orthogonal, we have.
    ${\hat {c}}_{n}(h)=\langle h,e_{n}\rangle ={\cfrac {1}{2\pi }}\int _{-\pi }^{\pi }\displaystyle h(x)\cdot e^{-inx}dx$.
Then, therefore, ${\hat {G}}[f]_{mn}={\hat {c_{n}}}(e_{m}\circ f)=\langle e_{m}\circ f,e_{n}\rangle$ which is
    ${\hat {G}}[f]_{mn}={\cfrac {1}{2\pi }}\int _{-\pi }^{\pi }\displaystyle e^{imf(x)}\cdot e^{-inx}dx$

## Properties

Carleman matrices satisfy the fundamental relationship
* $M[f\circ g]=M[f]M[g]~,$
which makes the Carleman matrix M a (direct) representation of $f(x)$. Here the term $f\circ g$ denotes the composition of functions $f(g(x))$.
Other properties include:
* $\,M[f^{n}]=M[f]^{n}$, where $\,f^{n}$ is an iterated function and
* $\,M[f^{-1}]=M[f]^{-1}$, where $\,f^{-1}$ is the inverse function (if the Carleman matrix is invertible).

## Examples

The Carleman matrix of a constant is:
    $M[a]=\left({\begin{array}{cccc}1&0&0&\cdots \\a&0&0&\cdots \\a^{2}&0&0&\cdots \\\vdots &\vdots &\vdots &\ddots \end{array}}\right)$
The Carleman matrix of the identity function is:
    $M_{x}[x]=\left({\begin{array}{cccc}1&0&0&\cdots \\0&1&0&\cdots \\0&0&1&\cdots \\\vdots &\vdots &\vdots &\ddots \end{array}}\right)$
The Carleman matrix of a constant addition is:
    $M_{x}[a+x]=\left({\begin{array}{cccc}1&0&0&\cdots \\a&1&0&\cdots \\a^{2}&2a&1&\cdots \\\vdots &\vdots &\vdots &\ddots \end{array}}\right)$
The Carleman matrix of the successor function is equivalent to the Binomial coefficient:
    $M_{x}[1+x]=\left({\begin{array}{ccccc}1&0&0&0&\cdots \\1&1&0&0&\cdots \\1&2&1&0&\cdots \\1&3&3&1&\cdots \\\vdots &\vdots &\vdots &\vdots &\ddots \end{array}}\right)$
    $M_{x}[1+x]_{jk}={\binom {j}{k}}$
The Carleman matrix of the logarithm is related to the (signed) Stirling numbers of the first kind scaled by factorials:
    $M_{x}[\log(1+x)]=\left({\begin{array}{cccccc}1&0&0&0&0&\cdots \\0&1&-{\frac {1}{2}}&{\frac {1}{3}}&-{\frac {1}{4}}&\cdots \\0&0&1&-1&{\frac {11}{12}}&\cdots \\0&0&0&1&-{\frac {3}{2}}&\cdots \\0&0&0&0&1&\cdots \\\vdots &\vdots &\vdots &\vdots &\vdots &\ddots \end{array}}\right)$
    $M_{x}[\log(1+x)]_{jk}=s(k,j){\frac {j!}{k!}}$
The Carleman matrix of the logarithm is related to the (unsigned) Stirling numbers of the first kind scaled by factorials:
    $M_{x}[-\log(1-x)]=\left({\begin{array}{cccccc}1&0&0&0&0&\cdots \\0&1&{\frac {1}{2}}&{\frac {1}{3}}&{\frac {1}{4}}&\cdots \\0&0&1&1&{\frac {11}{12}}&\cdots \\0&0&0&1&{\frac {3}{2}}&\cdots \\0&0&0&0&1&\cdots \\\vdots &\vdots &\vdots &\vdots &\vdots &\ddots \end{array}}\right)$
    $M_{x}[-\log(1-x)]_{jk}=|s(k,j)|{\frac {j!}{k!}}$
The Carleman matrix of the exponential function is related to the Stirling numbers of the second kind scaled by factorials:
    $M_{x}[\exp(x)-1]=\left({\begin{array}{cccccc}1&0&0&0&0&\cdots \\0&1&{\frac {1}{2}}&{\frac {1}{6}}&{\frac {1}{24}}&\cdots \\0&0&1&1&{\frac {7}{12}}&\cdots \\0&0&0&1&{\frac {3}{2}}&\cdots \\0&0&0&0&1&\cdots \\\vdots &\vdots &\vdots &\vdots &\vdots &\ddots \end{array}}\right)$
    $M_{x}[\exp(x)-1]_{jk}=S(k,j){\frac {j!}{k!}}$
The Carleman matrix of exponential functions is:
    $M_{x}[\exp(ax)]=\left({\begin{array}{ccccc}1&0&0&0&\cdots \\1&a&{\frac {a^{2}}{2}}&{\frac {a^{3}}{6}}&\cdots \\1&2a&2a^{2}&{\frac {4a^{3}}{3}}&\cdots \\1&3a&{\frac {9a^{2}}{2}}&{\frac {9a^{3}}{2}}&\cdots \\\vdots &\vdots &\vdots &\vdots &\ddots \end{array}}\right)$
    $M_{x}[\exp(ax)]_{jk}={\frac {(ja)^{k}}{k!}}$
The Carleman matrix of a constant multiple is:
    $M_{x}[cx]=\left({\begin{array}{cccc}1&0&0&\cdots \\0&c&0&\cdots \\0&0&c^{2}&\cdots \\\vdots &\vdots &\vdots &\ddots \end{array}}\right)$
The Carleman matrix of a linear function is:
    $M_{x}[a+cx]=\left({\begin{array}{cccc}1&0&0&\cdots \\a&c&0&\cdots \\a^{2}&2ac&c^{2}&\cdots \\\vdots &\vdots &\vdots &\ddots \end{array}}\right)$
The Carleman matrix of a function $f(x)=\sum _{k=1}^{\infty }f_{k}x^{k}$ is:
    $M[f]=\left({\begin{array}{cccc}1&0&0&\cdots \\0&f_{1}&f_{2}&\cdots \\0&0&f_{1}^{2}&\cdots \\\vdots &\vdots &\vdots &\ddots \end{array}}\right)$
The Carleman matrix of a function $f(x)=\sum _{k=0}^{\infty }f_{k}x^{k}$ is:
    $M[f]=\left({\begin{array}{cccc}1&0&0&\cdots \\f_{0}&f_{1}&f_{2}&\cdots \\f_{0}^{2}&2f_{0}f_{1}&f_{1}^{2}+2f_{0}f_{2}&\cdots \\\vdots &\vdots &\vdots &\ddots \end{array}}\right)$

## Related matrices

The Bell matrix or the Jabotinsky matrix of a function $f(x)$ is defined as
    $B[f]_{jk}={\frac {1}{j!}}\left[{\frac {d^{j}}{dx^{j}}}(f(x))^{k}\right]_{x=0}~,$
so as to satisfy the equation
    $(f(x))^{k}=\sum _{j=0}^{\infty }B[f]_{jk}x^{j}~,$
These matrices were developed in 1947 by Eri Jabotinsky to represent convolutions of polynomials. It is the transpose of the Carleman matrix and satisfy
$B[f\circ g]=B[g]B[f]~,$ which makes the Bell matrix B an anti-representation of $f(x)$.