The apple didn't hit Newton on the head and inspire him with the sudden insight that there's such a thing as gravity. People had been noodling over the obvious tendency of things to fall just about forever. For a long time, their views on the subject took the form of theories about how objects might be animated, such as by an innate desire to be reunited with the Earth. During the Enlightenment, as creatures now known as "scientists" began to emerge, the focus left the supposed interior experience of the objects and trained itself on finding universal, predictable patterns in the movement.
So what was really going through Newton's mind when the apple fell from the tree? Before Newton was well launched on his extraordinary career, natural philosophers already had adopted the "inertia" model of movement; that is to say, objects tend to keep moving in a straight line unless slowed or diverted by an outside force. But this was puzzling in view of the evident circular/elliptical movement of heavenly bodies. There was a strong tendency to find circles "perfect" and "beautiful," resulting in a popular view that lowly straight-line movements characterized earthly bodies while heavenly bodies moved in stately and superior circles. Were there separate laws of motion on Earth and in Heaven?
Newton's brilliance lay in a unifying theme that would explain why an apple appears to fall straight down while the Moon describes a circular orbit around the Earth.
We have now finally arrived at that idyllic summer afternoon in Grantham in 1666, as the young Isaac Newton, home from university to avoid the plague, whilst lying in his mother’s garden contemplating the universe, as one does, chanced to see an apple falling from a tree. Newton didn’t ask why it fell, but set off on a much more interesting, complicated and fruitful line of speculation. Newton’s line of thought went something like this. If Descartes is right with his theory of inertia, . . . then there must be some force pulling the moon down towards the earth and preventing it shooting off in a straight line at a tangent to its orbit. What if, he thought, the force that holds the moon in its orbit and the force that cause the apple to fall to the ground were one and the same? This frighteningly simple thought is the germ out of which Newton’s theory of universal gravity and his masterpiece the Principia grew.Newton guessed that, if the Moon were motionless, it would fall straight down to Earth the same as the apple. But the Moon has a momentum that's at right angles to the gravity vector, which always points to the center of the Earth, meaning that the Moon's path is gradually changing in direction as the it "falls" sideways around the Earth. The same gravitational force could account for the curved motion of the Moon and the straight motion of the apple.
The Principia was published in 1687, after Newton put considerable additional work into his first intuition about gravity, including the critical insight that elliptical planetary orbits result from a force pointing from each planet straight down into the Sun, which is inversely proportional to the square of the distance between the two. Not that Newton dreamed up either the planets' elliptical orbits or the inverse-square law on his own. Galileo had noticed in the late 16th and early 17th centuries that gravity acts as a constant acceleration on falling bodies, no matter what their weights. Kepler published his three laws of planetary motion in the first couple of decades of the 17th century, showing that planets move in ellipses of which the Sun is one focus. Between Newton's 1666 "apple moment" and the 1687 publication of the Principia, Hooke and others were inching their way toward the inverse-square law, first realizing that gravity always operated in one direction (earlier theories included the idea that gravity pushed at one point in the orbit and pulled at another), then establishing that its attractive power varied with distance, and finally nailing down the understanding that gravity alters with the square of the distance between the attractive bodies. Newton's genius was to understand that the inverse-square law, plus the tendency of objects to move in a straight line unless acting on by a force, simultaneously explained the elliptical paths of planets in Heaven and the straight downward fall of an apple from a tree on Earth.
As Richard Feynman used to say, in the old world people believed that angels flew behind planets and pushed them in their circular paths. Now, in the advanced modern world, we say that the angels are invisible and they push at right angles to what we thought back then. We still have no idea what gravity is, but we're considerably more adept as describing what kinds of motions it produces, on Earth as it is in Heaven.


