Update the cachematrix function by adding the cache code and by using the solve function to calculate the inverse matrix