Programm to cache an inverse of a matrix