doing cached the inverse of matrix