Created functions for calculating and caching matrix inverses modelled
after the sample vector operation code from Programming Assignment 2.