created two functions that caches matrix and returns inverse of matrix