created inverse matrix cache functions