Matrix inverse caching