Updated with code to perform assigned inverse matrix functions