Functions that create a caching mechanism to store the inverse of the matrix.