Computing inverse of a matrix

The functions reduce the computation time of calculating the inverse of
a matrix by storing it in the cache.