Caching the Inverse of a matrix