Assignment 2 to cache inverse matrix