Inverse matrix

Fill in the coding to cache and calculate the inverse of the matrix.