The electric flux through a surface is proportional to the number of field lines crossing that surface. Note that this means the magnitude is proportional to the portion of the field perpendicular to the area.
The electric flux is obtained by evaluating the surface integral
where the notation used here is for a closed surface S.
Gauss’s law relates the electric flux through a closed surface to the net charge within that surface,
where is the total charge inside the Gaussian surface S.
All surfaces that include the same amount of charge have the same number of field lines crossing it, regardless of the shape or size of the surface, as long as the surfaces enclose the same amount of charge.
For a charge distribution with certain spatial symmetries (spherical, cylindrical, and planar), we can find a Gaussian surface over which , where E is constant over the surface. The electric field is then determined with Gauss’s law.
For spherical symmetry, the Gaussian surface is also a sphere, and Gauss’s law simplifies to .
For cylindrical symmetry, we use a cylindrical Gaussian surface, and find that Gauss’s law simplifies to .
For planar symmetry, a convenient Gaussian surface is a box penetrating the plane, with two faces parallel to the plane and the remainder perpendicular, resulting in Gauss’s law being .