An Abridged History of Mathematical Metaphor in Speculative Fiction

by Sam Macdonald

Series banner for The History Files with Planetside logo
Read by Maggie Ayala

Speculative fiction has always borrowed from the sciences, but one discipline shows up more often—and in more unexpected ways—than readers might realize. Mathematics, usually seen as the realm of formulas and proofs, has a long history of being used as a versatile narrative tool for authors trying to make sense of political systems, technological anxiety, and the strangeness of modern life. Across more than a century of genre writing, math has worked quietly in the background as one of the most reliable sources of metaphor in speculative fiction.

Comedy and Critique

Puffin's 1946 edition of Alice's Adventures in Wonderland. Yellow cover with a drawing of Alice and the queen.
Puffin’s 1946 edition. Cover art by John Tenniel. Via ISFDB.

Though mathematics has a reputation for being treated as dry, abstract, and apolitical, one of its oldest uses in fiction is satire. Mathematician and logician Charles Dodgson (more widely known by his pen name, Lewis Carroll) peppered Alice’s Adventures in Wonderland (1865) with commentary on perceived dangers of the new directions mathematics was taking in the mid-19th century. Nonsense riddles and impossible implications serve as critiques of symbolic algebra, imaginary numbers, and the increasingly abstract turn of (then) contemporary mathematics. Interested readers are strongly encouraged to peruse Melanie Bayley’s wonderful article “Alice’s Adventures in Algebra: Wonderland Solved.”

Gray and brown cover of Flatland
Barnes and Noble 1963 edition. Via ISFDB.

Yet perhaps the quintessential early example of mathematics as metaphor appears in Edwin Abbott Abbott’s Flatland: A Romance of Many Dimensions (1884), the tale of a square (A. Square, to be precise) struggling to imagine dimensions beyond his own. The story captures something fundamental about both mathematics and speculative fiction: the pleasure of taking a simple set of assumptions and following them wherever they lead. In Flatland, those assumptions produce a society of line segments and polygons arranged in a rigid caste hierarchy, where imagining a third dimension is both a mathematical puzzle and social heresy. With its pointed satire of Victorian norms, including female characters that are literally one-dimensional, Abbott delivers a satirical gem that’s as weird as it is revealing.

Although Flatland helped launch a long tradition of “dimensional fiction”—stories that try to imagine fourth and higher dimensions—the heart of Abbott’s project goes deeper. As Alex Kasman notes in his comprehensive catalogue of mathematically themed fiction, Abbott’s narrative uses mathematics as a vehicle for examining the boundaries of knowledge itself. In doing so, Abbott connects mathematical metaphor to broader questions about culture, spirituality, and imagining realities outside human (or polygonal) experience.

From Humor to Horror

Red cover with a couple dancing in a ballroom.
First printing of The Call of Cthulhu in 1928. Cover art by C. C. Senf. Via ISFDB.

The idea of impossible geometries as stand-ins for the limits of human understanding took on a far darker tone in the early 20th century, most notably through the eldritch creations of H. P. Lovecraft. Confronted with the challenge of describing that which, by its very definition, exists beyond human comprehension, Lovecraft turned to the language of non-Euclidean geometry. In stories such as “The Call of Cthulhu” (1928) and “The Dreams in the Witch House” (1933), architecture twists into impossible angles, ordinary rooms open onto other dimensions, and straight lines warp in ways that defy intuition. Geometry, usually one of the most concrete and visual branches of mathematics, crumbles before our eyes as we glimpse the true structure of the universe. (This author makes no claim that such metaphors were poignant, successful, or even coherent—only that an attempt was made.)

Black cover of WE with the image of four hands in different positions in white
E. P. Dutton 1959 English translation. Cover art by Seymour Chwast. Via ISFDB.

In addition to the unknowable, mathematics shows its versatility through its history as a metaphor for systems of control. One of the seminal examples is in We (1921) by Yevgeny Zamyatin, a foundational dystopian novel that would shape later classic 1984. Set in a glass-walled city where privacy is deemed irrational, We depicts a society in which citizens are named through algebraic identifiers (such as our protagonist, D-503) and state doctrine is framed as a series of axioms and proofs, elevating mathematical “perfection” as the highest civic virtue. Frequent maxims of the populace include such timeless classics as “We are perfect because we are mathematical,” and “The ideal state is a perfectly balanced equation.” 

Red and brown abstract art on the cover of Ficciones
Alianza Editorial’s 1997 edition including “La lotería en Babilonia.” Cover art by Hieronymus Bosch. Via ISFDB.

Though Zamyatin uses mathematics to symbolize an excess of order, mathematical metaphor in dystopian fiction isn’t confined to rigid equations. Enter Jorge Luis Borges. In his short story “The Lottery in Babylon” (1941), a society governed by pure probability becomes authoritarian not through order but through randomness—a system so arbitrary and impersonal it feels omnipotent.

Satire and Sincerity

Bright yellow cover of The Cyberiad with a mechanical contraption.
Seabury Press 1974 edition. Cover art by Daniel Mróz. Translated by Michael Kandel. Via ISFDB.

As mathematical dystopias evolved, authors increasingly questioned not just authoritarian order or arbitrary chance, but the very premise that logic could govern society. Stanisław Lem’s The Cyberiad (1965) blends the threads of satire and autocracy into a series of exuberant mathematical fables: machines that follow flawless rules but cause chaos, proofs that function as weapons, entire societies run on algorithmic decree. It’s satire aimed squarely at technocratic fantasies of control, designed to dismantle pretensions of perfect rationality masquerading as political wisdom.

Not all mathematical metaphors are dystopian or absurd. Many authors employ mathematical ideas—especially higher dimensions, topology, and infinity—as symbols of liberation, spiritual insight, or imaginative possibility. A classic example is Madeleine L’Engle’s A Wrinkle in Time (1962). Mrs. Whatsit’s demonstration of “folding” space offers both a physical explanation for hyperspace travel and an emotional metaphor: love, empathy, and moral courage allow one to bypass oppressive structures as easily as one might bypass distance in spacetime. Here, mathematics is transformed into the language of wonder.

Blue cover with white circles and human forms of A Wrinkle in Time
Farrar, Straus, and Cudahy’s first edition (1962). Cover art by Ellen Raskin. Via ISFDB.

Mathematics and Metaphor

Across these works, mathematics becomes more than a system of symbols or language of logic. It becomes a flexible metaphorical vocabulary capable of expressing fundamental aspects of the human experience—what speculative fiction is all about. Because mathematics is so deeply associated with truth, objectivity, and the structure of reality, bending or reinterpreting it in fiction allows authors to question what’s real at all. Whether it is Abbott opening doors to higher perception, Zamyatin warning about the dangers of perfect rationality, or L’Engle using geometry as a vehicle for hope, mathematics equips our fiction with a unique set of tools for exploring both the known and the unknowable. Mathematics is, after all, its own form of speculation.

Explore more articles from THE HISTORY FILES

Author photo of Sam MacdonaldSam Macdonald is a graduate student pursuing his PhD in mathematics in Lincoln, Nebraska. He has publications in speculative fiction magazines, mathematics journals, and humor websites, and hopes to one day write something strange enough to be publishable in all three. In his free time he enjoys rock climbing, strategic hammock placement, and the axiom of choice.

Spread the word!
Scroll to Top

New Report

Close