Matrix inverting implemented