A mathematical joke is a form of humor which relies on aspects of mathematics or a stereotype of mathematicians. The humor may come from a pun, or from a double meaning of a mathematical term, or from a lay person's misunderstanding of a mathematical concept. Mathematician and author John Allen Paulos in his book Mathematics and Humor described several ways that mathematics, generally considered a dry, formal activity, overlaps with humor, a loose, irreverent activity: both are forms of "intellectual play"; both have "logic, pattern, rules, structure"; and both are "economical and explicit". Some performers combine mathematics and jokes to entertain and/or teach math. Humor of mathematicians may be classified into the esoteric and exoteric categories. Esoteric jokes rely on the intrinsic knowledge of mathematics and its terminology. Exoteric jokes are intelligible to the outsiders, and most of them compare mathematicians with representatives of other disciplines or with common folk. Some jokes use a mathematical term with a second non-technical meaning as the punchline of a joke. Q. What's purple and commutes? A. An abelian grape. (A pun on abelian group.) Occasionally, multiple mathematical puns appear in the same jest: When Noah sends his animals to go forth and multiply, a pair of snakes replies "We can't multiply, we're adders" – so Noah builds them a log table. This invokes four double meanings: adder (snake) vs. addition (algebraic operation); multiplication (biological reproduction) vs. multiplication (algebraic operation); log (a cut tree trunk) vs. log (logarithm); and table (set of facts) vs. table (piece of furniture). Other jokes create a double meaning from a direct calculation involving facetious variable names, such as this retold from Gravity's Rainbow: Person 1: What's the integral of 1/cabin with respect to cabin? Person 2: A log cabin. Person 1: No, a houseboat; you forgot to add the C! The first part of this joke relies on the fact that the primitive (formed when finding the antiderivative) of the function 1/x is log(x).
Paolo Perona, Benoît Crouzy, Lorenzo Gorla, Pierre Razurel