Working inverse matrix function

Code for the cached inverse matrix function