implemented a set of functions to compute the inverse of a matrix and save the result in cache