hw 2 assigmnet cache invert matrix calculation