Caching inverse of the matrix