Charge density
In electromagnetism, charge density is the amount of electric charge per unit length, surface area, or volume. Volume charge density (symbolized by the Greek letter ρ) is the quantity of charge per unit volume, measured in the SI system in coulombs per cubic meter (C⋅m−3), at any point in a volume. Surface charge density (σ) is the quantity of charge per unit area, measured in coulombs per square meter (C⋅m−2), at any point on a surface charge distribution on a two dimensional surface. Linear charge density (λ) is the quantity of charge per unit  length, measured in coulombs per meter (C⋅m−1), at any point on a line charge distribution. Charge density can be either positive or negative, since electric charge can be either positive or negative. Like mass density, charge density can vary with position. In classical electromagnetic theory charge density is idealized as a continuous scalar function of position , like a fluid, and , , and  are usually regarded as continuous charge distributions, even though all real charge distributions are made up of discrete charged particles. Due to the conservation of electric charge, the charge density in any volume can only change if an electric current of charge flows into or out of the volume. This is expressed by a continuity equation which links the rate of change of charge density  and the current density . Since all charge is carried by subatomic particles, which can be idealized as points, the concept of a continuous charge distribution is an approximation, which becomes inaccurate at small length scales. A charge distribution is ultimately composed of individual charged particles separated by regions containing no charge. For example, the charge in an electrically charged metal object is made up of conduction electrons moving randomly in the metal's crystal lattice. Static electricity is caused by surface charges consisting of ions on the surface of objects,  and the space charge in a vacuum tube is composed of a cloud of free electrons moving randomly in space. The charge carrier density in a conductor is equal to the number of mobile charge carriers (electrons, ions, etc.) per unit volume. The charge density at any point is equal to the charge carrier density multiplied by the elementary charge on the particles. However, because the elementary charge on an electron is so small (1.6⋅10−19 C) and there are so many of them in a macroscopic volume (there are about 1022 conduction electrons in a cubic centimeter of copper) the continuous approximation is very accurate when applied to macroscopic volumes, and even microscopic volumes above the nanometer level. At even smaller scales, of atoms and molecules, due to the uncertainty principle of quantum mechanics, a charged particle does not have a precise position but is represented by a probability distribution, so the charge of an individual particle is not concentrated at a point but is 'smeared out' in space and acts like a true continuous charge distribution. This is the meaning of 'charge distribution'  and 'charge density' used in chemistry and chemical bonding. An electron is represented by a wavefunction  whose square is proportional to the probability of finding the electron at any point  in space, so  is proportional to the charge density of the electron at any point. In atoms and molecules the charge of the electrons is distributed in clouds called orbitals which surround the atom or molecule, and are responsible for chemical bonds. Definitions

Continuous charges 

Following are the definitions for continuous charge distributions. The linear charge density is the ratio of an infinitesimal electric charge dQ (SI unit: C) to an infinitesimal line element, 

similarly the surface charge density uses a surface area element dS   

and the volume charge density uses a volume element dV

Integrating the definitions gives the total charge Q of a region according to line integral of the linear charge density λq(r) over a line or 1d curve C, 

similarly a surface integral of the surface charge density σq(r) over a surface S,

and a volume integral of the volume charge density ρq(r) over a volume V, 

where the subscript q is to clarify that the density is for electric charge, not other densities like mass density, number density, probability density, and prevent conflict with the many other uses of λ, σ, ρ in electromagnetism for wavelength, electrical resistivity and conductivity. Within the context of electromagnetism, the subscripts are usually dropped for simplicity: λ, σ, ρ. Other notations may include: ρℓ, ρs, ρv, ρL, ρS, ρV etc. The total charge divided by the length, surface area, or volume will be the average charge densities:

Free, bound and total charge 
In dielectric materials, the total charge of an object can be separated into "free" and "bound" charges. Bound charges set up electric dipoles in response to an applied electric field E, and polarize other nearby dipoles tending to line them up, the net accumulation of charge from the orientation of the dipoles is the bound charge. They are called bound because they cannot be removed: in the dielectric material the charges are the electrons bound to the nuclei. Free charges are the excess charges which can move into electrostatic equilibrium, i.e. when the charges are not moving and the resultant electric field is independent of time, or constitute electric currents. Total charge densities 
In terms of volume charge densities, the total charge density is:

as for surface charge densities:

where subscripts "f" and "b" denote "free" and "bound" respectively. Bound charge 
The bound surface charge is the charge piled up at the surface of the dielectric, given by the dipole moment perpendicular to the surface:

where s is the separation between the point charges constituting the dipole,  is the electric dipole moment,  is the unit normal vector to the surface. Taking infinitesimals:

and dividing by the differential surface element dS gives the bound surface charge density:

where P is the polarization density, i.e. density of electric dipole moments within the material, and dV is the differential volume element. Using the divergence theorem, the bound volume charge density within the material is

hence:

The negative sign arises due to the opposite signs on the charges in the dipoles, one end is within the volume of the object, the other at the surface. A more rigorous derivation is given below. Free charge density 
The free charge density serves as a useful simplification in Gauss's law for electricity; the volume integral of it is the free charge enclosed in a charged object - equal to the net flux of the electric displacement field D emerging from the object:

See Maxwell's equations and constitutive relation for more details. Homogeneous charge density 
For the special case of a homogeneous charge density ρ0, independent of position i.e. constant throughout the region of the material, the equation simplifies to:

Proof 
Start with the definition of a continuous volume charge density:

Then, by definition of homogeneity, ρq(r) is a constant denoted by ρq, 0 (to differ between the constant and non-constant densities), and so by the properties of an integral can be pulled outside of the integral resulting in:

so,

The equivalent proofs for linear charge density and surface charge density follow the same arguments as above. Discrete charges 
For a single point charge q at position r0 inside a region of 3d space R, like an electron, the volume charge density can be expressed by the Dirac delta function:

where r is the position to calculate the charge. As always, the integral of the charge density over a region of space is the charge contained in that region. The delta function has the sifting property for any function f:

so the delta function ensures that when the charge density is integrated over R, the total charge in R is q:

This can be extended to N discrete point-like charge carriers. The charge density of the system at a point r is a sum of the charge densities for each charge qi at position ri, where :

The delta function for each charge qi in the sum, δ(r − ri), ensures the integral of charge density over R returns the total charge in R:

If all charge carriers have the same charge q (for electrons q = −e, the electron charge) the charge density can be expressed through the number of charge carriers per unit volume, n(r), by

Similar equations are used for the linear and surface charge densities. Charge density in special relativity 

In special relativity, the length of a segment of wire depends on velocity of observer because of length contraction, so charge density will also depend on velocity. Anthony French
has described how the magnetic field force of a current-bearing wire arises from this relative charge density. He used (p 260) a Minkowski diagram to show "how a neutral current-bearing wire appears to carry a net charge density as observed in a moving frame." When a charge density is measured in a moving frame of reference it is called proper charge density. It turns out the charge density ρ and current density J transform together as a four-current vector under Lorentz transformations. Charge density in quantum mechanics

In quantum mechanics, charge density ρq is related to wavefunction ψ(r) by the equation

where q is the charge of the particle and  is the probability density function i.e. probability per unit volume of a particle located at r.

When the wavefunction is normalized - the average charge in the region r ∈ R is

where d3r is the integration measure over 3d position space. Application 
The charge density appears in the continuity equation for electric current, and also in Maxwell's Equations. It is the principal source term of the electromagnetic field; when the charge distribution moves, this corresponds to a current density. The charge density of molecules impacts chemical and separation processes. For example, charge density influences metal-metal bonding and hydrogen bonding. For separation processes such as nanofiltration, the charge density of ions influences their rejection by the membrane. See also 
 Continuity equation relating charge density and current density
 Ionic potential
 Charge density wave

References

External links 
  - Spatial charge distributions

Density
Electric charge
Electromagnetic quantities

es:Carga eléctrica#Densidad de carga eléctrica