Completed assignment according to specifications

Added two functions for solving an inverse matrix and caching the
result. Trying to calculate the result a second time will fetch the
cached result.