How to invert a block tridiagonal matrix?

I'm dealing with the inversion of a pretty large block-matrix, whereby I am only interested in a particular block of the inverse. I would like to avoid the inversion of the whole matrix and I wonder whether there exist a convenient inversion rule for my case (as with, e.g., block diagonal matrices or Toeplitz matrices).

The matrix has the form $$M = \begin{pmatrix} A_1 & -I_n & 0 & ... & ... & 0 \\ -I_n & A_2 & -I_n & 0 & ... & 0 \\ 0 & -I_n & A_3 & -I_n & ... & 0 \\ & &... &... & ...& \\ & & &... & ...& ... \\ & & & &-I_n & A_T\end{pmatrix}$$,

where $$A_i$$ has dimension $$n \times n~ \forall i$$. The block of $$M^{-1}$$ that I am interested in is the last $$n \times n$$ block (corresponding to $$A_T$$ in $$M$$). I would be grateful for any suggestions! Thanks in advance!

• Googling "block tridiagonal matrix inverse" led me to a couple of promising results. Have you tried that? – Arthur Aug 9 at 12:40

Let $$M_{i}:=M_{[(i-1)n+1:n],[(i-1)n+1:n]}$$, such that, e.g. $$M_T = A_T$$. Then I obtain my desired block of the inverse as follows:
$$(M^{-1})_{T}=[A_T-Y_T]^{-1}$$, where $$Y_i$$ is defined recursively as $$Y_1 = 0$$, $$Y_i = (A_{i-1}-Y_{i-1})^{-1}$$ for $$i=2:T$$.