Made changes to cache function for inverse matrix.