First version of functions for caching and solving the inverse of a matrix