Electric potential energy
Electric potential energy, or Electrostatic potential energy, is a potential energy (measured in joules) that results from conservative Coulomb forces and is associated with the configuration of a particular set of point charges within a defined system. An object may have electric potential energy by virtue of two key elements: its own electric charge and its relative position to other electrically charged objects.
Electric potential energy  

Common symbols  U_{E} 
SI unit  joule (J) 
Derivations from other quantities  U_{E} = C · V^{2} / 2 
The term "electric potential energy" is used to describe the potential energy in systems with timevariant electric fields, while the term "electrostatic potential energy" is used to describe the potential energy in systems with timeinvariant electric fields.
Definition
The electric potential energy of a system of point charges is defined as the work required assembling this system of charges by bringing them close together, as in the system from an infinite distance.
 The electrostatic potential energy, U_{E}, of one point charge q at position r in the presence of an electric field E is defined as the negative of the work W done by the electrostatic force to bring it from the reference position r_{ref}[note 1] to that position r.[1][2]^{:§251}[note 2]
,
 where E is the electrostatic field and dr' is the displacement vector in a curve from the reference position r_{ref} to the final position r.
The electrostatic potential energy can also be defined from the electric potential as follows:
 The electrostatic potential energy, U_{E}, of one point charge q at position r in the presence of an electric potential is defined as the product of the charge and the electric potential.
,
 where is the electric potential generated by the charges, which is a function of position r.
Units
The SI unit of electric potential energy is the joule (named after the English physicist James Prescott Joule). In the CGS system the erg is the unit of energy, being equal to 10^{−7} J. Also electronvolts may be used, 1 eV = 1.602×10^{−19} J.
Electrostatic potential energy of one point charge
One point charge q in the presence of another point charge Q
The electrostatic potential energy, U_{E}, of one point charge q at position r in the presence of a point charge Q, taking an infinite separation between the charges as the reference position, is:
,
where is Coulomb's constant, r is the distance between the point charges q & Q, and q & Q are the charges (not the absolute values of the charges—i.e., an electron would have a negative value of charge when placed in the formula). The following outline of proof states the derivation from the definition of electric potential energy and Coulomb's law to this formula.
Outline of proof The electrostatic force F acting on a charge q can be written in terms of the electric field E as
 ,
By definition, the change in electrostatic potential energy, U_{E}, of a point charge q that has moved from the reference position r_{ref} to position r in the presence of an electric field E is the negative of the work done by the electrostatic force to bring it from the reference position r_{ref} to that position r.
 .
where:
 r = position in 3d space of the charge q, using cartesian coordinates r = (x, y, z), taking the position of the Q charge at r = (0,0,0), the scalar r = r is the norm of the position vector,
 ds = differential displacement vector along a path C going from r_{ref} to r,
 is the work done by the electrostatic force to bring the charge from the reference position r_{ref} to r,
Usually U_{E} is set to zero when r_{ref} is infinity:
so
When the curl ∇ × E is zero, the line integral above does not depend on the specific path C chosen but only on its endpoints. This happens in timeinvariant electric fields. When talking about electrostatic potential energy, timeinvariant electric fields are always assumed so, in this case, the electric field is conservative and Coulomb's law can be used.
Using Coulomb's law, it is known that the electrostatic force F and the electric field E created by a discrete point charge Q are radially directed from Q. By the definition of the position vector r and the displacement vector s, it follows that r and s are also radially directed from Q. So, E and ds must be parallel:
Using Coulomb's law, the electric field is given by
and the integral can be easily evaluated:
One point charge q in the presence of n point charges Q_{i}
The electrostatic potential energy, U_{E}, of one point charge q in the presence of n point charges Q_{i}, taking an infinite separation between the charges as the reference position, is:
,
where is Coulomb's constant, r_{i} is the distance between the point charges q & Q_{i}, and q & Q_{i} are the signed values of the charges.
Electrostatic potential energy stored in a system of point charges
The electrostatic potential energy U_{E} stored in a system of N charges q_{1}, q_{2}, ..., q_{N} at positions r_{1}, r_{2}, ..., r_{N} respectively, is:
, 

(1) 
where, for each i value, Φ(r_{i}) is the electrostatic potential due to all point charges except the one at r_{i},[note 3] and is equal to:
,
where r_{ij} is the distance between q_{j} and q_{i}.
Outline of proof The electrostatic potential energy U_{E} stored in a system of two charges is equal to the electrostatic potential energy of a charge in the electrostatic potential generated by the other. That is to say, if charge q_{1} generates an electrostatic potential Φ_{1}, which is a function of position r, then
Doing the same calculation with respect to the other charge, we obtain
The electrostatic potential energy is mutually shared by and , so the total stored energy is
This can be generalized to say that the electrostatic potential energy U_{E} stored in a system of N charges q_{1}, q_{2}, ..., q_{N} at positions r_{1}, r_{2}, ..., r_{N} respectively, is:
.
Energy stored in a system of one point charge
The electrostatic potential energy of a system containing only one point charge is zero, as there are no other sources of electrostatic force against which an external agent must do work in moving the point charge from infinity to its final location.
A common question arises concerning the interaction of a point charge with its own electrostatic potential. Since this interaction doesn't act to move the point charge itself, it doesn't contribute to the stored energy of the system.
Energy stored in a system of two point charges
Consider bringing a point charge, q, into its final position near a point charge, Q_{1}. The electrostatic potential Φ(r) due to Q_{1} is
Hence we obtain, the electric potential energy of q in the potential of Q_{1} as
where r_{1} is the separation between the two point charges.
Energy stored in a system of three point charges
The electrostatic potential energy of a system of three charges should not be confused with the electrostatic potential energy of Q_{1} due to two charges Q_{2} and Q_{3}, because the latter doesn't include the electrostatic potential energy of the system of the two charges Q_{2} and Q_{3}.
The electrostatic potential energy stored in the system of three charges is:
Outline of proof Using the formula given in (1), the electrostatic potential energy of the system of the three charges will then be:
Where is the electric potential in r_{1} created by charges Q_{2} and Q_{3}, is the electric potential in r_{2} created by charges Q_{1} and Q_{3}, and is the electric potential in r_{3} created by charges Q_{1} and Q_{2}. The potentials are:
Where r_{ab} is the distance between charge Q_{a} and Q_{b}.
If we add everything:
Finally, we get that the electrostatic potential energy stored in the system of three charges:
Energy stored in an electrostatic field distribution
The energy density, or energy per unit volume, , of the electrostatic field of a continuous charge distribution is:
Outline of proof One may take the equation for the electrostatic potential energy of a continuous charge distribution and put it in terms of the electrostatic field.
Since Gauss's law for electrostatic field in differential form states
where
 is the electric field vector
 is the total charge density including dipole charges bound in a material
 is the permittivity of free space,
then,
so, now using the following divergence vector identity
we have
using the divergence theorem and taking the area to be at infinity where
So, the energy density, or energy per unit volume of the electrostatic field is:
Energy stored in electronic elements
Some elements in a circuit can convert energy from one form to another. For example, a resistor converts electrical energy to heat. This is known as the Joule effect. A capacitor stores it in its electric field. The total electric potential energy stored in a capacitor is given by
where C is the capacitance, V is the electric potential difference, and Q the charge stored in the capacitor.
Outline of proof One may assemble charges to a capacitor in infinitesimal increments, , such that the amount of work done to assemble each increment to its final location may be expressed as
The total work done to fully charge the capacitor in this way is then
where is the total charge on the capacitor. This work is stored as electrostatic potential energy, hence,
Notably, this expression is only valid if , which holds for manycharge systems such as large capacitors having metallic electrodes. For fewcharge systems the discrete nature of charge is important. The total energy stored in a fewcharge capacitor is
which is obtained by a method of charge assembly utilizing the smallest physical charge increment where is the elementary unit of charge and where is the total number of charges in the capacitor.
The total electrostatic potential energy may also be expressed in terms of the electric field in the form
where is the displacement of the electric field within a dielectric material and integration is over the entire volume of the dielectric.
The total electrostatic potential energy stored within a charged dielectric may also be expressed in terms of a continuous volume charge, ,
where integration is over the entire volume of the dielectric.
These latter two expressions are valid only for cases when the smallest increment of charge is zero () such as dielectrics in the presence of metallic electrodes or dielectrics containing many charges.
Notes
 The reference zero is usually taken to be a state in which the individual point charges are very well separated ("are at infinite separation") and are at rest.
 Alternatively, it can also be defined as the work W done by an external force to bring it from the reference position r_{ref} to some position r. Nonetheless, both definitions yield the same results.
 The factor of one half accounts for the 'double counting' of charge pairs. For example, consider the case of just two charges.
References
 Electromagnetism (2nd edition), I.S. Grant, W.R. Phillips, Manchester Physics Series, 2008 ISBN 0471927120
 Halliday, David; Resnick, Robert; Walker, Jearl (1997). "Electric Potential". Fundamentals of Physics (5th ed.). John Wiley & Sons. ISBN 0471105597.