Code to cache and acquire inverse of a matrix

Final code