
For a collection of point masses, the force on any one of them is the vector sum of the gravitational forces exerted by all the other point masses.
For n particles, force on ith mass

where, \(\overrightarrow{F}_{ij}\) is the force on ith particle due to jth particle.