Updated example code to cache and inverse matrix

Updated example code to cache and inverse matrix but still need to add
comments when I’ve figured out how it works!