Kepler was born in the small town of Weil der Stadt in Swabia and moved to nearby Leonberg with his parents in 1576. His father was a mercenary soldier and his mother the daughter of an innkeeper. Johannes was their first child. His father left home for the last time when Johannes was five, and is believed to have died in the war in the Netherlands. As a child, Kepler lived with his mother in his grandfather’s inn. He tells us that he used to help by serving in the inn. One imagines customers were sometimes bemused by the child’s unusual competence at arithmetic.

Kepler’s early education was in a local school and then at a nearby seminary, from which, intending to be ordained, he went on to enrol at the University of Tübingen, then (as now) a bastion of Lutheran orthodoxy.

Throughout his life, Kepler was a profoundly religious man. All his writings contain numerous references to God, and he saw his work as a fulfilment of his Christian duty to understand the works of God. Man being, as Kepler believed, made in the image of God, was clearly capable of understanding the Universe that He had created. Moreover, Kepler was convinced that God had made the Universe according to a mathematical plan (a belief found in the works of Plato and associated with Pythagoras). Since it was generally accepted at the time that mathematics provided a secure method of arriving at truths about the world (Euclid’s common notions and postulates being regarded as actually true), we have here a strategy for understanding the Universe. Since some authors have given Kepler a name for irrationality, it is worth noting that this rather hopeful epistemology is very far indeed from the mystic’s conviction that things can only be understood in an imprecise way that relies upon insights that are not subject to reason. Kepler does indeed repeatedly thank God for granting him insights, but the insights are presented as rational.

At this time, it was usual for all students at a university to attend courses on “mathematics”. In principle this included the four mathematical sciences: arithmetic, geometry, astronomy and music. It seems, however, that what was taught depended on the particular university. At Tübingen Kepler was taught astronomy by one of the leading astronomers of the day, Michael Mästlin (1550 – 1631). The astronomy of the curriculum was, of course, geocentric astronomy, that is the current version of the Ptolemaic system, in which all seven planets – Moon, Mercury, Venus, Sun, Mars, Jupiter and Saturn – moved round the Earth, their positions against the fixed stars being calculated by combining circular motions. This system was more or less in accord with current (Aristotelian) notions of physics, though there were certain difficulties, such as whether one might consider as ‘uniform’ (and therefore acceptable as obviously eternal) a circular motion that was not uniform about its own centre but about another point (called an ‘equant’). However, it seems that on the whole astronomers (who saw themselves as ‘mathematicians’) were content to carry on calculating positions of planets and leave it to natural philosophers to worry about whether the mathematical models corresponded to physical mechanisms. Kepler did not take this attitude. His earliest published work (1596) proposes to consider the actual paths of the planets, not the circles used to construct them.

At Tübingen, Kepler studied not only mathematics but also Greek and Hebrew (both necessary for reading the scriptures in their original languages). Teaching was in Latin. At the end of his first year Kepler got ‘A’s for everything except mathematics. Probably Mästlin was trying to tell him he could do better, because Kepler was in fact one of the select pupils to whom he chose to teach more advanced astronomy by introducing them to the new, heliocentric cosmological system of Copernicus. It was from Mästlin that Kepler learned that the preface to On the revolutions, explaining that this was ‘only mathematics’, was not by Copernicus. Kepler seems to have accepted almost instantly that the Copernican system was physically true; his reasons for accepting it will be discussed in connection with his first cosmological model (see below).

It seems that even in Kepler’s student days there were indications that his religious beliefs were not entirely in accord with the orthodox Lutheranism current in Tübingen and formulated in the ‘Augsburg Confession’ (Confessio Augustana). Kepler’s problems with this Protestant orthodoxy concerned the supposed relation between matter and ‘spirit’ (a non-material entity) in the doctrine of the Eucharist. This ties up with Kepler’s astronomy to the extent that he apparently found somewhat similar intellectual difficulties in explaining how ‘force’ from the Sun could affect the planets. In his writings, Kepler is given to laying his opinions on the line – which is very convenient for historians. In real life, it seems likely that a similar tendency to openness led the authorities at Tübingen to entertain well-founded doubts about his religious orthodoxy. These may explain why Mästlin persuaded Kepler to abandon plans for ordination and instead take up a post teaching mathematics in Graz. Religious intolerance sharpened in the following years. Kepler was excommunicated in 1612. This caused him much pain, but despite his (by then) relatively high social standing, as Imperial Mathematician, he never succeeded in getting the ban lifted.

Instead of the seven planets in standard geocentric astronomy the Copernican system had only six, the Moon having become a body of kind previously unknown to astronomy, which Kepler was later to call a ‘satellite’ (a name he coined in 1610 to describe the moons that Galileo had discovered were orbiting Jupiter, literally meaning ‘attendant’).

Moreover, in geocentric astronomy there was no way of using observations to find the relative sizes of the planetary orbs; they were simply assumed to be in contact. This seemed to require no explanation, since it fitted nicely with natural philosophers’ belief that the whole system was turned from the movement of the outermost sphere, one (or maybe two) beyond the sphere of the ‘fixed’ stars (the ones whose pattern made the constellations), beyond the sphere of Saturn. In the Copernican system, the fact that the annual component of each planetary motion was a reflection of the annual motion of the Earth allowed one to use observations to calculate the size of each planet’s path, and it turned out that there were huge spaces between the planets.

Kepler’s answer to these questions, described in his Mystery of the Cosmos (Mysterium cosmographicum, Tübingen, 1596), looks bizarre to twentieth-century readers (see the figure on the right). He suggested that if a sphere were drawn to touch the inside of the path of Saturn, and a cube were inscribed in the sphere, then the sphere inscribed in that cube would be the sphere circumscribing the path of Jupiter. Then if a regular tetrahedron were drawn in the sphere inscribing the path of Jupiter, the insphere of the tetrahedron would be the sphere circumscribing the path of Mars, and so inwards, putting the regular dodecahedron between Mars and Earth, the regular icosahedron between Earth and Venus, and the regular octahedron between Venus and Mercury. This explains the number of planets perfectly: there are only five convex regular solids (as is proved in Euclid’s Elements , Book 13). It also gives a convincing fit with the sizes of the paths as deduced by Copernicus, the greatest error being less than 10% (which is spectacularly good for a cosmological model even now). Kepler did not express himself in terms of percentage errors, and his is in fact the first mathematical cosmological model, but it is easy to see why he believed that the observational evidence supported his theory.

Kepler saw his cosmological theory as providing evidence for the Copernican theory. Before presenting his own theory he gave arguments to establish the plausibility of the Copernican theory itself. Kepler asserts that its advantages over the geocentric theory are in its greater explanatory power. For instance, the Copernican theory can explain why Venus and Mercury are never seen very far from the Sun (they lie between Earth and the Sun) whereas in the geocentric theory there is no explanation of this fact. Kepler lists nine such questions in the first chapter of the Mysterium cosmographicum.

Kepler carried out this work while he was teaching in Graz, but the book was seen through the press in Tübingen by Mästlin. The agreement with values deduced from observation was not exact, and Kepler hoped that better observations would improve the agreement, so he sent a copy of the Mysterium cosmographicum to one of the foremost observational astronomers of the time, Tycho Brahe (1546 – 1601). Tycho, then working in Prague (at that time the capital of the Holy Roman Empire), had in fact already written to Mästlin in search of a mathematical assistant. Kepler got the job.

Naturally enough, Tycho’s priorities were not the same as Kepler’s, and Kepler soon found himself working on the intractable problem of the orbit of Mars. He continued to work on this after Tycho died (in 1601) and Kepler succeeded him as Imperial Mathematician. Conventionally, orbits were compounded of circles, and rather few observational values were required to fix the relative radii and positions of the circles. Tycho had made a huge number of observations and Kepler determined to make the best possible use of them. Essentially, he had so many observations available that once he had constructed a possible orbit he was able to check it against further observations until satisfactory agreement was reached. Kepler concluded that the orbit of Mars was an ellipse with the Sun in one of its foci (a result which when extended to all the planets is now called “Kepler’s First Law”), and that a line joining the planet to the Sun swept out equal areas in equal times as the planet described its orbit (“Kepler’s Second Law”), that is the area is used as a measure of time. After this work was published in New Astronomy … (Astronomia nova, …, Heidelberg, 1609), Kepler found orbits for the other planets, thus establishing that the two laws held for them too. Both laws relate the motion of the planet to the Sun; Kepler’s Copernicanism was crucial to his reasoning and to his deductions.

The actual process of calculation for Mars was immensely laborious – there are nearly a thousand surviving folio sheets of arithmetic – and Kepler himself refers to this work as ‘my war with Mars’, but the result was an orbit which agrees with modern results so exactly that the comparison has to make allowance for secular changes in the orbit since Kepler’s time.

It was crucial to Kepler’s method of checking possible orbits against observations that he have an idea of what should be accepted as adequate agreement. From this arises the first explicit use of the concept of observational error. Kepler may have owed this notion at least partly to Tycho, who made detailed checks on the performance of his instruments.

The work on Mars was essentially completed by 1605, but there were delays in getting the book published. Meanwhile, in response to concerns about the different apparent diameter of the Moon when observed directly and when observed using a camera obscura, Kepler did some work on optics, and came up with the first correct mathematical theory of the camera obscura and the first correct explanation of the working of the human eye, with an upside-down picture formed on the retina. These results were published in Supplements to Witelo, on the optical part of astronomy (Ad Vitellionem paralipomena, quibus astronomiae pars optica traditur, Frankfurt, 1604). He also wrote about the New Star of 1604, now usually called ‘Kepler’s supernova’, rejecting numerous explanations, and remarking at one point that of course this star could just be a special creation ‘but before we come to [that] I think we should try everything else’ (On the New Star, De stella nova, Prague, 1606, Chapter 22, KGW 1, p. 257, line 23).

Following Galileo’s use of the telescope in discovering the moons of Jupiter, published in his Sidereal Messenger (Venice, 1610), to which Kepler had written an enthusiastic reply (1610), Kepler wrote a study of the properties of lenses (the first such work on optics) in which he presented a new design of telescope, using two convex lenses (Dioptrice, Prague, 1611). This design, in which the final image is inverted, was so successful that it is now usually known not as a Keplerian telescope but simply as the astronomical telescope.

Kepler’s years in Prague were relatively peaceful, and scientifically extremely productive. In fact, even when things went badly, he seems never to have allowed external circumstances to prevent him from getting on with his work. Things began to go very badly in late 1611. First, his seven year old son died. Kepler wrote to a friend that this death was particularly hard to bear because the child reminded him so much of himself at that age. Then Kepler’s wife died. Then the Emperor Rudolf, whose health was failing, was forced to abdicate in favour of his brother Matthias, who, like Rudolf, was a Catholic but (unlike Rudolf) did not believe in tolerance of Protestants. Kepler had to leave Prague. Before he departed he had his wife’s body moved into the son’s grave, and wrote a Latin epitaph for them. He and his remaining children moved to Linz (now in Austria).

Kepler seems to have married his first wife, Barbara, for love (though the marriage was arranged through a broker). The second marriage, in 1613, was a matter of practical necessity; he needed someone to look after the children. Kepler’s new wife, Susanna, had a crash course in Kepler’s character: the dedicatory letter to the resultant book explains that at the wedding celebrations he noticed that the volumes of wine barrels were estimated by means of a rod slipped in diagonally through the bung-hole, and he began to wonder how that could work. The result was a study of the volumes of solids of revolution (New Stereometry of wine barrels …, Nova stereometria doliorum …, Linz, 1615) in which Kepler, basing himself on the work of Archimedes, used a resolution into ‘indivisibles’. This method was later developed by Bonaventura Cavalieri (c. 1598 – 1647) and is part of the ancestry of the infinitesimal calculus.

Kepler’s main task as Imperial Mathematician was to write astronomical tables, based on Tycho’s observations, but what he really wanted to do was write The Harmony of the World, planned since 1599 as a development of his Mystery of the Cosmos. This second work on cosmology (Harmonices mundi libri V, Linz, 1619) presents a more elaborate mathematical model than the earlier one, though the polyhedra are still there. The mathematics in this work includes the first systematic treatment of tessellations, a proof that there are only thirteen convex uniform polyhedra (the Archimedean solids) and the first account of two non-convex regular polyhedra (all in Book 2). The Harmony of the World also contains what is now known as ‘Kepler’s Third Law’, that for any two planets the ratio of the squares of their periods will be the same as the ratio of the cubes of the mean radii of their orbits. From the first, Kepler had sought a rule relating the sizes of the orbits to the periods, but there was no slow series of steps towards this law as there had been towards the other two. In fact, although the Third Law plays an important part in some of the final sections of the printed version of the Harmony of the World, it was not actually discovered until the work was in press. Kepler made last-minute revisions. He himself tells the story of the eventual success:

…and if you want the exact moment in time, it was conceived mentally on 8th March in this year one thousand six hundred and eighteen, but submitted to calculation in an unlucky way, and therefore rejected as false, and finally returning on the 15th of May and adopting a new line of attack, stormed the darkness of my mind. So strong was the support from the combination of my labour of seventeen years on the observations of Brahe and the present study, which conspired together, that at first I believed I was dreaming, and assuming my conclusion among my basic premises. But it is absolutely certain and exact that “the proportion between the periodic times of any two planets is precisely the sesquialterate proportion of their mean distances …”

(Harmonice mundi Book 5, Chapter 3, trans. Aiton, Duncan and Field, p. 411).

While Kepler was working on his Harmony of the World, his mother was charged with witchcraft. He enlisted the help of the legal faculty at Tübingen. Katharina Kepler was eventually released, at least partly as a result of technical objections arising from the authorities’ failure to follow the correct legal procedures in the use of torture. The surviving documents are chilling. However, Kepler continued to work. In the coach, on his journey to Württemberg to defend his mother, he read a work on music theory by Vincenzo Galilei (c.1520 – 1591, Galileo’s father), to which there are numerous references in The Harmony of the World.

Calculating tables, the normal business for an astronomer, always involved heavy arithmetic. Kepler was accordingly delighted when in 1616 he came across Napier’s work on logarithms (published in 1614). However, Mästlin promptly told him first that it was unseemly for a serious mathematician to rejoice over a mere aid to calculation and second that it was unwise to trust logarithms because no-one understood how they worked. (Similar comments were made about computers in the early 1960s.) Kepler’s answer to the second objection was to publish a proof of how logarithms worked, based on an impeccably respectable source: Euclid’s Elements Book 5. Kepler calculated tables of eight-figure logarithms, which were published with the Rudolphine Tables (Ulm, 1628). The astronomical tables used not only Tycho’s observations, but also Kepler’s first two laws. All astronomical tables that made use of new observations were accurate for the first few years after publication. What was remarkable about the Rudolphine Tables was that they proved to be accurate over decades. And as the years mounted up, the continued accuracy of the tables was, naturally, seen as an argument for the correctness of Kepler’s laws, and thus for the correctness of the heliocentric astronomy. Kepler’s fulfilment of his dull official task as Imperial Mathematician led to the fulfilment of his dearest wish, to help establish Copernicanism.

By the time the Rudolphine Tables were published Kepler was, in fact, no longer working for the Emperor (he had left Linz in 1626), but for Albrecht von Wallenstein (1583 – 1632), one of the few successful military leaders in the Thirty Years’ War (1618 – 1648).

Wallenstein, like the emperor Rudolf, expected Kepler to give him advice based on astrology. Kepler naturally had to obey, but repeatedly points out that he does not believe precise predictions can be made. Like most people of the time, Kepler accepted the principle of astrology, that heavenly bodies could influence what happened on Earth (the clearest examples being the Sun causing the seasons and the Moon the tides) but as a Copernican he did not believe in the physical reality of the constellations. His astrology was based only on the angles between the positions of heavenly bodies (‘astrological aspects’). He expresses utter contempt for the complicated systems of conventional astrology.

Kepler died in Regensburg, after a short illness. He was staying in the city on his way to collect some money owing to him in connection with the Rudolphine Tables. He was buried in the local church, but this was destroyed in the course of the Thirty Years’ War and nothing remains of the tomb.