# Optimize speed for calculating the approximate inverse of a large matrix

I am searching for a faster method to calculate an approximate inverse of a large matrix (up to 32000x32000) resulting from a discrete non-linear system of partial differential equations. I'm using C++ together with the Eigen library (MKL activated). Unfortunately the resulting matrix is not sparse as it can be seen in:

The blue entries denotes negative and the orange positive numbers. Currently I'm using a block matrix inversion scheme and then a partialPivLu() decomposition from Eigen to calculate the necessary inverses. The matrix has no specific properties like definiteness. Is there the possibility of a faster algorithm for a matrix with such a structure than to calculate the inverse or rather to solve the linear system of equations $$Ax=b$$ with the standard implementation of a Housholder or Lu decomposition?

• Do you need the actual entries of the inverse, or do you just need to solve linear systems with it? Nov 14 '20 at 13:19
• I need to solve a non-linear system of equations. For the update scheme I'm using I need every few time steps of the time evolution a full Newton-Update (Newton-Raphson-Method), because of accuracy. Nov 14 '20 at 15:39
• OK, then you just need to solve linear systems with that matrix, if I understand correctly. Nov 14 '20 at 15:42
• If I understand you correctly, yes, I only need to solve a linear system with this matrix to approximate the inverse. Nov 14 '20 at 16:13
• @enco909 Welcome to scicomp! In is always more safe solve the linear sistem than to use an inverse. This is also true for the speed aspect in almost all the case Nov 14 '20 at 18:00