Jean Little, “Algebraic Logic in Through the Looking Glass


This essay argues that Lewis Carroll’s Through the Looking Glass, which was published December 27, 1871, refers repeatedly to mathematics and logic in ways that, while certainly playful, reflect a careful thinking through of Boolean logic. Just as George Boole’s symbolic algebra relies on relational and oppositional binaries to create an internally coherent system, Through the Looking Glass experiments with binaries in their various forms, often using the numbers zero and one as placeholders for more complex ideas. This model of logic as a systematic grouping of concepts that could be represented numerically and visually would influence Carroll’s later work, culminating in Symbolic Logic (1896).

During the Victorian period, chess bore the reputation of being a game for the mathematically inclined,[1] so that by structuring Through the Looking Glass as a chess game Lewis Carroll provided, as it were, a mathematical frame for his dreamlike narrative of Jabberwocks and nursery-rhyme characters. In fact, the light-hearted and comedic style of Carroll’s book allowed him to reflect on some of the new and occasionally controversial mathematical concepts that arose during the second half of the nineteenth century while still engaging a popular audience. I will argue that it is through these reflections that Carroll developed ideas that would be foundational to his later work in symbolic logic, work that he began in the 1870s but that wouldn’t be published until 1896. Despite its whimsical quality, his earlier narrative does more than simply play with mathematical concepts; instead, it works through them in a way that would influence his thinking long-term.

Many scholars have taken an interest in the mathematical ideas that appear in Carroll’s later fictional work,[2] but few have looked for direct corollaries between his work in algebraic logic and Through the Looking Glass. Even when he gestures to logic, many assume that he is not doing so in an earnest mathematical way (Bayley, Braithewaite, Pycior, Throesch).[3] These scholars are reasonably suspicious of his motives, especially because Carroll’s wit does often take the form of satire or ridicule. However, the fundamental ideas of symbolic logic, especially its simplification of complex systems into binary oppositions, appear both explicitly and implicitly throughout the narrative. Indeed, Through the Looking Glass can be read as a playful foray into the world of symbolic logic, one that would bear fruit in Carroll’s later achievements in that ostensibly very different field. It is, then, fitting that he would later publish his work in symbolic logic under the pseudonym “Lewis Carroll” instead of Charles L. Dodgson,[4] even though it focuses on mathematical principles.

Carroll was certainly aware of developments in algebra and logic and had likely been thinking through the concepts of logic and the significance of binaries for many years before he published anything on the subject. In Lewis Carroll in Numberland, Robin Wilson traces the beginnings of Carroll’s work in logic to his “undergraduate days when he was required to sit a logic paper as part of his Classical examinations” (171). His interest in logic was also likely fueled by his background in symbolic algebra. While some have criticized Carroll as a conservative defender of Euclid and traditional mathematics, both Francine Abeles and Helena M. Pycior point out that Carroll was familiar with the work of many of his more progressive contemporaries, including, for example, that of mathematical reformer Augustus De Morgan, before he published the Alice stories. Abeles further notes that Carroll’s work in algebraical geometry[5] drew on the algebra of his time and played an important role in subsequent developments in linear algebra having to do with evaluating determinants of matrices (429).[6] His work would be valued for its application to linear algebra, an outgrowth of the new uses for algebra that were gaining momentum at the end of the nineteenth century.

It was George Boole who fully developed the implications of what was called “modern algebra” for the study of logic. In a series of books and articles published between 1847 and 1854, with which Carroll was certainly familiar,[7] Boole set out to develop a logical system that “express[es] logical propositions by symbols” (Mathematical Analysis of Logic 5), thereby constructing “the mathematics of the human intellect” (7). One of several eminent mathematicians who pioneered the field of symbolic logic,[8] Boole suggested that algebraic notation could stand in for abstract concepts. He also argued that the use of mathematical notation instead of descriptive language simplified certain aspects of Aristotelian logic, which treats of syllogistic reasoning in ordinary language (“Calculus of Logic”). For Boole, part of the appeal of algebraic notation was its elegance. It relied on symbols to represent complex ideas and enabled logicians to manipulate and represent information more clearly than if they were to write it out in English. He defended the use of mathematics in the study of logic by declaring that “the canonical forms of the Aristotelian syllogism are really symbolical; only the symbols are less perfect of their kind than those of mathematics” (Mathematical Analysis of Logic 11). Boole and his peers would have understood mathematics as a means of abstracting and simplifying information so as to reduce ambiguity and opportunities for error.

Translating the vernacular into mathematical language has the practical effect of highlighting the binary character of Boolean logic.[9] Boole’s logical system translates the quantifiers used in the Aristotelian syllogism, “all,” “no,” and “some” into the numbers 1 and 0. Boole’s notation uses the number 1 to represent “all,” or what he terms the Universe—the possible group from which individuals may be selected. Likewise, his notation uses 0 to represent groups with no members. This 0 set can also be called a null set or a null class. This is exemplified in an equation that Boole gives in The Mathematical Analysis of Logic (35) and demonstrates how a canonical syllogism would be written algebraically:

All Xs are Ys, x(1-y) = 0 or x = xy
No Zs are Ys, zy = 0 zy = 0
zx = 0
\No Zs are Xs

Even in their apparent simplicity, Boolean binaries afford a complex understanding of the relationships between sets because they use modified algebraic symbols to describe the relationships between objects and classes. As it appears in this equation, the real-world referent of x has no bearing on how x functions within the logical statement, an idea that Boole comments on when he questions “whether Language is to be regarded as an essential instrument of reasoning” (Laws of Thought 24). He goes on to argue that language is a “medium of expression” (24) rather than an essential instrument, thereby defending his algebraic model, which emphasizes the relationality between members of sets over capturing the unique texture of the individual members.

In using 1 and 0 as numeric expressions for its basic binary set, algebraic logic draws attention to the way that binaries derive meaning from their oppositional relationship to one another. Boole addresses this when he explains the law of duality in his magnum opus, The Laws of Thought. In his law of duality, the solution of a given equation remains the same if all dual pairs are interchanged. In Boolean notation, if we change every instance of 1 to 0, and every instance of 0 to 1, and we reverse the operations (+ ⋅), then we have a dual result. In the language of logic, the dual statement of a true proposition would be true as well, and the two together form a whole (of sorts). Boole demonstrates this concept with the equation x(1 – x) = 0, asking us to imagine that “x(1 – x) will represent the class whose members are at once ‘men,’ and ‘not men,’ and the equation thus expresses the principle, that a class whose members are at the same time men and not men does not exist” (49). Because any class of objects suggests the idea of its contrary class, “the whole Universe is made up of these two classes together” (48). In this system, the figures are valued not for their correspondence to material objects but for their identity as placeholders; their purpose is to illustrate the relationship between terms. The law of duality emphasizes relationality within a closed system, which Boole describes as a fundamental harmony or unity that exists as the “product of opposite states of tension” (413). Algebraic logic recognizes relational and oppositional binarism as inherent both to the structures of nature and to the logical structure of thought. Nowhere is this relational function more apparent than in the use of zero as a placeholder—originally to mark an empty space or empty column on an abacus (Seif 15). In our decimal system, zero is used to indicate whether we are to understand a given numeral as indicating the number of ones, tens, hundreds, or so forth we are dealing with. Nothing in itself, it defines the significance of the numbers to its left.

If we now turn to Through the Looking Glass, we will see that this binary logic, and its fundamentally relational character, structure both its world and the interactions of the creatures that live there. The impulse to question the interchangeability of pairs appears repeatedly in Through the Looking Glass, including in its very frame. Not only does the book introduce the idea of binaries in the initial scene with the black kitten and the white kitten, but because Alice begins in the “real” world and steps through the mirror, the reader is primed to approach the looking glass world comparatively—always with an awareness of the other side of the mirror. At the same time, scholars have often noticed that while some elements of the looking-glass world present an amplification or reversal of the real world, others do not. For example, Ronald Reichertz points out that “the retention of the rules of the game of Chess is the major break with the physical reversal in Through the Looking Glass” (26). While the contrasting chess pieces suggest binarism, the game itself follows a complex set of rules. Within the Looking Glass world, pairs frequently draw attention to illogical aspects of the external ordinary world. For example, the “rocking-horse fly” (205), as compared to a horsefly, humorously reminds Alice that real-world names and words relate to material objects only arbitrarily. Likewise, scholars have often evaluated Carroll’s mirrored pairs in terms of how they critique Victorian culture and economic conditions, power structures, and education, among other things. The mirror frame of the story not only puts pressure on these pairs as representations of cultural norms and values, but also allows for the assessment of symbolic logic as a system. Recurrent pairs are one way to investigate whether a binary-based system is robust enough to contain the intricacy and subtlety of a Universe (to use the Boolean term) with complex rules.[10]

Significantly, Alice herself makes the first obvious comparison between the real and Looking Glass worlds, a move which makes the dualism of Alice in Wonderland far more explicit and sets the tone for further exploration into a world made up of inversions.[11] In the initial scene, she imagines putting the black kitten through the mirror and muses that “perhaps Looking-glass milk isn’t good to drink” (167). Some scholars have taken an interest in the binary nature of looking glass milk and noted that lactose is a stereoisomer, which means that it comes in a mirrored pair of molecules; more fundamentally, such mirror-image pairs are predicated on a relational conception of identity.[12] Carroll’s interest in mathematical doubles reflects the kind of logic that appears in Boole’s law of duality.[13] As previously mentioned, Boole’s work specifies that 0 and 1 as signs do “not depend in any way on [their] particular form or expression” (Laws of Thought 25) but only become meaningful with relation to each other and as part of a closed system. Likewise, the other side of the mirror is both implied by and made nonsensical because of its relationship of inversion to this side of the mirror.

This relational or binary logic recurs throughout the text, and proliferates within the Looking Glass world itself: thus, for instance, Carroll specifies a difference between white and red pieces and contrasts the queens’ ability to move quickly through several spaces with the kings’ plodding along one space at a time. Nowhere is the book’s binary logic more fully on display than in the scene with Humpty Dumpty and those that immediately precede and follow it. Prior to meeting the well-known fairy-tale character, Alice finds herself in a little shop run by a sheep. After Alice requests an egg, the sheep tells her that it would be less expensive to buy two, and that the price is contingent on her eating both eggs. Not wanting to eat both, Alice pays for the single egg and begins moving toward its shelf, but as she walks toward the egg, the shelf seems to get farther and farther away. Alice’s attempt to separate the pair of eggs proves strangely difficult, in terms of both time and money.

Following the elusive egg, Alice comes upon Humpty Dumpty, almost as if he stands in for the other egg in the pair. Humpty is initially described as keeping “balance . . . [with] his eyes steadily fixed in the opposite direction” (Carroll 244). Although he is supposedly solitary, there remains the implication of the missing egg, seen here in the words “balance” and “opposite,” both of which suggest the idea of a set of two. The fact that Humpty’s gaze is directed to the side also suggests the relational position of a zero as a placeholder in a numbering system, as a number that, while signifying “nothing,” can nevertheless change the value of other digits. In base 10, for example, when zero sits to the right of any other numeral 1-9, it pushes that number into the next value position, designating it as a multiple of 10. The place value configuration allows us to form any number using a combination of only ten unique figures (including zero) and allows two or more numbers to be stacked vertically for basic arithmetic. Zero serves as a placeholder in another sense as well. On the number line it functions as a conceptual partition, separating positive from negative numbers—another set of opposites. Unlike rational numbers (1, 2, 3, etc.), which are thought of as having material correspondents in the world of experience, zero indicates an absence or a void, so it must always be understood relationally. Robert Kaplan describes this as a “pure holding apart” (194), or serving as a placeholder between concepts. Humpty’s role as a placeholder is suggested yet again when Alice recites the nursery rhyme that tells of his fall. She changes the last line, saying, “Couldn’t put Humpty Dumpty in his place again” (246) instead of “couldn’t put Humpty together again.” While she recognizes her mistake, she doesn’t correct it. Humpty’s location within the system is more important than his individual composition.

As if to highlight the importance of place value, Humpty later insists that Alice work out the problem 365-1 in its vertical arrangement, lining up the 1 with the 5. The subtraction problem also draws attention to the practical way that numbers can represent aspects of lived experience. Alice uses numerals to calculate parcels of time which, like the numbers themselves, stand in as a concrete way to express the intangible. When Humpty examines the memorandum-book, pronouncing that the problem “seems to be done right” (250), readers are meant to laugh at his arithmetic incompetence; at the same time his comment underscores the elusive nature of a calculation that operates over multiple levels of abstraction. This is particularly important when taking into account that Boole’s symbolic algebra also uses numbers as representatives of larger concepts. This subtraction problem takes place within a discussion about the relative worth of birthday versus un-birthday presents, in which Humpty points out that there are far more un-birthdays than birthdays in a year. As he reminds Alice that the class of birthdays is defined against the class of un-birthdays, he uses the language of opposition (un-) to suggest a similarity between the two. If he can receive a gift any day of the year, then what distinguishes a birthday from any other day? For Humpty, the un-birthdays—what Alice might classify as zeros—are the same as the one birthday. In Alice’s experiential understanding of birthdays, this is not the case; nevertheless, the possibility of gift-giving throughout the year creates a resemblance between the two sets of days. This episode highlights both the relational nature of logical pairs and the fact that meaning doesn’t inhere in the object (or day) itself, but in its relation to its opposite(s).

If in one moment, the text celebrates the ability of Boolean binaries to parse the world of phenomena, in another, it points out some of the challenges of using them effectively. When Alice initially walks toward Humpty Dumpty she thinks that “he must be a stuffed figure” (244), suggesting both that he is a toy (not real) and that he is a mathematical figure. When they begin conversing, Alice asks him “why do you sit out here all alone?” even though within the context of the nursery rhyme (which she has just recited) we might expect her simply to accept the fact that he is sitting alone—she has certainly run into many other characters who were alone and hasn’t mentioned anything about it to them. By drawing attention to his solitary status, Alice’s statement seems to imply an awareness of the “absent” figures to which Humpty should somehow be attached—the figures toward which he gazes in the “opposite direction,” or the egg that she didn’t purchase in the shop. In contrast, Humpty wants to claim for himself some inherent meaning or value. He states specifically that his name describes his shape—which resembles, notably, the number zero. Yet, as the text points out several times, names in English usually aren’t causally connected to their object. What’s more, the unique nature of the number zero depends always on a relationship with its surrounding context. As an example of how a binary system might enable the kind of coherence that Boole’s work promulgates, Humpty’s stubborn resistance to his context allows Carroll to explore the tension within a dualism.

Humpty’s repeated insistence on his individuality plays upon the 0-1 binary while contending for a more expansive definition for zero. As he introduces himself, Humpty says “I’m one that has spoken to a King” (246), a mathematical joke: a zero claiming to be one. As a further visual joke, we might note that the number “1” is also a homoglyph with the personal pronoun “I,” as is the number “0” with the letter “o” that begins the word “one” in this sentence. Partnered with the grammatical choice to refer to himself as “that” instead of “who,” this sounds suspiciously like Humpty is part of a logical set,[14] some members of which have spoken to a King. His references to the number one continue throughout the chapter, concluding finally when he offers Alice a single finger to shake as he says goodbye. The poem Humpty recites immediately preceding this abrupt farewell likewise stresses the personal pronoun “I” through repetition, one of several elements that speak to the binary nature of one and zero. Again, Humpty Dumpty as the speaker of the poem is one, an “I” that seems to stand on his own. The poem is composed of a series of rhymed couplets, and each couplet is end-stopped, as if to emphasize the unity within each pair; nevertheless, the couplet structure highlights doubleness rather than singularity. The poem begins by referencing a whole year—winter, spring, summer, and autumn. The initial sense of completion conveyed by these formal conventions is contrasted by content that dramatizes fragmentation. Both the fish and the messenger deny the speaker’s requests by using unfinished sentences that end in a dash: “We cannot do it, Sir, because—’” (256) and “He said ‘I’d go and wake them, if—’” (257). In the image that accompanies the poem, Humpty shouts at the messenger, who in his stiff and proud posture quite resembles the number  one, as if our zero—with all his struggling and reaching—never makes a meaningful connection with the other figure in the pair to which he belongs.

Once his requests for someone to awaken the fish have been repudiated, Humpty decides to do it himself: “And when I found the door was shut, / I tried to turn the handle, but—” (257). Thus, the poem ends without resolution, without establishing Humpty as one with the weight to make things happen, and without allowing him to reach the missing figure in his set. In this poem, the interplay between completeness and fragmentation highlights the arbitrariness and limits of a binary system, which only produces meaning relationally.

In claiming to be a one and drawing attention to the number one with near obsessive constancy, Humpty responds to the philosophical problems of zero as a concept, or what it means to give a name and a physical symbol to absence or the negation of meaning. Although zero’s placeholder function is an important concept in mathematics, it can also function like a vacuum, rendering other numbers meaningless, as for instance in the division of any number by zero. In this case, the power of zero finds itself at odds with that of other numbers. This might account for some of Humpty’s antagonism when he responds to Alice’s assertion that “one ca’n’t help growing older” (249). In his grim retort, Humpty draws attention to the possibility of a one becoming zero or void. He responds by telling Alice that “one ca’n’t, perhaps…but two can. With proper assistance, you might have left off at [age] seven” (249). Ironically, the introduction of doubleness into the world of singularity makes nothingness possible.

While he doesn’t seem to have a problem with the dissolution of Alice, Humpty is much more troubled by the thought of his own. If, as Humpty says, his “name means the shape [he is]” (“Looking Glass” 246), then both his name and his physical presence signify absence or Kaplan’s “the nothing that is.” To dramatize further the unthinkability of nothingness, when Humpty begins to tell Alice what would happen if he were to fall, he says, “Why, if I ever did fall off—which there’s no chance of—but if I did—[. . .] If I did fall [. . .] the King has promised me [. . .] The King has promised me—with his very own mouth—to—to—” (247). Throughout the entire paragraph, he pauses and sputters, ultimately never finishing his sentence because Alice finally interrupts and says it for him. Coming from a character who typically speaks so quickly and so certainly, the sudden inability to finish this idea certainly suggests his intense anxiety about the possibility of falling. Humpty struggles with the impossibility of “embodying” both the whole Humpty Dumpty that Alice sees and the broken one that exists in her rhyme.

We could also understand this as a conundrum that can be captured in the language of logic—one that encapsulates the kind of relationality emphasized in the law of duality. In considering the problem of assigning Humpty Dumpty to a set of either fallen or whole eggs, given his role both in Carroll’s story and in the nursery rhyme, it may be helpful to consider the null set. In logical terms, the null set (xy0) would include the group of eggs that are both whole and fallen, an empty set because of its impossibility. When writing Symbolic Logic Carroll would continue to ruminate on the null set; in his thoughtful approach to the “Universe of Discourse” (176), he points out that it is as important to include a representation of the null set in his diagram as it is to include sets that have members. This is one way of giving a name to a negation or a body to a zero. Just as Humpty Dumpty’s identity oscillates between zero and one, between broken and whole, his physical and verbal presentation mimics an inherent anxiety about the relationship between the conceptual, the visual, and the material.

Depictions of the null set also bring to light a Carrollian addition to Boole’s law of duality. Not only does the Universe include the classes of those that exhibit and fail to exhibit a given characteristic, but it also includes the empty class of those that both do and don’t exhibit that characteristic. In practice, this class is empty because it is impossible, but the class still exists conceptually within the imagination. Often, a representation of the null class seems absurd or nonsensical, a sentiment embedded in the term reductio ad absurdam (or argumentum ad absurdam). This “reduction to absurdity” comes from early Greek philosophers and mathematicians, including Aristotle, and describes the task of the practitioner of logic, which is to test a statement for validity. According to this rule, if a statement is taken to its logical conclusion and that conclusion is absurd (or impossible), then the logician can conclude that the statement is not valid. Using logic as a method for thinking through the complexities of the null set is yet another way Carroll explores the extent to which definitions are relational and recognizing the “nothing that is,” which poses a semantic and ontological conundrum. These issues resurface when Alice leaves Humpty Dumpty and finds the White King waiting for a messenger. She tells him she sees “nobody on the road” (262). When the messenger arrives, he announces that he has passed “nobody” on the road, to which the King replies, “this young lady saw him too. So of course Nobody walks slower than you.” (264). Feeling somewhat offended, the messenger defends himself, saying, “I’m sure nobody walks much faster than I do!” (264), and the King is justifiably confused because Nobody (if he existed) couldn’t walk simultaneously faster and slower than the messenger. In addition to being yet another example of an embodied zero, or a null set, this “Nobody” reminds us that all meaning occurs within a relational system, whether it is linguistic or numerical. Likewise, nonsense must push against a certain set of defined norms or values before it can be identified as lacking reason. This playful thinking allowed Carroll to work through some of the implications of Boolean logic long before publishing his more serious work on the subject.

When negation is understood as a relational and not an essential state, its meaning necessarily changes. The instability of negation provides a productive context with which to read the seemingly nonsensical nature of the questions that the red and white queens ask Alice before she can finally receive her crown. Helena Pycior views this series of mathematical questions as a way to mock the newer algebra and its use of negative numbers (164). The math and logic questions certainly enhance the comedic effect of the scene and play with symbolic algebra, yet in their imaginativeness they also engage with the concept of zero and its role in a logical system. One of the Red Queen’s final queries is a subtraction word problem: “Take a bone from a dog: what remains?” (297). Having heard the queens walk through their logic for the previous questions, Alice has begun to realize that the answers to their questions aren’t only about the relationship between numbers, but also about the relationship between concepts. Her answer seems like a series of syllogistic if-then statements, which is a form that Boole discusses extensively in The Laws of Thought. Written out, Alice’s logic would look something like this: If I took a bone from the dog, he would come to bite me; if he came to bite me, I would run away; and the resulting conclusion is that nothing would remain. However, the Red Queen points out that Alice has skipped one link in the chain of events, suggesting that the dog’s temper would remain (because she has taken his bone). The fact that the two possible answers to this problem are 0 (nothing remains) and 1 (his temper remains), returns us again to Boole, and to the fact that the answer to his logical equations is always either 0 or 1. In Laws of Thought Boole explains that “the class represented by 1 must be ‘the Universe,’ since this is the only class in which are found all the individuals that exist in any class. Hence the respective interpretations of the symbols 0 and 1 in the system of Logic are Nothing and Universe” (48). In other sections of Laws of Thought, Boole describes 1 as certainty, unity, or representing the possibility of existence.[15]  The resemblance between the riddle of the bone and the line in which Humpty Dumpty claims to be one suggests the relevance of “the possibility of existence” to the construction of the book as a whole. The Red Queen’s insistence that the answer to her logical problem must be one instead of zero suggests that the Queens are trying desperately, if not successfully, to use math and logic to validate their place within the realm of the possible.

In order to conjure this realm of the possible, Victorian mathematicians and logicians typically look for internal coherence, the modern standard for evaluating logical rigor, and which Carroll links to world-building of all kinds, including fictional world-building. Despite his occasional resistance to his role as a placeholder, we find in Humpty Dumpty a character who relies on the usefulness of a relational system when he claims that he has power to imbue a word with any meaning of his choosing. After Alice questions whether someone “can make words mean so many different things” (251), he goes on to illustrate the value of such a system by giving meanings to some of the terms in “Jabberwock”:

‘Twas brillig, and the slithy toves
Did gyr and gimble in the wabe:
All mimsy were the borogoves,
And the mome raths outgrabe.

Humpty explains that “‘toves’ are something like badgers… they make their nests under sun-dials. … To ‘gyre’ is to go round and round like a gyroscope. To ‘gimble’ is to make holes like a gimblet” (253). We know that his system functions consistently because Alice is able to pick up on it, defining “wabe” (“the grass-plot round a sun-dial”) in the context of what she has already heard (253). Because, in this game of logic, the universal entities are coherent within the system (although they may seem like nonsense outside of the system), they successfully demonstrate the potential use of arbitrary symbols as placeholders for meaning.

The idea of a relational system is most clearly dramatized in the chess game that structures both the setting and the plot trajectory of the book. Each piece in chess, for example, has a set of possible moves that it can make. However, if a certain piece is missing—the rook perhaps—a player could easily substitute another object—a coin or a Lego or a lipstick tube—and play could go on as usual. It isn’t the shape of the rook that provides meaning; it is its place within the system. Chess is mastered by learning the rules of the system and using them skillfully. In a given game, even though each piece has certain limitations on the type of moves it can make, the system as a whole facilitates creativity and analytical reasoning by providing a structure within which to work. Boole describes his mathematical system of symbols as “a step towards a philosophical language” (“Mathematical Analysis” 4) that allows for the precise description of a given class. By emphasizing the coherence of a general system applicable to particular circumstances, Boole and Carroll rely on a system that is always defined relationally. As Andrea Henderson argues, Carroll, like Boole, locates in this formal coherence “a new site of value,” one that replaces traditional symbolic referentiality (81).

The internally relational system is also an important feature of the scene in the sheep’s shop; this scene speaks, moreover, to a feature of Carrollian logical play that will ultimately set him apart from his fellow logicians. As she tries to decide what to buy, Alice finds that “whenever she look[s] hard at any shelf, to make out exactly what it [has] on it, that particular shelf [is] always quite empty, though the others round it [are] crowded as full as they [can] hold” (237-38). The sheep compares Alice to a teetotem, which was a square-shaped spinning top used in gambling games during the eighteenth and early nineteenth century. By the end of the nineteenth  century, teetotums were beginning to be used in children’s games. The four-sided top indicated that the player should take all, none, some, or add something to the pot, depending on which side landed face-up. In making this comparison, the sheep is clearly mocking Alice’s variability; yet the teetotem presents, like the binary system, a simplification of options. Alice perceives the products in the shop as limitless, and indeed the sheep says that there is “plenty of choice” (242), but in practice there are only four discreet movements she can make. What’s more, because the shelf in front of her is perpetually vacant, Alice’s predicament becomes a visual representation of the opposition of the Universe and the null set. Given the abstract character of these options, it’s not surprising that she never can grasp the objects that are ostensibly for sale. Carroll’s response to such abstraction is to seek for visual and not just symbolic or algebraic renderings of logical problems—to give Alice something she can actually see.

In fact, the kind of visual thinking that appears in the teetotum scene and other places in Through the Looking Glass may have led Carroll ultimately to develop a diagrammatic rather than an algebraic symbolism. Even his language—the metaphors or sayings taken literally, for example—seems centered around images; his chessboard framework and investment in Tenniel’s illustrations make this visual impulse even more obvious. As a book that contains some of his earliest considerations of formal logic, its representational quality—its embodied rather than algebraic representation of concepts—seems to gesture towards the visual diagramming method that will play a prominent role in Symbolic Logic, where Carroll outlines a new method for diagraming that resembles Venn’s circles, but uses a system of squares (see figures 2 and 3).

Figure 2: Carroll’s Method of Diagrams

Figure 3: Carroll’s two set diagram with more detail

He points out that his method also differs from Venn’s because it assigns “a closed area to the Universe of Discourse, so that the Class which, under Mr. Venn’s liberal sway, has been ranging at will through Infinite Space, is suddenly dismayed to find itself ‘cabin’d, cribb’d, confined’, in a limited Cell like any other Class!” (Symbolic Logic 244). By including the class that describes the negation of both variables (not x and not y) in a confined space on his diagram, Carroll emphasizes that the two sets x and y exist within an arrangement of assigned meanings, and that the negation of both variables could be significant within the context of the problem. Also, because the variables defined by negation are now “in a limited cell just like any other class,” each set of options is given equal value within this diagramming system. Formal logic as a discipline doesn’t make moral judgments, classifying a particular argument as either good or evil; instead, it evaluates the argument as either valid or invalid. Because each cell on Carroll’s diagram is given equal visual emphasis, it visibly preserves the unbiased approach of mathematical logic. Just as important, this specificity amounts to a largely graphic improvement—Carroll does not claim, after all, that Venn’s system leads to logical confusion.

While the mathematical references and scenes in Through the Looking Glass have sometimes been read as mocking the nonsensical or absurd implications of the new experimental algebra, their internal consistency and the degree to which they correspond with Boole’s work suggests that they are more likely to be honest, if playful, workings through of some of the new ideas. In Boole’s description of the new algebra, he argues that “there is not only a close analogy between the operations of the mind in general reasoning and its operations in the particular science of Algebra, but there is to a considerable extent an exact agreement in the laws by which the two classes of operations are conducted” (6). Like Boole, whose symbolic algebra intentionally mirrors human thought in symbolic form, Carroll uses nonsense and hyper-logic to dramatize the mind’s ability to understand these forms and work productively within and against them. He carefully constructs scenes that demonstrate the possibility of using figures as placeholders in meaningful and challenging ways. He also incorporates both complementary and oppositional binaries which both highlight and deconstruct the systems of meaning that are already in common use. By creating a set of symbols whose meaning is defined relationally, as in Humpty Dumpty’s interpretation of the Jabberwocky poem, he seems to be experimenting with them so as to demonstrate their usefulness. Having navigated the implications of binary logic so skillfully through language, it isn’t surprising that he publishes similar logical problems in pamphlets and books over the several years leading up to Symbolic Logic. Some of these problems appear in Carroll’s A Tangled Tale, which was a collection of puzzles and stories published serially between 1880 and 1885, and The Game of Logic (1886), which included a board game. Far from being a nonsense world, the Looking Glass world is arguably a fictional rendering of modern logic.

published November 2019

Jean Little is a PhD student at the University of California Irvine who specializes in Victorian literature, history of mathematics and science, economics and literature, aestheticism, poetic form, and theory of the novel. She holds an MA in English from Brigham Young University.


Little, Jean. “Algebraic Logic in Through the Looking Glass.” BRANCH: Britain, Representation and Nineteenth-Century History. Ed. Dino Franco Felluga. Extension of Romanticism and Victorianism on the Net. Web. [Here, add your last date of access to BRANCH].


Abeles, Francine. “Dodgson Condensation: The Historical and Mathematical Development of an Experimental Method.” Linear Algebra and its Applications, vol. 429, no. 2-3, July 2008, pp. 429-38.

———. “Lewis Carroll’s Formal Logic.” History and Philosophy of Logic, vol. 26, February 2005, pp. 33-46.

Bartley, William Warren. Introduction. Symbolic Logic by Lewis Carroll, 1896, Clarkson N. Potter, Inc., 1977, pp. 3-38.

Bayley, Melanie. “Alice’s Adventures in Algebra: Wonderland Solved.” 16 December 2009, New Scientist,

Boole, George. “The Calculus of Logic,” Cambridge and Dublin Mathematical Journal, vol.3, 1848, pp. 183-98.

———. The Mathematical Analysis of Logic, Being an Essay Towards a Calculus of Deductive Reasoning. Cambridge UP, 1847.

———. The Laws of Thought. Prometheus Books, 2003.

Braithewaite, R. B. “Lewis Carroll as Logician.” The Mathematical Gazette, vol. 16, no. 219, July 1932, pp. 174-78.

Carroll, Lewis. “Alice in Wonderland.” The Annotated Alice: 150th Anniversary Deluxe Edition by Lewis Carroll, edited by Martin Gardener and Bark Burstein, Norton, 2015, pp. 1-149.

———. Symbolic Logic: Together with Letters from Lewis Carroll to Eminent Nineteenth-century Logicians and to his Logical Sister, and Eight Versions of the Barber-Shop Paradox, edited by William Warren Bartley, III, Clarkson N. Potter, Inc., 1977.

———. “Through the Looking Glass.” The Annotated Alice: 150th Anniversary Deluxe Edition by Lewis Carroll, edited by Martin Gardener and Bark Burstein, Norton, 2015, pp. 151-320.

Cohen, Daniel. Equations from God: Pure Mathematics and Victorian Faith. Johns Hopkins UP, 2007.

Dodgson, Charles L. An Elementary Treatise on Determinants with Their Applications to Simultaneous Linear Equations and Algebraical Geometry. Macmillan, 1857.

Gardner, Martin. “Through the Looking Glass.” The Annotated Alice: 150th Anniversary Deluxe Edition by Lewis Carroll, edited by Martin Gardener and Bark Burstein, Norton, 2015, pp. 151-320.

Kaplan, Robert. The Nothing That Is: A Natural History of Zero. Oxford UP, 1999.

Moktefi, Amirouche. “Did Lewis Carroll Own a Copy of George Boole’s Laws of Thought?An Argument From the Sale Catalogues.” BSHM Bulletin: Journal of the British Society for the History of Mathematics, vol. 33, no. 1, 2018, pp. 21-28.

Moretti, Alessio. “Was Lewis Carroll an Amazing Oppositional Geometer?” History and Philosophy of Logic, vol. 35, no. 4, 2014, pp. 383–409.

O’Leary, Joanna Shawn Bridgid. “Where ‘Things Go the Other Way’: The Stereochemistry of Lewis Carroll’s Looking-Glass World.” Victorian Network, vol. 2, no. 1, Summer 2010, pp. 70-87.

Pycior, Helena M. “At the Intersection of Mathematics and Humor: Lewis Carroll’s Alices and Symbolical Algebra.” Victorian Studies, vol. 28, no. 1, Fall 1984, pp. 149-70.

Reichertz, Ronald. “Alice Through the ‘Looking Glass Book’: Carroll’s Use of Children’s Literature as a Ground for Reversal in Through the Looking Glass and What Alice Found There.” Children’s Literature Association Quarterly, vol. 17, no. 3, Fall 1992, pp. 23-7.

Seif, Charles. Zero: The Biography of a Dangerous Idea. Penguin, 2000.

Staunton, Howard. “The Chess-Player’s Handbook.” The Quarterly Review, lxxxv, June 1849, pp. 82-103.

Throesch, Elizabeth. “Nonsense in the Fourth Dimension of Literature: Hyperspace Philosophy, the “New” Mathematics, and the Alice Books.” Alice Beyond Wonderland: Essays for the Twenty-first Century, edited by Cristopher Hollingsworth, U of Iowa P, 2009, pp. 37-52.

Wilson, Robin. Lewis Carroll in Numberland: His Fantastical Mathematical Logical Life. Allen Lane, 2008.


[1] In fact, the July-September 1848 edition of The Quarterly Review published an article praising chess as such and suggests that “to shine at it requires uncommon readiness and accuracy of calculation” (89).

[2] In her  article, Alessio Moretti states that “in some sense it seems plausible that Carroll might have somehow looked for a ‘logic of mirrors’ and, thereby felt something of the possibility of putting into space, using symmetries, the Aristotelian oppositions holding between possible logical predications” (407), but he doesn’t explore this possibility any further.

[3] In 1932, R. B. Braithwaite commented that Carroll had “an admirable logic which he was unable to bring to full consciousness” (176), but that he had nevertheless created an enchanting children’s story through his logic. More recently both Helena Pycior and Melanie Bayley have argued that Carroll’s humor intentionally ridicules symbolical algebra. Elizabeth Throesch has also posited an “anxiety” in Carroll’s work because of the “dissolution between symbols and meaning” (39).

[4] In his introduction to the 1977 publication of Symbolic Logic, which includes the previously unpublished part II of Carroll’s original book, William Bartley suggests that Carroll’s motivation for publishing it under the pseudonym had to do with privacy and money. He says that “of his works that could be considered mathematical in character, The Game of Logic (1886) and Symbolic Logic were the only ones popularly addressed, and their author obviously stood a much better chance to win popular attention . . . by publishing them under his famous pseudonym” (5-6), a perspective that is corroborated by Daniel Cohen, who says that Carroll “yearned to be a popularizer of mathematics” (172). It is also likely that Carroll didn’t want to have his work on logic conflated with his scholarly work because of his position as a professor at map iconOxford, a school which was associated with a more conservative mathematical approach than that of map iconCambridge, where many well-known proponents of more experimental methods resided.

[5] In 1867, Carroll published An Elementary Treatise on Determinants with Their Application to Simultaneous Linear Equations and Algebraical Geometry under his given name, Charles Dodgson. This book draws on and contributes to some of the more progressive mathematical approaches of his time.

[6] By simplifying the way to condense a square matrix—an array of numbers arranged in an equal number of rows and columns—into a single number (the determinant), Carroll showed his interest in understanding the relationship between large systems and a single output capable of transmitting complex ideas. This was both forward-looking from a mathematical standpoint, and conceptually related to the work he would do with binaries and numerical symbols in the Alice stories.

[7] In an titled “Did Lewis Carroll own a copy of George Boole’s Laws of Thought? An Argument from the Sale Catalogues,” Amirouche Moktefi determines that by the time Carroll died (1898), he owned most of the major books on logic and that Laws of Thought was likely among them. Even if Carroll didn’t have it in his personal collection, Moktefi reminds us that Warren Weaver’s The Mathematical Manuscripts of Charles Ludwig Dodgson (Lewis Carroll) in the Morris L. Parrish Collection includes work dated May 1867 that draws extensively from Boole.

[8] Among these were Augustus De Morgan, William Stanley Jevons, and John Venn. Later, Bertrand Russell, and Alfred North Whitehead would build on their work.

[9] Incidentally, this binary feature of Boolean algebra would be crucial to its role in the development of computational machines.

[10] In The Mathematical Analysis of Logic, Boole celebrated his symbolic system, comparing it to Geometry in its reliance on axiomatic truths. According to Boole, symbolic logic as a discipline “inquires into the origin and nature of its own principles” (13) both because of its correspondence to mathematical symbols and its relationship with the world of experience.

[11] Although my paper is concerned specifically with binaries and symbolic logic in Through the Looking Glass, Carroll’s play with inversions and pairs certainly began earlier, both in his fiction and in his mathematical work. In Alice in Wonderland, for example, food and drink causes Alice to grow and shrink. In the midst of the confusion about her size, the text mentions that “this curious child was very fond of pretending to be two people” (21). This drama of opposites not only explores the relationship between binaries, both in language and experience, but also explores certain logical fallacies inherent in ordinary language. For example, a parent may suggest to a child that eating their dinner will help them grow big and strong, but in Wonderland the relationship between food and Alice’s size is dramatic, immediate, and even measurable. In demonstrating the capacious character of language, these episodes may also gesture towards crossovers in the ways that language and number are able to hold or create meaning.

[12] In Annotated Alice, Martin Gardner includes a note about stereoisomers and their mirror-like traits. In herarticle, Joanna O’Leary speculates that Carroll may have had some knowledge of this phenomenon because the history of its discovery “runs parallel to Carroll’s lifetime” ( 74), and finds several examples in the Alice stories of doubles that are, like stereoisomers, “designed to be inseparable” (83).

[13] In addition to having books in his library by Boole, De Morgan, Jevons, Keynes, Venn, and others, Carroll quotes these well-known logicians in Symbolic Logic. Given that Carroll begun working on Symbolic Logic in the 1870s, it is likely that he knew of or had read some of their work before publishing Through the Looking Glass.

[14] Although Boole and Carroll may not have intentionally used set theory terminology (which was coined in an 1874 paper entitled “On a Property of the Collection of Real Algebraic Numbers” by Georg Cantor), the ideas are certainly present in their work.

[15] It is important to remember that since the Universe includes all members of a class that have a certain quality and those that do not have it, these two possibilities are described as x and x – 1 respectively. On the other hand, it is not possible that a being would possess and not possess a given quality at the same time, in which case Boole uses the equation x(1 – x) = 0. In Laws of Thought, Boole states that “We are at once led to recognize unity (1) as the proper numerical measure of certainty. For it is certain that any event x or its contrary 1 – x will occur. The expression of this proposition is x + (1- x) = 1” (Boole 273).