Which would be the most efficient way (in computational time) to compute tr(inv(H)), where H is a (dense) square matrix?


In my particular problem I also have a LU decomposition of H already available, which was used in a previous context to solve a system of linear equations. My current approach is to simply use the LU to compute the inverse and then calculate the trace. Is there any other more efficient way to achieve this, considering I already have this matrix factorized?


I could have first computed the inverse and then made a multiplication by the inverse to solve my previous system of linear equations, but I was trying to avoid multiplication by the inverse to avoid numerical inaccuracies.


Edit: Forgot to mention that under normal conditions H should be symmetric.



Fast trace of inverse of a square matrix
Given that the poster has specified that his matrix is symmetric, I offer a general solution and a special case:


1. Eigendecomposition actually becomes more attractive here: the bulk of the work is in reducing the symmetric matrix to tridiagonal form, and finding the eigenvalues of a tridiagonal matrix is an O(n) process. Assuming that the symmetric matrix is nonsingular, summing the reciprocals of the eigenvalues nets you the trace of the inverse.
2. If the matrix is positive definite as well, first perform a Cholesky decomposition. Then there are [methods](http://books.google.com/books?id=myzIPBwyBbcC&pg=PA119) for generating the diagonal elements of the inverse.


