Finds inverse matrix