All of this is presented with real graphic verve. (Even though I’m a text guy, I couldn’t keep my eyes off the witty drawings.) To ginger up the story, the authors often deviate from the actual facts. As they admit in an afterword, Russell never met Frege or Cantor in the flesh. Nor, I am fairly certain, did he ever say to Whitehead, “I’m tired, man.” (You expect Whitehead to reply, “Me too, bro!”) We are assured, however, that no liberties have been taken with “the great adventure of ideas.” And for the most part the ideas are conveyed accurately, and with delightful simplicity. If you don’t know much about infinity, for instance, you are invited to check in to “Hilbert’s Hotel” — which, with its infinite number of rooms, can miraculously accommodate additional guests even when it’s completely full.

There is one serious misstep, though. It has to do with the notorious paradox that Russell discovered in the spring of 1901: the paradox of the set of all sets that don’t contain themselves as members. (Think of the barber of Seville, who shaves all men, and only those men, who do not shave themselves. Does this barber shave himself or not? Either possibility yields a contradiction.) The authors have fun unpacking Russell’s paradox, but they exaggerate its fallout. The paradox did ultimately doom Russell’s (and Frege’s) project of reducing mathematics to pure logic. However — and this is something that Russell himself failed to realize, along with the authors — it left mathematics pretty much undisturbed. When Cantor heard of Russell’s paradox, he did not react like a madman, the way ­“Logicomix” caricatures him. He calmly observed that it did not apply to his own theory of sets, which evolved into the present-day foundation of mathematics.

It is true that Cantor did suffer fits of madness (the magus of infinity died in a mental asylum), as did many other figures in this story. Frege, the consummate logician, ended up a foaming anti-Semite. Kurt Gödel, who proved that no logical system could capture all of mathematics, starved himself to death out of a paranoid fear that people were poisoning his food. Russell maintained his own grip on sanity, but his fear of hereditary madness was borne out when his elder son became schizophrenic and his granddaughter, also schizophrenic, committed suicide by setting herself afire. Russell’s philosophical confidence, however, was shattered by his onetime pupil Ludwig Wittgenstein, who made him realize that he had never really understood what logic was.

Is it madness to be driven by a passion for something as inhuman as abstract certainty? This is a question the four creators of “Logicomix” ponder as, in a beguiling coda, they make their way through nighttime Athens to an open-air performance of the “Oresteia.” Oddly enough, Aeschylus’ trilogy furnishes the concluding wisdom, which, at the risk of triteness, I’ll condense into a mathematical inequality:

Life > logic.