Inverts a matrix and caches the results

Calculates the inverse of a matrix and caches the results.  Cache can be
retrieved for future calculations without reprocessing