Cached Matrix

Two functions to cache an inverted matrix to save processing time.