Pair of functions to cache inverse of matrix and use it.