Now that we know these laws, you will be able to
understand how Newton discovered gravity. He watched the Moon
as it circled the Earth. According to his laws of motion,
objects should move in straight lines, not circles. He wondered
if the same force which made things fall to the Earth could also be causing
the Moon to circle the Earth rather
than go in straight lines. He knew that there was
gravity on the tops of mountains, but he was not sure if gravity
could reach all the way out to the Moon.

The inverse square law:

Remember that Newton discovered the prism.
From his work with light he was familiar with a law known as the
inverse square law. This said that light gets dimmer by the
square of
the distance. In other words, if you hold a flashlight on a
wall and then move back 4 feet it will get 16 times dimmer.
16 is the square of 4. If you move the flashlight back 8 feet
it will get 64 times dimmer because 64 is the square of 8.

Newton wondered if gravity followed the same
rule. Using math, he worked out the speed that the moon would
have to be traveling if gravity did follow the inverse square
law. It just so happens that the Moon is traveling at the exact
speed that it would need to in order for the inverse square law to
apply to gravity. Since Newton's time we have tested the inverse
square law on many objects in the Solar System and in the Universe.
It always works the way it should mathematically.