Cache the inverse of a matrix