inverse of matrix caching