A Computes the trace of the inverse of matrix or linear matrix function
