Implement inverse-caching matrix