My cached version of matrix inversion