In the following we try to understand how Newton came up with his law by considering some basic principles and observations involving mass of an object depicted by small letter m, the mass of the Earth depicted by capital M and the moon:
Galileo demonstrated that on Earth (mass M) all objects fall at the same rate (neglecting air resistance), i.e. the gravitational acceleration g is independent of m . Thus the gravitational force must be proportional to m and can be written as FG=mg (Newton's second law of motion). The gravitational acceleration g is independent of m but might depend on M and r, i.e. g is a function of M and r.
The dependence of g on M is hard to measure (except you are in a virtual lab where you can change the mass of the Earth M) but sinceNewton's third law of motionholds we know that the force the Earth (mass M) is exerting on the object with mass m must be of the same magnitude than the force the object (mass m) is exerting on the Earth (mass M). Thus the Fgand also g must be proportional to M .
Newton's great idea was to generalize the gravitational force and to apply the concept not only to objects on Earth but to all objects, including the moon.
He identified the gravitational acceleration ascentripetal accelerationwhich keeps the moon in orbit and he was therefore able to estimate the gravitational acceleration at a distance (Earth - moon) which is roughly 60 times the radius of the Earth. Assuming a circular orbit the acceleration is approximately 3,600 times smaller than on the surface of the Earth. From that he 'guessed' the inverse square law.
Combining the considerations above and adding thegravitational constantG we arrive at the expression for gravitational force FGdepicted on the right upper side of the figure 1.
Applying the law, Newton was able to calculate the orbits of planets and indeed found that the most general, bound trajectory (orbit) is an ellipse - in agreement withKepler's first law of planetary motion. Additionally, Newton could show mathematically that all possible trajectories of an object in a gravitational field can be described byconic sections.

Figure 1:Newton assumed that not only the apple but also the moon should be attracted to the Earth. By deducing the gravitational acceleration of the moon, Newton came up with the inverse square law.
Until now we simplified our discussion and considered the magnitude of the gravitational force only. In vector form the gravitational force acting on mass m due to the attraction of mass M is given by the equation on the lower right side of the figure 1, wherer毫米is given byrM-rmand r毫米= |rM-rm|.