inverse of a matrix with caching

committing initial version