Inverse of a sparse matrix could be dense, but what if I'm only interested in the main diagonal of the result? Is there a method that is more efficient than computing the full inverse?
You may be interested in work of Jok M. Tang and Yousef Saad. Their recent paper "Domain-decomposition-type methods for computing the diagonal of a matrix inverse" has the following abstract:
This(explanation of how to find diagonal of an inverse of a sparse matrix) should help.