created functions to cache inverse matrix computations