a list compiled by Alex Kasman (College of Charleston)

Home All New Browse Search About

Simpsons (Episode: Homer3) (1995)
John Swarzwelder / Steve Tomkins / David S. Cohen
(click on names to see more mathematical fiction by the same author)

In this segment from an episode of "The Simpsons" cartoon, Homer finds a portal to the third dimension while trying to hide from his sisters-in-law. This is a joke on the fact that they are usually only 2-dimensional and a parody of many science fiction stories about people travelling to 4-dimensional universes (or 2-dimensional "flatlands".)

Floating around in the computer generated 3-dimensional space are lots of mathematical references and in-jokes. For instance:

  • The formula 178212 + 184112 = 192212, which is not true. (If it were, it would be a counter-example to Fermat's Last Theorem.)
  • The formula P=NP, which may or may not be true...if you can prove it one way or another you'd be famous! This is a question from an area of mathematics called combinatorics and also of great importance to computer scientists. Basically, if this statement is true then it means that a lot of questions people try to answer using computers will be able to be computed in a reasonable amount of time. If it is false (which it might as well be for now since we don't know how to do it anyway) then there is no way to answer these questions using a standard digital computer in a short enough time to make it useful.
  • The formula epi i=-1, which is most definitely true. It is a very sweet relationshp between three "strange" mathematical constants (the number e which is identified by the property d/dx(ex)=ex, the number i which is the square root of negative one and the number pi which is the ratio of a circle's circumference to its diameter).
  • There are several references to cosmology and general relativity. An inequality for the density of an open universe appears. More transparently, the surface on which he is standing is a two dimensional representation of a black hole as it is often drawn by scientists. Finally, Homer mentions that he should have "read that book by that wheelchair guy" (Stephen Hawking).
  • The three dimensional space is equipped with "coordinate axes" in the form of three poles labeled "x", "y" and "z".
  • The nerdy science guy explains that this should all be obvious to anyone with "a Ph.D. in hyperbolic topology". (I'm not sure this makes sense. I believe "hyperbolic" is a geometric term that has no topological meaning...but I'm not absolutely positive about this.)
  • In the credits, David S. Cohen's name appears under a radical (square root) sign.
Of course the best part of the episode isn't mathematical. In the end, Homer falls through the black hole and ends up in our world. A must see!

There is actually a lot of mathematics on the Simpsons. Check out the website at which is devoted to tracking these "in jokes". Note also that the Matt Groening science fiction cartoon Futurama also frequently includes mathematical references.

Contributed by anonymous

Ok, so the math is limited to in-jokes, but I bet this episode was the first time in Television History there was a reference to NP completeness in prime time. Etc. My mouth was literally agape.

A much more obscure mathematical gag in a Futurama episode featured "Witten's Dog". Nice to see some mathjokes in the media!

Contributed by Jose Brox

The funny point about the FLT "counterexample" that appears in this episode is that in fact it seems true if we do the calculations with a system with few precision digits, like a hand calculator.

This fact by itself (and its near-subliminal appearance, "see-it-if-you-are-fast-enough") makes the whole episode to be worth a 5

Contributed by Paige DeBenedittis

I took your Math in Fiction class Spring of 2005 and my mother still sends me emails whenever she sees a new book/movie/etc dealing with math in fiction. When I started your class and explained the idea to her, she paused and said, "I just read a book where this young girl saves everyone by knowing this special number. Do you know it?" I asked her what it was and she starting saying, " 1, 1, 2, 3..." And I picked up with "5, 8, 13..." She flipped out. Haha. But then I explained the Fibonacci sequence and she's been hooked ever since.

Anyways she saw this new book advertised and I checked your website and didn't see anything on it. I thought it was pretty cool so I wanted to send you an email about it: The Simpsons and Their Mathematical Secrets by Simon Singh.

More information about this work can be found at
(Note: This is just one work of mathematical fiction from the list. To see the entire list or to see more works of mathematical fiction, return to the Homepage.)

Works Similar to Simpsons (Episode: Homer3)
According to my `secret formula', the following works of mathematical fiction are similar to this one:
  1. The Simpsons: Girls Just Want to Have Sums by Matt Selman
  2. Futurama (TV Series) by David S. Cohen (David X. Cohen) / Ken Keeler / Jeff Westbrook
  3. Message Found in a Copy of Flatland by Rudy Rucker
  4. And He Built a Crooked House by Robert A. Heinlein
  5. Unreasonable Effectiveness by Alex Kasman
  6. The Girl with the Celestial Limb by Pauline Melville
  7. The Boy Who Reversed Himself by William Sleator
  8. 1963 by Alan Moore
  9. Spaceland by Rudy Rucker
  10. It was the Monster from the Fourth Dimension by Al Feldstein
Ratings for Simpsons (Episode: Homer3):
RatingsHave you seen/read this work of mathematical fiction? Then click here to enter your own votes on its mathematical content and literary quality or send me comments to post on this Webpage.
Mathematical Content:
2/5 (5 votes)
Literary Quality:
3.6/5 (5 votes)

GenreHumorous, Science Fiction, Children's Literature,
MediumTelevision Series or Episode,

Home All New Browse Search About

Your Help Needed: Some site visitors remember reading works of mathematical fiction that neither they nor I can identify. It is time to crowdsource this problem and ask for your help! You would help a neighbor find a missing pet...can't you also help a fellow site visitor find some missing works of mathematical fiction? Please take a look and let us know if you have seen these missing stories anywhere!.

(Maintained by Alex Kasman, College of Charleston)