cachematrix function is created to cache the inverse of a matrix