Why the method for finding the inverse of a matrix works