Written pair of function to cache inverse of square matrix, tested. Works