Checked in two functions to cache and retrieve the inverse of a matrix