Like the Mysterium Cosmographicum, the Harmonice Mundi relied on a theory that was absolutely wrong. But hidden within Kepler's lyrical ravings about having finally deciphered God's plan is the final piece of his planetary puzzle: Kepler's third law.

Kepler had fixated on trying to find a pattern or structure for the spacing of the planets. By this point, he had realized that his perfect solids universe was mathematically unfeasible. But Kepler had a new vision, one that encompassed math, astronomy, music, and God. Kepler argued that the same harmonies we find in music were embedded in the geometrical proportions of the universe.

Kepler searched for any consistency that he might interpret as a harmonic pattern. He finally found a relationship that worked: the speed of the planets around their orbits versus their distance from the sun. Kepler's third law states that the distance a planet is from the sun, cubed, is directly proportional to the time it takes to complete the orbit, squared. More simply, Kepler found that the distance a planet was located from the sun directly determined the time it took that planet to revolve around the sun. This was the first time anyone had discovered the exact relationship between these two quantities – in fact, this was the first time anyone had even thought to wonder about the relationship.

Kepler was pleased to have discovered such a relationship – but he was ecstatic to have found the final piece in his harmonic puzzle. The harmonic universe, he believed, would truly be the greatest achievement of his life. In 1618, he published his vision in the Harmonice Mundi. Much like his earlier Mysterium Cosmographicum Kepler went on and on, joyfully extolling the divine basis of his theory. In the preface to his fifth book, he admitted this himself: "Yes, I give myself up to holy raving." To Kepler, the relationships he had discovered seemed so beautiful that they must have come directly from God. He congratulated himself for having the wisdom to finally understand God's plan: "I have robbed the golden vessels of the Egyptians to make out of them a tabernacle for my God, far from the frontiers of Egypt[my book] may wait a hundred years for a reader, since God has also waited six thousand years for a witness." This passage appears in the same book as one of the most important scientific discoveries of the seventeenth century.

Kepler still considered himself to be a modern scientist. Even with his mysticism and his religious devotion, Kepler was at the forefront of modern science. Yes, he was still rooted in the past. But his work in the Harmonice Mundi confirms that he was looking toward the future, asking the questions that none of his colleagues had thought to ask, and forging mathematical relationships where none had existed before.

Of course, Kepler realized none of this. He was proud of the achievement of his harmonic universe – but he spared no pride for his formation of the third law. Neither Kepler nor his peers understood the importance of the equation, which would prove integral to Newton's later discovery of universal gravitation. Until Newton's work made sense of it, the third law was nothing more than an interesting relationship between numbers, with no physical basis. Only from a distance is it easily recognizable as one of the most crucial pieces for solving the mysteries of universal motion.

Kepler was unable to make sense of the relationship between the planets' speeds and their distances from the sun because he did not know about gravity. But he did come painfully close to discovering it. In the preface Astronomia Nova, he had written of gravity as the tendency of two bodies to come together, with a force proportionate to their mass. Indeed, this is an accurate description of gravity. But later in the book, when Kepler was groping for a force to explain the motion of the planets around the sun, the attractive gravitational force had not occurred to him. Instead, he imagined that a force emanating from the sun pushed the planets around.

Kepler comes even closer to a full understanding of gravity in his last published work, Somnium, or Dream, published in 1634 after his death. Somnium, one of the first modern stories of science fiction, tells of a young boy's journey to the moon. Much of the story is a thinly veiled autobiographical tale: the young boy's mother is a sorceress with a hot temper, and the boy is forced to spend five years on an island studying under Tycho de Brahe. Even the description of life on the moon mirrors Kepler's impression of himself. The two moon races, the Prevolvans and the Subvolvans, lead miserable, nomadic lives and are constantly beset by skin ailments – much like Kepler himself.

Embedded in the fantastical and autobiographical fiction is a minutely detailed scientific vision of what a journey to the moon might be like. And it is here that Kepler finally seems to fully, if almost unconsciously, grasp the gravitational force. He describes the force of acceleration on take-off, and then hypothesizes a zone of apparent zero gravity at the point where the ship is equally attracted by the earth and the moon.

Popular pages: Johannes Kepler