First implementation of matrix inverse caching