Function to invert matrix using cache to improve