Coded matrix inversion caching and comments

With initial fork of Peng's skeleton, added code based upon template provided within instructions for the assignment that cached results from function "mean".