## Question: Finding inverse of an ill-conditioned matrix

I am trying to implement a numerical method, which requires me to compute the inverse of a 6x6 matrix (A) at some point. This matrix consists of four 3x3 matrices (B1...4) `A = [[B1, B2], [B3, B4]]`

. While the magnitude of the entries within a 3x3 matrix is roughly the same, the magnitude across the 3x3 matrices differs quite a lot. (Example of 6x6 matrix below)

**Issue:** When computing the inverse of this matrix, the resulting matrix deviates a lot from the expected result. I tried to confirm this by computing `I = A*A^-1`

, but the result is far from the identity matrix. I assume this is the case due to the bad condition of the matrix since the differences between each 3x3 matrix are so large.

Does anyone know a method to compute the inverse of such a matrix?

My current idea would be to multiply each 3x3 matrix by a coefficient in order to lower the differences between each 3x3 matrix `A = [[B1*a, B2*b], [B3*c, B4*d]]`

. After that, I would compute the inverse and then try to deduct the coefficients from the resulting matrix. However, I find it difficult to determine a way of performing the last step.

**Example:**

`[1.28872490245158e-06 1.4637613938654e-07 -1.70029707059287e-07 -18.6570630324193 -239.692934347905 -314.364362678385; 1.4637613938654e-07 1.6625715962304e-08 -1.9312338927429e-08 -2.1191092480495 -27.2248377456929 -35.7061787834127; -1.70029707059287e-07 -1.9312338927429e-08 2.24331051783591e-08 2.46154548263497 31.6242196715729 41.4760981140375; -18.6570630324193 -2.1191092480495 2.46154548263497 13813398787722.4 -52045116012728.7 59648566307319.4; -239.692934347905 -27.2248377456929 31.6242196715729 -52045116012728.7 456984106570523 1138610755446.41; -314.364362678385 -35.7061787834127 41.4760981140375 59648566307319.4 1138610755446.41 453138063298379] `