# 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 ${\boldsymbol {x}}$, like a fluid, and $\rho ({\boldsymbol {x}})$, $\sigma ({\boldsymbol {x}})$, and $\lambda ({\boldsymbol {x}})$ 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 $\rho ({\boldsymbol {x}})$ and the current density ${\boldsymbol {J}}({\boldsymbol {x}})$.
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 electrons and ions near 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 10$^{22}$ 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 $\psi ({\boldsymbol {x}})$ whose square is proportional to the probability of finding the electron at any point ${\boldsymbol {x}}$ in space, so $|\psi ({\boldsymbol {x}})|^{2}$ 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, $\lambda _{q}={\frac {dQ}{d\ell }}\,,$ similarly the surface charge density uses a surface area element dS $\sigma _{q}={\frac {dQ}{dS}}\,,$ and the volume charge density uses a volume element dV $\rho _{q}={\frac {dQ}{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, $Q=\int _{L}\lambda _{q}(\mathbf {r} )\,d\ell$ similarly a surface integral of the surface charge density σ$_q$(r) over a surface S, $Q=\int _{S}\sigma _{q}(\mathbf {r} )\,dS$ and a volume integral of the volume charge density ρ$_q$(r) over a volume V, $Q=\int _{V}\rho _{q}(\mathbf {r} )\,dV$ 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: $\langle \lambda _{q}\rangle ={\frac {Q}{\ell }}\,,\quad \langle \sigma _{q}\rangle ={\frac {Q}{S}}\,,\quad \langle \rho _{q}\rangle ={\frac {Q}{V}}\,.$

## 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: $\rho =\rho _{\text{f}}+\rho _{\text{b}}\,.$ as for surface charge densities: $\sigma =\sigma _{\text{f}}+\sigma _{\text{b}}\,.$ 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: $q_{b}={\frac {\mathbf {d} \cdot \mathbf {\hat {n}} }{|\mathbf {s} |}}$ where s is the separation between the point charges constituting the dipole, $\mathbf {d}$ is the electric dipole moment, $\mathbf {\hat {n}}$ is the unit normal vector to the surface.
Taking infinitesimals: $dq_{b}={\frac {d\mathbf {d} }{|\mathbf {s} |}}\cdot \mathbf {\hat {n}}$ and dividing by the differential surface element dS gives the bound surface charge density: $\sigma _{b}={\frac {dq_{b}}{dS}}={\frac {d\mathbf {d} }{|\mathbf {s} |dS}}\cdot \mathbf {\hat {n}} ={\frac {d\mathbf {d} }{dV}}\cdot \mathbf {\hat {n}} =\mathbf {P} \cdot \mathbf {\hat {n}} \,.$ 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 $q_{b}=\int \rho _{b}\,dV=-\oint _{S}\mathbf {P} \cdot {\hat {\mathbf {n} }}\,dS=-\int \nabla \cdot \mathbf {P} \,dV$ hence: $\rho _{b}=-\nabla \cdot \mathbf {P} \,.$
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.
The electric potential due to a dipole moment d is: $\varphi ={\frac {1}{4\pi \varepsilon _{0}}}{\frac {(\mathbf {r} -\mathbf {r} ')\cdot \mathbf {d} }{|\mathbf {r} -\mathbf {r} '|^{3}}}$
For a continuous distribution, the material can be divided up into infinitely many infinitesimal dipoles $d\mathbf {d} =\mathbf {P} dV=\mathbf {P} d^{3}\mathbf {r}$ where dV = d$^3$r′ is the volume element, so the potential is the volume integral over the object: $\varphi ={\frac {1}{4\pi \varepsilon _{0}}}\iiint {\frac {(\mathbf {r} -\mathbf {r} ')\cdot \mathbf {P} }{|\mathbf {r} -\mathbf {r} '|^{3}}}d^{3}\mathbf {r'}$
Since $\nabla '\left({\frac {1}{|\mathbf {r} -\mathbf {r} '|}}\right)\equiv \left(\mathbf {e} _{x}{\frac {\partial }{\partial x'}}+\mathbf {e} _{y}{\frac {\partial }{\partial y'}}+\mathbf {e} _{z}{\frac {\partial }{\partial z'}}\right)\left({\frac {1}{|\mathbf {r} -\mathbf {r} '|}}\right)={\frac {\mathbf {r} -\mathbf {r} '}{|\mathbf {r} -\mathbf {r} '|^{3}}}$ where ∇′ is the gradient in the r′ coordinates, $\varphi ={\frac {1}{4\pi \varepsilon _{0}}}\iiint \mathbf {P} \cdot \nabla '\left({\frac {1}{|\mathbf {r} -\mathbf {r} '|}}\right)d^{3}\mathbf {r'}$
Integrating by parts $\varphi ={\frac {1}{4\pi \varepsilon _{0}}}\iiint \left[\nabla '\cdot \left({\frac {\mathbf {P} }{|\mathbf {r} -\mathbf {r} '|}}\right)-{\frac {1}{\mathbf {r} -\mathbf {r} '}}(\nabla '\cdot \mathbf {P} )\right]d^{3}\mathbf {r'}$ using the divergence theorem:
    $\varphi ={\frac {1}{4\pi \varepsilon _{0}}}$ ${\scriptstyle S}$ ${\frac {\mathbf {P} \cdot \mathbf {\hat {n}} dS'}{|\mathbf {r} -\mathbf {r} '|}}-{\frac {1}{4\pi \varepsilon _{0}}}\iiint {\frac {\nabla '\cdot \mathbf {P} }{|\mathbf {r} -\mathbf {r} '|}}d^{3}\mathbf {r'}$
which separates into the potential of the surface charge (surface integral) and the potential due to the volume charge (volume integral):
    $\varphi ={\frac {1}{4\pi \varepsilon _{0}}}$ ${\scriptstyle S}$ ${\frac {\sigma _{b}dS'}{|\mathbf {r} -\mathbf {r} '|}}+{\frac {1}{4\pi \varepsilon _{0}}}\iiint {\frac {\rho _{b}}{|\mathbf {r} -\mathbf {r} '|}}d^{3}\mathbf {r'}$
that is $\sigma _{b}=\mathbf {P} \cdot \mathbf {\hat {n}} \,,\quad \rho _{b}=-\nabla \cdot \mathbf {P}$

### 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:
    $\Phi _{D}=$ ${\scriptstyle S}$ $\mathbf {D} \cdot \mathbf {\hat {n}} dS=\iiint \rho _{f}dV$
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: $Q=V\rho _{0}.$

### Proof

Start with the definition of a continuous volume charge density: $Q=\int _{V}\rho _{q}(\mathbf {r} )\,dV.$
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: $Q=\rho _{q,0}\int _{V}\,dV=\rho _{0}V$ so, $Q=V\rho _{q,0}.$
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 r$_0$ inside a region of 3d space R, like an electron, the volume charge density can be expressed by the Dirac delta function: $\rho _{q}(\mathbf {r} )=q\delta (\mathbf {r} -\mathbf {r} _{0})$ 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 shifting property for any function f: $\int _{R}d^{3}\mathbf {r} f(\mathbf {r} )\delta (\mathbf {r} -\mathbf {r} _{0})=f(\mathbf {r} _{0})$ so the delta function ensures that when the charge density is integrated over R, the total charge in R is q: $Q=\int _{R}d^{3}\mathbf {r} \,\rho _{q}=\int _{R}d^{3}\mathbf {r} \,q\delta (\mathbf {r} -\mathbf {r} _{0})=q\int _{R}d^{3}\mathbf {r} \,\delta (\mathbf {r} -\mathbf {r} _{0})=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 q$_i$ at position r$_i$, where i = 1, 2, ..., N: $\rho _{q}(\mathbf {r} )=\sum _{i=1}^{N}\ q_{i}\delta (\mathbf {r} -\mathbf {r} _{i})$
The delta function for each charge q$_i$ in the sum, δ(r − r$_i$), ensures the integral of charge density over R returns the total charge in R: $Q=\int _{R}d^{3}\mathbf {r} \sum _{i=1}^{N}\ q_{i}\delta (\mathbf {r} -\mathbf {r} _{i})=\sum _{i=1}^{N}\ q_{i}\int _{R}d^{3}\mathbf {r} \delta (\mathbf {r} -\mathbf {r} _{i})=\sum _{i=1}^{N}\ q_{i}$
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 $\rho _{q}(\mathbf {r} )=qn(\mathbf {r} )\,.$
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$\rho _{q}(\mathbf {r} )=q|\psi (\mathbf {r} )|^{2}$where q is the charge of the particle and |ψ(r)|$^2$ = ψ*(r)ψ(r) 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$Q=\int _{R}q|\psi (\mathbf {r} )|^{2}\,d^{3}\mathbf {r}$where d$^3$r is the integration measure over 3d position space.
For system of identical fermions, the number density is given as sum of probability density of each particle in :
$n(\mathbf {r} )=\sum _{i}\langle \psi |\delta ^{3}(\mathbf {r} -\mathbf {r} _{i}')|\psi \rangle$
$n(\mathbf {r} )=\sum _{i}\int {\mathrm {d} }^{3}\mathbf {r} _{2}\cdots \int {\mathrm {d} }^{3}\mathbf {r} _{N}\,\Psi ^{*}(\mathbf {r} ,\mathbf {r} _{2},\dots ,\mathbf {r} _{i}=\mathbf {r} ',\dots ,\mathbf {r} _{N})\Psi (\mathbf {r} ,\mathbf {r} _{2},\dots ,\mathbf {r} _{i}=\mathbf {r} ',\dots ,\mathbf {r} _{N}).$
Using symmetrization condition:$n(\mathbf {r} )=N\int {\mathrm {d} }^{3}\mathbf {r} _{2}\cdots \int {\mathrm {d} }^{3}\mathbf {r} _{N}\,\Psi ^{*}(\mathbf {r} ,\mathbf {r} _{2},\dots ,\mathbf {r} _{N})\Psi (\mathbf {r} ,\mathbf {r} _{2},\dots ,\mathbf {r} _{N}).$where ρ$_q$(r)=q⋅n(r){\textstyle \rho _{q}(\mathbf {r} )=q\cdot n(\mathbf {r} )} is considered as the charge density.
The potential energy of a system is written as:$\langle \psi |U|\psi \rangle =\int V(\mathbf {r} )n(\mathbf {r} )\delta ^{3}\mathbf {r}$The electron-electron repulsion energy is thus derived under these conditions to be:$U_{ee}[n]=J[n]={\frac {1}{2}}\int \delta ^{3}\mathbf {r} '\int \delta ^{3}\mathbf {r} \left({\frac {(en(\mathbf {r} ))(en(\mathbf {r} '))}{|\mathbf {r} -\mathbf {r} '|}}\right)={\frac {1}{2}}\int \delta ^{3}\mathbf {r} '\int \delta ^{3}\mathbf {r} \left({\frac {\rho (\mathbf {r} )\rho (\mathbf {r} ')}{|\mathbf {r} -\mathbf {r} '|}}\right)$Note that this is excluding the exchange energy of the system, which is a purely quantum mechanical phenomenon, has to be calculated separately.
Then, the energy is given using Hartree-Fock method as:
$E[n]=I+J-K$
Where I is the kinetic and potential energy of electrons due to positive charges, J is the electron electron interaction energy and K is the exchange energy of electrons.

## 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.