Throw the correct errors from matrix inverse, as specified in the ISO
standard.