first commit of matrix inverse caching utility