Creating 2 new function which cache result of matrix inversion