Cache of matrix inversion

error in variables