Added function to cache the inverse of a matrix and to return the inverse