Commiting the code for caching inverse of matrix