Caching the inverse of the matrix