Code to calculate the inverse of a matrix and cache the result
for rprog-008, Assignment2