# Inverting variable size block matrix

Given a block matrix $$M$$

$$\bf M=\left(\begin{array}{cccc} a\ \mathbb{I}_{2} & \boldsymbol{\boldsymbol{A}}_{12} & \boldsymbol{A}_{13} & \boldsymbol{0_{(2,3)}}\\ \\ \boldsymbol{A_{21}} & a\ \mathbb{I}_{2} & \boldsymbol{A_{23}} & \boldsymbol{0_{(2,3)}}\\ \\ \boldsymbol{A_{31}} & \boldsymbol{A_{32}} & a\ \mathbb{I}_{2} & \boldsymbol{0_ {(2,3)}}\\ \boldsymbol{0_{(3,2)}} & \boldsymbol{0_{(3,2)}} & \boldsymbol{0_{(3,2)}} & b\ \mathbb{I}_{3} \end{array}\right)$$

where $$\bf 0_{(m,n)}$$ is an $$\ m\times n$$ matrix with all entries equal to zero.

We need to find $$\bf M^{-1}$$ and I wondered if there were any theorems that allow me to invert this matrix block by block?

Also, how does the problem change for $$A_{kl}=A_{lk},\ \ \ k,l=1,2,3$$?

For block $$2\times 2$$ matrices one generally use the Schure complements (which is nothing more than the block version of Gaussian elimination). Theoretically you can recursively use this for a $$n\times n$$ ($$n>2$$) block matrix. However this is not a good idea because you will get overly complex formula without any practical value (with nested inverses etc...).
Beside this comment, observe that: $$M^{-1}=\left( \begin{array}{cc} A^{-1}& 0 \\ 0 & b^{-1}I \end{array} \right)$$ with $$A=\left( \begin{array}{ccc} aI & A_{12} & A_{13} \\ A_{21} & aI & A_{23} \\ A_{31} & A_{32} & aI \end{array} \right)$$ which is certainly the first simplification to considere.