# Sum of elements of inverse matrix

Assume NxN matrix A of complex values. I want to calculated the sum of all elements of its inverse. Does anybody have any good idea how to do this? The problem is that calculating the inverse is computationally expensive and since I am looking only for the sum of its elements, I thought there might be something smarter to do.

Note: the real part of A is diagonal while the imaginary is a 2x2 block matrix of symmetric submatrices.

Thanks

-
–  Zev Chonoles Feb 18 '13 at 16:16

Let $\vec{1}$ denote the vector all of whose entries are $1$. Use Gaussian elimination (or, better, a fast matrix library with Gaussian elimination already implemented for you) to solve $$A \vec{v} = \vec{1}.$$ Then the dot product $\vec{1} \cdot \vec{v}$ will equal $\vec{1}^T A^{-1} \vec{1}$, which is what you want. A fast implementation of Gaussian elimination should beat a fast implementation of matrix inverse.