Implemented cache-able matrix formula

Forked cahcematrix.x to create cache-able matrix so that matrix
inversion performance can be optomized