# Inversion of matrix with rows and zeros

Based on how a system must work I noticed the following simplification of matrix inversion for a given pattern of zeros in rows and columns and I would like to know if there is general proof that says this is always true. Let me show an example of the simplification.

A =
[  a1,  a2,   0,   0,  a5]
[  a6,  a7,   0,   0, a10]
[   0,   0, a13, a14,   0]
[   0,   0, a17, a18,   0]
[ a21, a22,   0,   0, a25]


This matrix has zeros in third and fourth row and columns except for the elements within the cross of those zeros. This matrix can represent a system of which variables 3 and 4 are independent of the others. Therefore when one inverts B to solve such a system one must preserve that variables 3 and 4 are still independent. Therefore it follows that the zeros that exist in B will preserve in B^-1 in the same position. Moreover, one can perform the matrix inversion by splitting in two matrices such as:

A1 =
[  a1,  a2,  a5]
[  a6,  a7, a10]
[ a21, a22, a25]

A2 =
[ a13, a14]
[ a17, a18]


And then just inverting them independently:

A1^-1 =
[  b1,  b2,  b5]
[  b6,  b7, b10]
[ b21, b22, b25]

A2^-1 =
[ b13, b14]
[ b17, b18]


The original matrix inversion is formed by combining them:

A^-1 =
[  b1,  b2,   0,   0,  b5]
[  b6,  b7,   0,   0, b10]
[   0,   0, b13, b14,   0]
[   0,   0, b17, b18,   0]
[ b21, b22,   0,   0, b25]


My point being is that this property holds for any other combinations where the zeros make this happen (for example a 10x10 matrix with 4 other variables being independent of which 2 are together and 2 alone, etc.)

Is there a known proof somewhere for this property of matrix inversion?

The only thing left to prove is that the inverse of a transform is the transform of the inverse, i.e. $({P^{-1}AP})^{-1} = P^{-1}A^{-1}P$, but that is almost trivial.