Made 2 functions

One to store value of matrix in a list and another one to get its
Inverse value and also to cache the value