Electric Potential, Part 2: Electrostatic Energy
Build a charge configuration one charge at a time to derive electrostatic interaction energy, the factor of one half, and energy stored in a vacuum electric field.
Let’s bring charges into place one at a time and keep track of the work. This gives us a useful connection between electric potential and the energy of a charge configuration. The factor of one half that appears later will come directly from counting pairs.
Bringing charges in from infinity
Consider a finite number of already existing point charges in vacuum, with no imposed external field. Start with them infinitely separated and bring them to distinct final positions. Once a charge is placed, keep it fixed while bringing in the next one. Set the electric potential to zero at infinity, $V(\infty)=0$, and take the initial interaction energy to be zero.
We assemble the charges quasistatically: slowly enough that there is no net change in kinetic energy and radiation can be neglected. Work is energy transferred. Under these assumptions, the external work changes the electrostatic potential energy, while the work done by the electric force has the opposite sign:
$$ \begin{aligned} W_{\mathrm{ext}}&=\Delta U,\\ W_{\mathrm e}&=-\Delta U. \end{aligned} $$Let $q_i$ be the signed value of charge $i$, and let $\mathbf r_i$ be its position vector. The scalar distance between two distinct charges is
$$ \eta_{ij}=|\mathbf r_i-\mathbf r_j|>0. $$Here $\epsilon_0$ is the vacuum permittivity. The diagrams below use handwritten position labels; the bold notation in the equations makes their vector meaning explicit.

For the first charge there are no other charges producing an electric field, so the interaction work is $W_1=0$. The charge still has its own field. We are neither creating the charge nor including its individual self-energy in this discrete assembly calculation.

The second charge moves through the potential produced by the first. Its external assembly work is

For charges of the same sign, this work is positive: the external agent works against repulsion. For opposite signs it is negative: the electric force does positive work, and the external agent removes energy while keeping the motion slow.

For the third charge, add the potentials of the first two charges and multiply by $q_3$:


The next step follows the same pattern. The work for bringing in the fourth charge is $W_4$:
$$ \begin{aligned} W_4&=\frac{q_4}{4\pi\epsilon_0}\\ &\quad\times\left(\frac{q_1}{\eta_{14}}+ \frac{q_2}{\eta_{24}}+\frac{q_3}{\eta_{34}}\right). \end{aligned} $$Counting each pair once
After all $n$ charges are in place, the interaction energy is the sum of the work at every step:
$$ U=W_1+W_2+\cdots+W_n. $$Each pair contributes when the later of its two charges is brought in. No pair contributes twice, and no charge is paired with itself.

In compact notation, the same result is
$$ U=\frac{1}{4\pi\epsilon_0} \sum_{i\lt j}\frac{q_iq_j}{\eta_{ij}}. $$The indices run over the $n$ charges, and $i\lt j$ selects each unordered pair once. For four charges, for example, there are six pairs. The assembly order can change which step supplies a term, but it does not change the final sum.
We can also sum over every charge and all the other charges. Then each pair appears twice: once as $(i,j)$ and once as $(j,i)$. Dividing by two corrects this double counting.

The restriction $j\ne i$ matters: the sum excludes the individual self-energies of the point charges.
Writing the energy in terms of potential
Look at the inner sum. It is the potential at a particular charge’s position due to all the other charges in the final configuration. Define it as
$$ \begin{aligned} V_{\mathrm{other}}(\mathbf r_i) &=\frac{1}{4\pi\epsilon_0}\\ &\quad\times\sum_{j\ne i}\frac{q_j}{\eta_{ij}}. \end{aligned} $$The energy therefore becomes
$$ U=\frac12\sum_i q_iV_{\mathrm{other}}(\mathbf r_i). $$Each charge has its own value of this potential. It depends on $i$, so it must stay inside the sum, paired with the corresponding $q_i$.
There is a related but different question: how much does the energy change when we add one more charge to an existing configuration of $n$ fixed charges? Let $V_{\mathrm{old}}$ be the potential of those existing charges. Then
$$ \Delta U=q_{n+1}V_{\mathrm{old}}(\mathbf r_{n+1}). $$There is no factor of one half in this insertion formula. Each new interaction is counted once. The half belongs to the final-system sum, in which both members of every pair are included.
From a continuous charge distribution to field energy
Now consider a sufficiently regular, localized continuous charge distribution in vacuum, with convergent energy integrals. Let $\rho$ be its charge density and $V$ its own total potential, again with zero potential at infinity. A small volume $d\tau$ contains charge $dq=\rho\,d\tau$. The assembly energy is
$$ U=\frac12\int_{\mathbb R^3}\rho V\,d\tau. $$The integration domain $\mathbb R^3$ means all space. This expression includes the assembly energy of the continuous distribution itself. That distinction will matter when we compare it with the interaction energy of ideal point charges.
Gauss’s law in vacuum gives $\rho=\epsilon_0\nabla\cdot\mathbf E$. Substituting it preserves the factor of one half:
$$ U=\frac{\epsilon_0}{2} \int_{\mathbb R^3}V(\nabla\cdot\mathbf E)\,d\tau. $$To express this in terms of the field alone, use $\mathbf E=-\nabla V$ and the product rule:
$$ \begin{aligned} \nabla\cdot(V\mathbf E) &=V\nabla\cdot\mathbf E +\mathbf E\cdot\nabla V\\ &=V\nabla\cdot\mathbf E-|\mathbf E|^2. \end{aligned} $$For a finite region $\Omega$, the divergence theorem leaves a surface term:
$$ \begin{aligned} \frac12\int_\Omega\rho V\,d\tau &=\frac{\epsilon_0}{2} \int_\Omega|\mathbf E|^2\,d\tau\\ &\quad+\frac{\epsilon_0}{2} \oint_{\partial\Omega}V\mathbf E\cdot\mathbf n\,dA. \end{aligned} $$Here $\partial\Omega$ is the boundary and $\mathbf n$ its outward unit normal. The surface term has a plus sign, and it cannot be discarded for an arbitrary finite region.
For the localized distribution considered here, take the boundary to be a sphere whose radius tends to infinity. With $V(\infty)=0$ and the localized-charge falloff of the potential and field, the surface term tends to zero. We then obtain
$$ U=\frac{\epsilon_0}{2} \int_{\mathbb R^3}|\mathbf E|^2\,d\tau. $$This identifies the electrostatic energy density in vacuum as
$$ u_E=\frac{\epsilon_0}{2}|\mathbf E|^2. $$The qualification about the charge distribution is essential. An ideal point charge has a singular field, and its unregularized field self-energy diverges. Our earlier discrete sum excluded those individual self-energies. Its interaction energy can be negative, whereas the full field-energy integral is nonnegative whenever it converges. They are not interchangeable expressions for ideal point charges.
Starting with the work of assembling charges has led us to energy stored in an electric field. Magnetic-field energy will enter later; the derivation here concerns electrostatic fields in vacuum. For another derivation of the pair sum, surface term and self-energy distinction, see Richard Fitzpatrick’s Electrostatic Energy.
Editorial correction — 2026-09-09
This English edition follows the progression of the Korean original and corrects several errors. The second-charge work equation and the three-charge diagram have been restored to their intended positions from the original source. Three historical equation images have been replaced in the displayed article by corrected typeset expressions; their original files are preserved.
The corrections change the fourth-charge work label from $W_3$ to $W_4$, keep the position-dependent potential inside the energy sum, and distinguish the final other-charge potential from the potential used when inserting an additional charge. The field-energy derivation restores the missing factor of one half and now states the boundary conditions and self-energy limitations. The work and energy assumptions are also explicit. These are disclosed scientific and editorial corrections, rather than a claim that the original formulas were unchanged.
Comments
Discussion happens via GitHub Discussions. You'll need a GitHub account to comment.