The event that would eventually lead to Isaac Newton writing and publishing his magnum opus, the Philosophiæ Naturalis Principia Mathematica (the Mathematical Principles of Natural Philosophy), took place in a London coffee house.

Title page of ‘Principia’, first edition (1687). Source: Wikimedia Commons
This is not quite as strange as it might at first appear, shortly after their first appearance in England around 1650 coffee houses became the favourite meeting places of the English scientific intelligentsia, the astronomers, mathematicians and natural philosophers. Here, these savants would meet up to exchange ideas, discuss the latest scientific theories and pose challenges to each other. These institutions also earned the appellation Penny Universities, as some of those savants, such as William Whiston, Francis Hauksbee and Abraham de Moivre, bettered their incomes by holding lectures or demonstrating experiments to willing audiences, who paid the price of a cup of coffee, a penny, for their intellectual entertainment. Later, after he had become Europe’s most famous living natural philosopher, Isaac Newton would come to hold court in a coffee shop, surrounded by his acolytes, the original Newtonians, distributing words of wisdom and handing round his unpublished manuscripts for scrutiny. However, all that still lay in the future.
One day in January 1684 Christopher Wren, Robert Hooke and Edmond Halley were discussing the actual astronomical theories over a cup of coffee. Wren, today better known as one of England most famous architects, was a leading mathematician and astronomers, who had served both as Gresham and Savilian professor of astronomy. Newton would name him along with John Wallis and William Oughtred as one of the three leading English mathematicians of the seventeenth century.

Wren, portrait c.1690 by John Closterman Source: Wikimedia Commons
Hooke was at the time considered to be the country’s leading experimental natural philosopher and Halley enjoyed an excellent reputation as a mathematician and astronomer.

Portrait by Richard Phillips, before 1722 Source: Wikimedia Commons
The topic of discussion was Kepler’s elliptical, heliocentric astronomy and an inverse, squared law of gravity. All three men had arrived separately and independently at an inverse, squared law of gravity probably derived from Huygens’ formula for centrifugal force. Wren posed the question to the other two, whether they could demonstrate that such a law would lead to Kepler’s elliptical planetary orbits.
Hooke asserted that he already had such a demonstration but he would first reveal it to the others after they had admitted that they couldn’t solve the problem. Wren was sceptical of Hooke’s claim and offered a prize of a book worth forty shillings to the first to produce such a demonstration. Hooke maintained his claim but didn’t deliver. It is worth noting that Hooke never did deliver such a demonstration. Halley, as already said no mean mathematician, tried and failed to solve the problem.
In August 1684 Halley was visiting Cambridge and went to see Newton in his chambers in Trinity College, who, as we know, he had met in 1682.

Trinity College Cambridge, David Loggan’s print of 1690 Source: Wikimedia Commons
According the Newton’s account as told to Abraham DeMoivre, Halley asked Newton, “what he thought the Curve would be that would be described by the Planets supposing the force of attraction towards the Sun to be reciprocal to the square of the distance from it. Sir Isaac replied immediately that it would be an Ellipse…” Here was Newton claiming to know the answer to Wren’s question. Halley asked Newton how he knew it and he replied, “I have calculated it…” Newton acted out the charade of looking for the supposed solution but couldn’t find it. However he promised Halley that he would send him the solution.
In November Edward Paget, a fellow of Trinity College, brought Halley a nine page thesis entitled De motu corporum in gyrum (On the Motion of Bodies in an Orbit).

Page of the De motu corporum in gyrum
When Halley read Newton’s little booklet he was immediately aware that he held something truly epoch making in the history of astronomy and physics in his hand. Newton had delivered up a mathematical proof that an elliptical orbit would be produced by an inverse square force situated at one of the foci of the ellipse, thus combining the inverse square law of gravity with Kepler’s first law. He went on to also derive Kepler’s second and third laws as well as laying down the beginnings of a mathematical theory of dynamics. Halley reported details of this extraordinary work to the Royal Society on 10 December 1684:
Mr Halley gave an account, that he had lately seen Mr. Newton at Cambridge, who had shewed him a curious treatise, De motu: which, upon Mr. Halley’s desire, was he said promised to be sent to the Society to be entered upon their register.
Mr. Halley was desired to put Mr. Newton in mind of his promise for securing his invention to himself till such time as he could be at leisure to publish it. Mr. Paget was desired to join with Mr. Halley.
The interest in and the demand to read Newton’s new production was very high but the author decided to improve and rewrite his first offering, triggering one of the most extraordinary episodes in his life.
Although he was Lucasian Professor and would turn forty-two on 25 December 1684, Newton remained a largely unknown figure in the intellectual world of the late seventeenth century. Following the minor debacle that resulted from the publication of his work in optics in the 1670s he had withdrawn into his shell, living in isolation within the walls of Cambridge University. He carried out his duties as Lucasian Professor but had almost no students to speak of and definitely no disciples. Thanks to the word of mouth propaganda of people like his predecessor as Lucasian Professor, Isaac Barrow, and above all the assiduous mathematics groupie, John Collins, it was rumoured that a mathematical monster slumbered in his chambers in Trinity College but he had done nothing to justify this bruited reputation. His chambers were littered with numerous unfinished scientific manuscripts, mostly mathematical but also natural philosophical and an even larger number of alchemical and theological manuscripts but none of them was in a fit state to publish and Newton showed no indication of putting them into a suitable state. Things now changed, Newton had found his vocation and his muse and the next two and a half years of his life were dedicated to creating the work that would make him into a history of science legend, the reworking of De motu into his Principia.
Over those two and a half years Newton turned his nine-page booklet into a major three-volume work of science. The modern English translation by I B Cohen runs to just over 560 large format pages, although this contains all the additions and alterations made in the second and third editions, so the original would have been somewhat shorter. Halley took over the editorship of the work, copyediting it and seeing it through the press. In 1685 the Royal Society had voted to take over the costs of printing and publishing Newton’s masterpiece, so everything seemed to be going smoothly and then disaster struck twice, firstly in the form of Robert Hooke and secondly in the form of a financial problem.
Hooke never slow to claim his priority in any matter of scientific discovery or invention stated that he alone had first discovered the inverse square law of gravity and that this fact should, indeed must, be acknowledged in full in the preface to Newton’s book. Halley, realising at once the potential danger of the situation, was the first to write to Newton outlining Hooke’s claim to priority, stating it, of course, as diplomatically as possible. Halley’s diplomacy did not work, Newton went ballistic. At first his reaction was comparatively mild, merely pointing out that he had had the inverse square law well before his exchanges with Hook in 1679 and had, in fact, discussed the matter with Wren in 1677, go ask him, Newton said. Then with more time to think about the matter and building up a head of steam, Newton wrote a new letter to Halley tearing into Hooke and his claim like a rabid dog. All of this ended with Newton declaring that he would no longer write volume three of his work. Halley didn’t know this at the time but this was in fact, as we shall see, the most important part of the entire work in which Newton presented his mathematical model of a Keplerian cosmos held together by the law of gravity. Halley remained calm and used all of his diplomatic skills to coax, flatter, persuade and cajole the prickly mathematician into delivering the book as finished. In the end Newton acquiesced and delivered but acknowledgements to Hooke were keep to a minimum and offered at the lowest level of civility.
The financial problem was of a completely different nature. In 1685 the Royal Society had taken over the cost of printing and publishing the deceased Francis Willughby’s Historia piscium as edited by John Ray.
This was an expensive project due to the large number plates that the book contained and the book was, at the time, a flop. This meant when it came time to print and publish Newton’s work the Royal Society was effectively bankrupt. One should note here that the popular ridicule poured out over Willughby’s volume, it having almost prevented Newton’s masterpiece appearing, is not justified. Historia piscium is an important volume in the history of zoology. Halley once again jumped into the breach and took over the costs of printing the volumes; on the 5 July 1687 Halley could write to Newton to inform him that the printing of his Philosophiæ Naturalis Principia Mathematica had been completed.