All objects are attracted to each other by a gravitational force of magnitude
where G is the universal constant of Gravitation, m and M are the masses of the two objects, and r is the distance between them. Using Newton's 2nd law, , the corresponding acceleration towards a nearby body of mass is
The total acceleration a body experiences when there are many other gravitational bodies in the vicinity, of masses and at distances , is therefore given by the sum of the individual accelerations towards each other body:
where we have now used vector notation because the displacements may be in different directions.