A fascinating parallel between a brilliant mathematician and an arch-villain of crime fiction is drawn in a forthcoming book – New Light on George Boole – by Des MacHale and Yvonne Cohen.

Prof James Moriarty, master criminal and nemesis of Sherlock Holmes, was described by the detective as “the Napoleon of crime”. The book presents convincing evidence that Moriarty was inspired by Prof George Boole.

Boole, an exceptionally bright youth, was too poor to attend grammar school and taught himself advanced mathematics by studying the original works of the leading mathematicians of the day. Boole’s 1844 paper, On a General Method of Analysis, won him a Royal Society Gold Medal. In 1847, Boole wrote The Mathematical Analysis of Logic, which was described in a subtitle as “a calculus of deductive reasoning”. His magnum opus, The Laws of Thought, followed in 1854.

These books marked the beginning of symbolic logic. The algebra devised by Boole is the ideal tool for handling information and modern computers operate following its principles. In October 1846, Boole applied for a position as professor of mathematics at Queen’s College Cork and, after a long delay, took up the chair there in October 1849.

Holmes and Moriarty

Sir Arthur Conan Doyle’s first Sherlock Holmes story appeared in 1887. Holmes’ remarkable conclusions were based on data, logic, statistics, probability, deduction and proof. Holmes is generally believed to have been inspired by Dr Joseph Bell, Conan Doyle’s teacher at the University of Edinburgh. Bell had outstanding powers of observation and could deduce from patients’ appearance not just their medical ailments but their occupations and likely places of residence.

What inspired Conan Doyle to create Moriarty, such a worthy opponent for Holmes? At Stonyhurst, two of the author’s fellow pupils were John Francis Moriarty and Michael Moriarty, who hailed from Cork. Both brothers were winners of the Stonyhurst Prize in Mathematics. They surely were the source of the name for Conan Doyle’s villain.

According to Holmes, Moriarty was gifted with “a phenomenal mathematical faculty” but had “hereditary tendencies of the most diabolical kind”. Aged only 21, he wrote a treatise on the binomial theorem that “had a European vogue”. Another work of Moriarty was Dynamics of an Asteroid, which was, according to Holmes, “a book which ascents to . . . rarefied heights of pure mathematics”.

Holmes recognises Moriarty as “a genius, a philosopher, an abstract thinker. He has a brain of the first order”. This description applies also to Boole and it is entirely reasonable that Conan Doyle might base such a villain on Boole, the founder of symbolic logic.

A thorough comparison between Conan Doyle’s fictional Moriarty and the real Boole reveals numerous persuasive similarities. Both characters held chairs at small provincial universities; both won appointments on the basis of outstanding early work; both had interests in astronomy; the two were of similar appearance – an illustration of Moriarty in Conan Doyle’s work bears a striking resemblance to a photograph of Boole and may well have been based on it.

The major discrepancy between Boole and Moriarty is that Boole was a man of high morals and excellent character, a social reformer, religious thinker and family man. The new book by MacHale and Cohen presents extensive arguments that may account for the dramatic contrast between the two characters. A complete chapter of New Light on George Boole is devoted to the Boole/Moriarty comparison. The book, published by Cork University Press, will be launched in UCC next week.

Peter Lynch is emeritus professor at UCD School of Mathematics & Statistics – he blogs at thatsmaths.com