In electrostatics, the relationship between the sum of charges on a closed surface and the electric flux integral of the electric field generated on the closed surface is shown. Gauss's law shows the relationship between the charge distribution in a closed surface and the generated electric field. Gauss's law of electrostatic field is similar to Ampere's law of magnetic field, and both of them are concentrated in Maxwell's equations. Because of the mathematical similarity, Gauss's law can also be applied to other physical quantities determined by inverse square law, such as gravity or irradiance.