Implementation and test methods for caching an inverse of a matrix.