For one point charge q in the presence of an electric field E due to another point charge Q, the electric potential energy is defined as the work done to bring it from the referance position rref to some position r: mathematically this is a line integral [2]. The electrostatic field is conservative, and for one point charge radial, so it is path independent and equal to the differance in potential between the two endpoints the charge has moved. Mathematically