In physics and electromagnetism , Gauss's law, also known as Gauss's flux theorem, (or sometimes simply called Gauss's theorem) is a law relating to the distribution of electric charge to the resulting electric field. In its integral form, it states that the flux of the electric field out of an arbitrary closed surface is proportional to the electric charge enclosed by the surface, irrespective of how that charge is distributed. Even though the law alone is insufficient to determine the electric field across a surface enclosing any charge distribution, this may be possible in cases where symmetry mandates uniformity of the field. Where no such symmetry exists, Gauss's law can be used in its differential form, which states that the divergence of the electric field is proportional to the local density of charge.
The law was first formulated by Joseph-Louis Lagrange in 1773, followed by Carl Friedrich Gauss in 1813, both in the context of the attraction of ellipsoids. It is one of Maxwell's four equations, which forms the basis of classical electrodynamics.[note 1] Gauss's law can be used to derive Coulomb's law, and vice versa.
In words, Gauss's law states that
Gauss's law has a close mathematical similarity with a number of laws in other areas of physics, such as Gauss's law for magnetism and Gauss's law for gravity. In fact, any inverse-square law can be formulated in a way similar to Gauss's law: for example, Gauss's law itself is essentially equivalent to the inverse-square Coulomb's law, and Gauss's law for gravity is essentially equivalent to the inverse-square Newton's law of gravity.
The law can be expressed mathematically using vector calculus in integral form and differential form; both are equivalent since they are related by the divergence theorem, also called Gauss's theorem. Each of these forms in turn can also be expressed two ways: In terms of a relation between the electric field E and the total electric charge, or in terms of the electric displacement field D and the free electric charge.
Gauss's law may be expressed as:
where ?E is the electric flux through a closed surface S enclosing any volume V, Q is the total charge enclosed within V, and ?0 is the electric constant. The electric flux ?E is defined as a surface integral of the electric field:
In a curved space-time, the flux of an electromagnetic field through a closed surface is expressed as
where is the speed of light; denotes the time components of the electromagnetic tensor; is the determinant of metric tensor; is an orthonormal element of the two-dimensional surface surrounding the charge ; indices and do not match each other. 
Since the flux is defined as an integral of the electric field, this expression of Gauss's law is called the integral form.
In problems involving conductors set at known potentials, the potential away from them is obtained by solving Laplace's equation, either analytically or numerically. The electric field is then calculated as the potential's negative gradient. Gauss's law makes it possible to find the distribution of electric charge: The charge in any given region of the conductor can be deduced by integrating the electric field to find the flux through a small box whose sides are perpendicular to the conductor's surface and by noting that the electric field is perpendicular to the surface, and zero inside the conductor.
The reverse problem, when the electric charge distribution is known and the electric field must be computed, is much more difficult. The total flux through a given surface gives little information about the electric field, and can go in and out of the surface in arbitrarily complicated patterns.
An exception is if there is some symmetry in the problem, which mandates that the electric field passes through the surface in a uniform way. Then, if the total flux is known, the field itself can be deduced at every point. Common examples of symmetries which lend themselves to Gauss's law include: cylindrical symmetry, planar symmetry, and spherical symmetry. See the article Gaussian surface for examples where these symmetries are exploited to compute electric fields.
By the divergence theorem, Gauss's law can alternatively be written in the differential form:
The integral and differential forms are mathematically equivalent, by the divergence theorem. Here is the argument more specifically.
The electric charge that arises in the simplest textbook situations would be classified as "free charge"--for example, the charge which is transferred in static electricity, or the charge on a capacitor plate. In contrast, "bound charge" arises only in the context of dielectric (polarizable) materials. (All materials are polarizable to some extent.) When such materials are placed in an external electric field, the electrons remain bound to their respective atoms, but shift a microscopic distance in response to the field, so that they're more on one side of the atom than the other. All these microscopic displacements add up to give a macroscopic net charge distribution, and this constitutes the "bound charge".
Although microscopically all charge is fundamentally the same, there are often practical reasons for wanting to treat bound charge differently from free charge. The result is that the more fundamental Gauss's law, in terms of E (above), is sometimes put into the equivalent form below, which is in terms of D and the free charge only.
This formulation of Gauss's law states the total charge form:
where ?D is the D-field flux through a surface S which encloses a volume V, and Qfree is the free charge contained in V. The flux ?D is defined analogously to the flux ?E of the electric field E through S:
The differential form of Gauss's law, involving free charge only, states:
where ? · D is the divergence of the electric displacement field, and ?free is the free electric charge density.
for the integral form, and
for the differential form.
This section may contain content that is repetitive or redundant of text elsewhere in the article. Please help (September 2016)by merging similar text or removing repeated statements.
Gauss's theorem can be interpreted in terms of the lines of force of the field as follows:
The flux through a closed surface is dependent upon both the magnitude and direction of the electric field lines penetrating the surface. In general a positive flux is defined by these lines leaving the surface and negative flux by lines entering this surface. This results in positive charges causing a positive flux and negative charges creating a negative flux. These electric field lines will extend to infinite decreasing in strength by a factor of one over the distance from the source of the charge squared. The larger the number of field lines emanating from a charge the larger the magnitude of the charge is, and the closer together the field lines are the greater the magnitude of the electric field. This has the natural result of the electric field becoming weaker as one moves away from a charged particle, but the surface area also increases so that the net electric field exiting this particle will stay the same. In other words the closed integral of the electric field and the dot product of the derivative of the area will equal the net charge enclosed divided by permittivity of free space.
Strictly speaking, Gauss's law cannot be derived from Coulomb's law alone, since Coulomb's law gives the electric field due to an individual point charge only. However, Gauss's law can be proven from Coulomb's law if it is assumed, in addition, that the electric field obeys the superposition principle. The superposition principle says that the resulting field is the vector sum of fields generated by each particle (or the integral, if the charges are distributed smoothly in space).
Since Coulomb's law only applies to stationary charges, there is no reason to expect Gauss's law to hold for moving charges based on this derivation alone. In fact, Gauss's law does hold for moving charges, and in this respect Gauss's law is more general than Coulomb's law.
Strictly speaking, Coulomb's law cannot be derived from Gauss's law alone, since Gauss's law does not give any information regarding the curl of E (see Helmholtz decomposition and Faraday's law). However, Coulomb's law can be proven from Gauss's law if it is assumed, in addition, that the electric field from a point charge is spherically symmetric (this assumption, like Coulomb's law itself, is exactly true if the charge is stationary, and approximately true if the charge is in motion).