Adding code with the two functions to cache inverse of matrix