Too much matrix inverse error?

Maybe your matrix is badly conditioned (i.e., nearly singular), in which case floating-point roundoff errors are enormously amplified when you try to invert the matrix. Try computing cond(M1) to get the condition number — probably it is huge (\sim 10^{15}).

If you are solving systems with an ill-conditioned matrix, you probably need to think carefully about what you are doing. (e.g. if you need a regularization, or if the problem is exactly singular and there is some other aspect of your problem that indicates which solution you want.)

6 Likes