matrix inversion. Also added isClose() method