Matrix Inversion problem on more than 2x2 matrix

I cannot get MINVERSE to work with matrices larger than 2x2. The attached spreadsheet illustrates the problem. A 2x2 matrix is inverted perfectly, but 3x3 and 4x4 return only Err:502 in all the inverted matrix cells.

The method I am using to enter the formula is to highlight the block of cells where the inverted matrix is to be placed, then while the block is still highlighted, in the first cell entering e.g. MINVERSE(B12:E15) and pressing Ctrl-Shift-Enter. The formula with curly brackets around is inserted into all the cells, but only the 2x2 inverted matrix displays numbers.

Sorry - I now realise that the examples I was using for the 3x3 and 4x4 matrices can’t be inverted, and that the formulas work correctly if the values are changed.

Matrix Inversion.ods (9.8 KB)

Not every matrix has an inverse. It does not depend on the size of the matrix but the values of its elements. More specifically, if the determinant is 0 then the matrix is singular and not invertible. You can check with the MDETERM() function.

Inverse of a Matrix
Matrix Inverse -- from Wolfram MathWorld

I was following an example of solving simultaneous equations by matrix algebra and there was an error in the example equations, which produced a coefficient matrix that cannot be inverted! I have now learned more than I expected to, and your suggestion to use the MDETERM() function is very useful, thank you.