Let us consider a system of two point charges Q1 and Q2 separated by a distance 'd' in air.
No work is done in bringing Q1 to A, because there is no electric field.
Now the charge Q2 is brought from \(\infty\) to the point B against the field of Q1.
Work is done in this process.
\(W=V\times Q_2\)
Where 'V' is the potential at B due to charge Q1 & is given by \(V=\frac{1}{4\pi\varepsilon_0}\times\frac{Q_1}{d}\)
\(\therefore W=\frac{1}{4\pi\varepsilon_0}\times\frac{Q_1}{d_1}\times Q_2\)
By def, \(W=\) electric potential energy \(=U\).
\(\therefore\,U=\frac{1}{4\pi\varepsilon_0}\times\frac{Q_1Q_2}{d}\)
Electric potential energy \(=U\).
\(d=\) distance between two charges