 The total charge "q" in volume "V" is the integral (sum) of the charge density in "V"
So, by the Leibniz integral rule
Equating (1) and (2) gives
Since this is true for every volume, we have in general

Charge conservation can also be understood as a consequence of symmetry through Noether's theorem, a central result in theoretical physics that asserts that each conservation law is associated with a symmetry of the underlying physics.The symmetry that is associated with charge conservation is the global gauge invariance of the electromagnetic field.This is related to the fact that the electric and magnetic fields are not changed by different choices of the value representing the zero point of electrostatic potential formula_24.