inverse of matrix functions