2.7 Potential Energy of a System of Charges
Potential energy stored in a system of charges is the work done (by an external agency) in assembling the charges at their locations.
Bringing the first charge from infinity needs no work, since there is no external field against which work needs to be done.
The potential energy of a system of two charges q one and q two is q one q two over 4 pi epsilon nought r one two, where r one two is the distance between them.
The potential energy is unaltered whatever way the charges are brought to the specified locations, because of path-independence of work for electrostatic force.
If q one q two is greater than zero, potential energy is positive: for like charges, the force is repulsive and positive work is needed to bring the charges from infinity.
For unlike charges, the electrostatic force is attractive, so the potential energy is negative.
For three charges, U is found by adding the work done in different steps: one term for each pair, q one q two over r one two, q one q three over r one three and q two q three over r two three, over 4 pi epsilon nought.
The potential energy is characteristic of the present state of configuration, and not the way the state is achieved.