Wrote functions to cache the inverse of the matrix