Implement cachable matrix inverse operation.