matrix inverse, mult, algorithm