where
In special relativity, the statement of charge conservation (also called the continuity equation) is that the Lorentz invariant divergence of J is zero:
where D is an operator called the four-gradient and given by (1/c ∂/∂t, ∇). The summation convention has been used, so that the space-time dimensions are implicitly summed over. i.e.
Sometimes, the above relation is written as
In general relativity, the continuity equation is written as:
where the semi-colon represents a covariant derivative.