Chapter-2|Electrostatic Potential and Capacitance| NCERT 12th Physics:
Electrostatic Potential Energy of a System of Charges:
The electrostatic potential energy of a system of point charges may be defined as the amount of work done in assembling the charges at their location by bringing them in from infinity.
Electrostatic Potential Energy of a System of Two Point Charges:
Let a point charge q₁ is at rest at a point A in space. It takes no work to bring the first charge q₁ because there is no any electric field yet to work against. So
If charge q₂ is moved in from infinity to point B, the work required is
Electrostatic potential is a scalar quantity. In the above formula, the value of q₁ and q₂ must be with proper sign.