update matrix inverse functions