couldn't you just take the inverted matrix?