create a special matrix and cache the calculation of the inverse of matrix