If a closed surface R contains matter of total mass M and if F denotes the gravitational field, then the gravitational flux equals
where G is the gravitational constant, S denotes surface area and n is the outward-pointing unit normal. An equivalent differential version reads
where denotes density. There are similar theorems relating electric and magnetic fields, the differential forms of which appear as two of Maxwell’s equations.