mukatre - function for caching a matrix's inverse