complete the assignement 2

calculate the inverse of matrix first time and caches it for later use