Checking in the functionality to cache the inverse of the matrix