Cached Matrix

Two functions to store an inverted matrix and save computation time.