Version used for inverse of a matrix