Maxwell’s first equation (or Gauss’s law) states that the total electric flux through any closed surface is proportional to the electric charge enclosed within that surface.
An electric field is a vector quantity that describes the force per unit positive charge at a point in space, while the electric flux
is scalar quantity that measures how much electric field passes through a surface. In other words,
is obtained by integrating
over a surface:
where denotes the surface integral over the closed surface
, and
is infinitesimal area vector normal to the surface.

Consider a sphere of radius centred on a charge
. Since the electric field produced by the charge is radial and has the same magnitude at every point on the sphere,
and
are parallel. Therefore,
.
Substituting Coulomb’s law, where into
, or equivalently
since
is constant over the sphere, gives:
where the surface area of the sphere is .
Eq1 is the integral form of Maxwell’s first equation (or Gauss’s law). Although it is derived using a spherical surface, it applies to any closed surface because the electric flux through a closed surface depends only on the total charge enclosed , and not on the shape of the surface. Its differential form can be derived using Gauss’ theorem (also known as the divergence theorem) where
. Applying this theorem to the electric field gives,
Since the enclosed charge can be written as , where
is the charge density,
For eq2 to hold for any arbitrary volume , the underlying functions (the integrands) must be identical at every point:
which is the differential form of Gauss’ law.
The significance of Gauss’ law is that electric charges act as sources or sinks of electric field. Positive charges produce electric field lines that diverge outwards, while negative charges produce field lines that converge inwards.