Illustrated · 2 min
Conservation of charge is one of the fundamental properties of nature. Charge is locally conserved. In this article, I will explain later what I mean by locally conserved.
Suppose that we have an isolated system. This system can be a box which is completely isolated from its surroundings. It can't conduct heat, electricity or anything. If the total charge inside our system is 0. It will be 0 forever, doesn't matter how much time has gone or how time flies. It will be 0 forever.
Similarly if our system has some nonzero Q charges, the magnitude of the charges will remain constant in it until it is isolated from everything.
But sometimes we can find an extra electron and an extra positron in our system simultaneously. They can be appeared from absolute nothing or can be appeared from gamma ray due to quantum fluctuation. But the law of conservation of charge is still true. Because the positron has the same positive charge as magnitude what the electron has but opposite in sign. So, the total charge will be same again in our system because the sign of positron and electron will cancel each other.
We can see a gamma ray converted into an electron and a positron from a definite point of space simultaneously. This conversion happens at a point. But it will never happen inside the system where electron and positron appear at two different coordinates of space . In spite of conservation of charge inside the box, it won't take place. Because, from a distant observer with 'v' velocity relative to our frame of reference can see that this appearance doesn't happen simultaneously for relativistic effect and for a very short time, he may disagree with the law of conservation of charge. This opposition is against charge conservation. So, they open out from the same point of space simultaneously. This is why charge is locally conserved.

Conservation of charge and pair production(Suppose we have an isolated system with a very heavy nucleus and a gamma ray. If the gamma ray hits the nucleus, an electron and a positron will be appeared simultaneously through pair production from a specific point of co-ordinate system. The charge of our isolated system is still the charge of the nucleus. Because the charge of electron and its anti particle positron have the same amount of charge but opposite in nature.)