Adding code for the caching functions of the matrix inverse