# Blockwise diagonal matrix inversion

I have a blockwise-diagonal matrix (not sure how to call it). It basically has square blocks of non-zero elements on the diagonal, and zeros everywhere else. The matrix takes the following form:

$$M = \begin{bmatrix} M_1 & 0 & \dots & 0 \\ 0 & M_2 & \dots & 0 \\ 0 & 0 & \dots & M_n \end{bmatrix}$$

Now I know that the inverse of a general two by two blockwise matrix can be expressed like so:

$$Z = \begin{bmatrix} A & B \\ C & D \end{bmatrix}$$

$$Z^{-1} = \begin{bmatrix} (A-BD^{-1}C)^{-1} & -(A-BD^{-1}C)^{-1}BD^{-1} \\ -D^{-1}C(A-BD^{-1}C)^{-1} & D^{-1}+D^{-1}C(A-BD^{-1}C)^{-1}BD^{-1} \end{bmatrix}$$

If I replace B's and C's by 0, I get the following (to me logical) invert:

$$Z^{-1} = \begin{bmatrix} A^{-1} & 0 \\ 0 & D^{-1} \end{bmatrix}$$

My question is, does this stand for a blockwise matrix that has more than two by two blocks? Is the following true?

$$M^{-1} = \begin{bmatrix} M_1^{-1} & 0 & \dots & 0 \\ 0 & M_2^{-1} & \dots & 0 \\ 0 & 0 & \dots & M_n^{-1} \end{bmatrix}$$

• Yes (if the blocks are square blocks, naturally), since you can multiply by blocks and obtain the block-diagonal matrix $\operatorname{Diag}(I_1, I_2, \dots, I_n)$. – Bernard Nov 8 '16 at 16:54
• Yes, I was currently heading in that direction :) – levesque Nov 8 '16 at 17:08
• Great minds think together! ;o) – Bernard Nov 8 '16 at 17:24

## 2 Answers

Hint: consider $$M = \pmatrix{ A & 0 & 0 \\ 0 & B & 0 \\ 0 & 0 & C} = \pmatrix{ \pmatrix{ A & 0 \\ 0 & B} & 0 \\ 0 & C}$$

• Not false, but... does it bring something ?... – Jean Marie Nov 8 '16 at 17:08

I ended up figuring it out in the direction proposed by Bernard. Here's the development.

Given the matrix we are trying to invert, $M$, the product of this matrix by its invert should give an identity diagonal matrix, like so:

$$M = \begin{bmatrix} A_{11} & 0 & \dots & 0 \\ 0 & A_{22} & \dots & 0 \\ \dots & \dots & \dots & \dots \\ 0 & 0 & \dots & A_{nn} \\ \end{bmatrix}$$

$$MM^{-1}= \begin{bmatrix} I & 0 & \dots & 0 \\ 0 & I & \dots & 0 \\ \dots & \dots & \dots & \dots \\ 0 & 0 & \dots & I \\ \end{bmatrix}$$.

If we assign block matrix variables to $M^{-1}$, we'll get a series of equation to solve:

$$M^{-1} = \begin{bmatrix} W_{11} & W_{12} & \dots & W_{1n} \\ W_{21} & W_{22} & \dots & W_{2n} \\ \dots & \dots & \dots & \dots \\ W_{n1} & W_{n2} & \dots & W_{nn} \\ \end{bmatrix}$$

These equations essentially boil down to two forms, one items which will be on the diagonal of the resulting matrix (product of line=column=i):

$$A_{1i}W_{i1} + A_{2i}W_{i2} + \dots + A_{ni}W_{in} = I \\ A_{ii}W_{ii} = I \\ W_{ii} = A_{ii}^{-1}$$

Since all $A_{ij}$ where $i \neq j$ is zero, we get the second line of the previous equation. The other form is items which will be off the diagonal, or the product of line i with column j:

$$A_{1i}W_{j1} + A_{2i}W_{j2} + \dots + A_{ni}W_{jn} = 0 \\ A_{ii}W_{ji} = 0 \\ W_{ji} = 0$$

So we end up with the desired form.