Function for caching the Inverse of a Matrix.