Let [ a0 , a1, \ldots ,a_{k}] represent continued fraction. In previous posts I represent it by the following formula:

\displaystyle  M = S \prod_{i=0}^{k} S(ST)^{a_{i}}

where {S,T} are matrices defined as below:

S = \left| \begin{array}{cc} 0& 1\\ 1& 0\\ \end{array}   \right|; T= \left| \begin{array}{cc} 0& 1\\ 1& 1\\ \end{array}   \right|

In formulas below I will use {\textbf{I}} for {2 \times 2} unity matrix.

Formula above I will call matrix representation of continued fraction – or SST representation in short to distinguish it from usual representation by elements of {SL_{2}(Z)} group given by continued fraction tree – which I will call RL representation ( R for right, L for left. In this representation continued fraction is pointed by path – the sequence of the right-left moves on the Stern-Brocot tree). If You like to know more about SST representation You will find information in my previous posts on this blog.

For holomorphic function {f(z)} in a disk bounded by the circle {\Gamma}, it is true that for every point {a} within the disk:

\displaystyle  f(a) = \frac{1}{2\pi i} \oint_\Gamma \frac{f(z)}{z-a}\, dz

It is well known Cauchy integral representation of the holomorphic function.

Today one of articles I have read (Nick Higham „The f(A)b Problem”(2011) ), reminds me that this formula has also matrix form.

If {f(\textbf{A})} is regular enough function of the matrix, for example {exp(A)} or {A^{1/2}} there is true that:

\displaystyle  f(\textbf{A}) = \frac{1}{2\pi i} \oint_\Gamma f(z)(z\textbf{I}-\textbf{A})^{(-1)}\, dz

where {\Gamma} is integral contour on the complex plane containing every eigenvalues of {\textbf{A}} matrix inside. What is interesting this formal looking formula has very practical use, and gives numerically accurate results ( N. Hale, N. J. Higham and L. N. Trefethen
„Computing A^{\alpha}, log(A), and related matrix functions by contour integrals”
SIAM J. Numer. Anal., Vol. 46, No. 5, 2505-2523. 2008 ) in certain computations. I know matrix formula earlier, but information that it may be efficient in numerical context was new, and surprising for me.

I want to use Cauchy formula in matrix form in order to rewrite matrix continued fraction representation. It is not complicated, nor revolutionary, but is worth to mention, that because representation I use here is algebraically more „homogeneous” than well known „RL” representation by matrices from {SL_{2}(Z)}, results is nice looking, and probably may be useful.

At first we consider simple function {f(\textbf{A})} looking like one element of the product of in the SST representation ( given by the first formula in this post). I will write it in the form {f(\textbf{ST}) = (\textbf{ST})^a}. Using formula above we obtain:

\displaystyle  \textbf{S}f(\textbf{ST}) = \textbf{S}(\textbf{ST})^a = \textbf{S}\frac{1}{2\pi i} \oint_\Gamma z^{a}(z\textbf{I}-\textbf{ST})^{(-1)}\, dz \ \ \ \ \ (4)

We have to use contour of the integral above such that eigenvalues of {\textbf{ST}} matrix will be inside. So we have to compute it – it is straightforward ( I have used Sage for that, but it may be computed without any problems on the paper with a pen and a brain) that spectrum of {\textbf{ST}} consist of one degenerated eigenvalue {\lambda = 1}.

So w are ready tu use last integral to put it into SST representation matrix formula. We obtain what follows:

\textbf{M} = \textbf{S} \prod_{i=0}^{k} \textbf{S}(\textbf{ST})^{a_{i}} =

\textbf{S} \frac{1}{(2\pi i)^{k}} \oint_{\Gamma_{0}} \ldots \oint_{\Gamma_{k}} z_{0}^{a_{0}} \ldots z_{k}^{a_{k}} \prod_{i=0}^{k} \textbf{S}(z_{i}\textbf{I}-\textbf{ST})^{(-1)}\, dz_{0} \ldots dz_{k}

For me – it looks interesting:

  1. term {\textbf{S} ( z_{i} \textbf{I}-\textbf{ST})^{(-1)}} may be easily computed in closed form. I put it in Sage and obtained the following result:

    \textbf{S} ( z_{i} \textbf{I}-\textbf{ST})^{(-1)} =  \left( \begin{array}{cc} 0 & \frac{1}{z_{i} - 1} \\ \frac{1}{z_{i} - 1} & \frac{1}{(z_{i} - 1)^{2}} \\ \end{array} \right)

  2. the whole dependency on {a_{i}} coefficients now is not related to any matrix operations which means we may for example compute derivatives etc.
  3. contour \Gamma_{i} may be shaped at will with great freedom, because all integrals above has poles on eigenvalues of {\textbf{ST}} matrix, which is {\lambda = 1}. It means that we have additional freedom to use for example nice rectangle shaped contour.
  4. term {\textbf{S}(z_{i}\textbf{I}-\textbf{ST})^{(-1)}} is matrix {2 \times 2} so it may be decomposed in {I,S,T,L} base defined in earlier posts. It gives interesting possibilities. One is specially interesting – {z_{i}} here is a integration complex variable. In posts before, base {I,S,T,L} was used to construct a ring over rational numbers {Q[{I,S,T,L}]}. In that space {SL_{2}(Z)} matrices lays on quadric defined in one of the posts before. Maybe it is interesting to generalise description to complex variables, and connect it with choice of contour of integration. It may gives us a integral formula for continuants as well…

It will be worth to check if everything is ok with formulas above – analytically ( in simple cases) and especially numerically. I have further ideas so stay tuned ;-)