Routines are modified according to the task (operate with matrix, and cache
the inverse of the original)