Complete the function caching the inverse of a matrix