Kepler, who embraced Copernicanism in his youth, strove to identify the harmonic rule that—in his view—was used by God in creating the Cosmos. In his Mysterium Cosmographicum, he formulated the hypothesis—later discarded—that the dimensions of the spheres of the six planets then known were linked to the five regular solids. The radius of each planetary sphere was determined by its exact fit between two successive solids.
Kepler later became the assistant of Tycho Brahe, from whom he inherited a corpus of highly accurate celestial observations. Using Tycho's data, Kepler tried to solve the arduous problem of determining the orbit of Mars. After many attempts, he realized the need to abandon the postulate of the circularity of planetary orbits: in fact, each planet's orbit was an ellipse with the Sun located in one of the foci. Kepler thus established what is now known as his First Law.
Kepler had previously found that the planets travel on their orbits in non-uniform motion. In consequence, the segment joining the planet to the Sun covers equal areas in equal time intervals. This principle, now known as Kepler's Second Law, implies that the planets move faster when they are closer to the Sun and more slowly when they are farther away. In so doing, Kepler breached another ancient dogma: the uniform motion of the planets.
In his Third Law, Kepler states that, for any given pair of planets, the squares of their revolution periods were in the same proportion to each other as the cubes of the major semi-axes of their orbits. Kepler thus clarified the exact rule governing the gradual decrease in the orbital velocity of the planets, proceeding from the innermost ones to the outermost ones.
Kepler wanted to root his three laws in a physical explanation. He voiced the hypothesis that the Sun was a magnet capable of exerting on the planets a motive power whose intensity varied with distance. Kepler saw the planets, too, as magnets permanently oriented in the same direction. Consequently, in one part of the orbit, being attracted by the Sun, the planets tended to accelerate and draw closer to the Sun; in the other part of the orbit, they were repelled by the Sun, moved away from it, and thus lost velocity.