Creation of the cache function for matrix inverse