SINCE “Alice’s Adventures in Wonderland” was published, in 1865, scholars have noted how its characters are based on real people in the life of its author, Charles Dodgson, who wrote under the name Lewis Carroll. Alice is Alice Pleasance Liddell, the daughter of an Oxford dean; the Lory and Eaglet are Alice’s sisters Lorina and Edith; Dodgson himself, a stutterer, is the Dodo (“Do-Do-Dodgson”).

But Alice’s adventures with the Caterpillar, the Mad Hatter, the Cheshire Cat and so on have often been assumed to be based purely on wild imagination. Just fantastical tales for children — and, as such, ideal material for the fanciful movie director Tim Burton, whose “Alice in Wonderland” opened on Friday.

Yet Dodgson most likely had real models for the strange happenings in Wonderland, too. He was a tutor in mathematics at Christ Church, Oxford, and Alice’s search for a beautiful garden can be neatly interpreted as a mishmash of satire directed at the advances taking place in Dodgson’s field.

In the mid-19th century, mathematics was rapidly blossoming into what it is today: a finely honed language for describing the conceptual relations between things. Dodgson found the radical new math illogical and lacking in intellectual rigor. In “Alice,” he attacked some of the new ideas as nonsense — using a technique familiar from Euclid’s proofs, reductio ad absurdum, where the validity of an idea is tested by taking its premises to their logical extreme.

Early in the story, for instance, Alice’s exchange with the Caterpillar parodies the first purely symbolic system of algebra, proposed in the mid-19th century by Augustus De Morgan, a London math professor. De Morgan had proposed a more modern approach to algebra, which held that any procedure was valid as long as it followed an internal logic. This allowed for results like the square root of a negative number, which even De Morgan himself called “unintelligible” and “absurd” (because all numbers when squared give positive results).

The word “algebra,” De Morgan said in one of his footnotes, comes from an Arabic phrase he transliterated as “al jebr e al mokabala,” meaning restoration and reduction. He explained that even though algebra had been reduced to a seemingly absurd but logical set of operations, eventually some sort of meaning would be restored.

Such loose mathematical reasoning would have riled a punctilious logician like Dodgson. And so, the Caterpillar is sitting on a mushroom and smoking a hookah — suggesting that something has mushroomed up from nowhere, and is dulling the thoughts of its followers — and Alice is subjected to a monstrous form of “al jebr e al mokabala.” She first tries to “restore” herself to her original (larger) size, but ends up “reducing” so rapidly that her chin hits her foot.

Alice has slid down from a world governed by the logic of universal arithmetic to one where her size can vary from nine feet to three inches. She thinks this is the root of her problem: “Being so many different sizes in a day is very confusing.” No, it isn’t, replies the Caterpillar, who comes from the mad world of symbolic algebra. He advises Alice to “Keep your temper.”

In Dodgson’s day, intellectuals still understood “temper” to mean the proportions in which qualities were mixed — as in “tempered steel” — so the Caterpillar is telling Alice not to avoid getting angry but to stay in proportion, even if she can’t “keep the same size for 10 minutes together!” Proportion, rather than absolute length, was what mattered in Alice’s above-ground world of Euclidean geometry.

In an algebraic world, of course, this isn’t easy. Alice eats a bit of mushroom and her neck elongates like a serpent, annoying a nesting pigeon. Eventually, though, she finds a way to nibble herself down to nine inches, and enters a little house where she finds the Duchess, her baby, the Cook and the Cheshire Cat.

Chapter 6, “Pig and Pepper,” parodies the principle of continuity, a bizarre concept from projective geometry, which was introduced in the mid-19th century from France. This principle (now an important aspect of modern topology) involves the idea that one shape can bend and stretch into another, provided it retains the same basic properties — a circle is the same as an ellipse or a parabola (the curve of the Cheshire cat’s grin).

Taking the notion to its extreme, what works for a circle should also work for a baby. So, when Alice takes the Duchess’s baby outside, it turns into a pig. The Cheshire Cat says, “I thought it would.”

The Cheshire Cat provides the voice of traditional geometric logic — say where you want to go if you want to find out how to get there, he tells Alice after she’s let the pig run off into the wood. He points Alice toward the Mad Hatter and the March Hare. “Visit either you like,” he says, “they’re both mad.”

The Mad Hatter and the March Hare champion the mathematics of William Rowan Hamilton, one of the great innovators in Victorian algebra. Hamilton decided that manipulations of numbers like adding and subtracting should be thought of as steps in what he called “pure time.” This was a Kantian notion that had more to do with sequence than with real time, and it seems to have captivated Dodgson. In the title of Chapter 7, “A Mad Tea-Party,” we should read tea-party as t-party, with t being the mathematical symbol for time.

Dodgson has the Hatter, the Hare and the Dormouse stuck going round and round the tea table to reflect the way in which Hamilton used what he called quaternions — a number system based on four terms. In the 1860s, quaternions were hailed as the last great step in calculating motion. Even Dodgson may have considered them an ingenious tool for advanced mathematicians, though he would have thought them maddeningly confusing for the likes of Alice (and perhaps for many of his math students).

At the mad tea party, time is the absent fourth presence at the table. The Hatter tells Alice that he quarreled with Time last March, and now “he won’t do a thing I ask.” So the Hatter, the Hare and the Dormouse (the third “term”) are forced to rotate forever in a plane around the tea table.

When Alice leaves the tea partiers, they are trying to stuff the Dormouse into the teapot so they can exist as an independent pair of numbers — complex, still mad, but at least free to leave the party.

Alice will go on to meet the Queen of Hearts, a “blind and aimless Fury,” who probably represents an irrational number. (Her keenness to execute everyone comes from a ghastly pun on axes — the plural of axis on a graph.)

How do we know for sure that “Alice” was making fun of the new math? The author never explained the symbolism in his story. But Dodgson rarely wrote amusing nonsense for children: his best humor was directed at adults. In addition to the “Alice” stories, he produced two hilarious pamphlets for colleagues, both in the style of mathematical papers, ridiculing life at Oxford.

Without math, “Alice” might have been more like Dodgson’s later book, “Sylvie and Bruno” — a dull and sentimental fairy tale. Math gave “Alice” a darker side, and made it the kind of puzzle that could entertain people of every age, for centuries.

By MELANIE BAYLEY, Published: March 6, 2010, Oxford, England