Calculating matrix inverse

These functions, calculate or get the inverse of a matrix if the inverse
exists in the cache.