[PA-2] Matrix inverse computation caching