Added functions for cache inverse matrix