Consider a system of charges q1, q2,…, qn with position vectors r1, r2,…, r n relative to some origin. The potential V1 at P due to the charge q1 is
where r1P is the distance between q1 and P. Similarly, the potential V2 at P due to q2 and due to q are given by
where r2P and r3P are the distances of P from charges q2 and q3, respectively; and so on for the potential due to other charges.
By the superposition principle, the potential V at P due to the total charge configuration is the algebraic sum of the potentials due to the individual charges
The electric field outside the shell is as if the entire charge is concentrated at the centre. Thus, the potential outside the shell is given by
where q is the total charge on the shell and R its radius. The electric field inside the shell is zero. This implies that potential is constant inside the shell (as no work is done in moving a charge inside the shell), and, therefore, equals its value at the surface, which is