A former maths professor has turned detective to demonstrate just how useful – and how entertaining – his subject can be.

James Stein, emeritus professor of mathematics at California State University, Long Beach, has long enjoyed the way that “mathematics has managed to infiltrate itself into science fiction”.

Two of his favourite stories involve a mathematician who “summons Lucifer and bets his soul that the Devil can’t come up with a proof of Fermat’s Last Theorem in 24 hours” and “the unexpected consequences when the city of Boston constructs a subway system with bizarre topological properties”.

This led him to an idea of using detective fiction for “the most student-friendly math text ever written”, aimed at those taking introductory maths for liberal arts courses common in American universities.

He suspects that L.A. Math: Romance, Crime, and Mathematics in the City of Angels is the first “collection of stories, with a continuing set of characters, in which mathematics plays an important role”.

The title refers to both liberal arts and Los Angeles, he explains in the preface, because “there’s still a mystique and a fascination to L.A. that Wichita, Kansas, and Peoria, Illinois, simply don’t have”. Putting it in a title, therefore, “virtually guarantee[s] people will be interested – I hope, even if the next word is ‘Math’”.

So how do the stories pan out? Private investigator Freddie Carmichael is starting a new life in Los Angeles but still pining for his ex-wife Lisa in New York. He finds accommodation in a guest house owned by Pete Lennox, whom he instantly diagnoses as “a sports junkie. Probably a sports better.”

As he begins to pick up cases of dodgy bookies, insider trading and murdered heiresses, he soon discovers that Pete’s gambler’s instinct for the figures can be just as effective as hours of dogged detective work.

By the end, readers should have acquired some of the basics of algebra and geometry, probability, game theory and the mathematics of elections.

On the way, Professor Stein has fun adopting the voice of a hard-boiled, wise-cracking private eye. When Freddie gets worried that Pete might be about to move away, he consoles himself with the thought that “Pete and inertia were more than just on speaking terms; they were really good buddies”. Trying to get back together with Lisa, he tells her that he has turned vegetarian and reflects that “it’s not a complete lie. There have been periods when I eat no meat. Those periods, however, tend to coincide with the periods between meals.”

matthew.reisz@tesglobal.com

James Stein’s L.A. Math: Romance, Crime, and Mathematics in the City of Angels has just been published by Princeton University Press.