Mathematics of magic
Mathematics of magic
Summary: Many tools of mathematics and mathematical properties lend themselves to tricks.
Mathematical magic may seem to be either redundant or an oxymoron. Many people equate mathematical processes or theorems with magic, such as the magic of logarithms or when mathematicians are thought to have magical powers with numbers floating around their heads in movies and on television. Others view it as a collection of sterile algorithms absent of any signs of magic. However, the realm of mathematical magic counters both of these views, blending together elements from mathematics as a structure with an element of surprise akin to magic. Invoking mathematics of great breadth—arithmetic, number theory, algebra, geometry, and topology—the mathematical magician’s “tools” are numbers, cards, string, dice, dominoes, calendars, watches, coins, dollar bills, and rubber bands.
![The two circles seem to rotate when the viewer's head is moving back and forth while looking at the black dot. By Fibonacci (Own work) [GFDL (http://www.gnu.org/copyleft/fdl.html) or CC-BY-SA-3.0 (http://creativecommons.org/licenses/by-sa/3.0/)], via Wikimedia Commons 98697124-91147.jpg](https://imageserver.ebscohost.com/img/embimages/ers/sp/embedded/98697124-91147.jpg?ephost1=dGJyMNHX8kSepq84xNvgOLCmsE2epq5Srqa4SK6WxWXS)
![Card trick. Upper left: "Pick a card, any card". Upper right: Palming a card. Bottom left: A "spring" flourish. Bottom right: Mixing the cards allows for card trick preparation. By Hannibal (Own work) [CC-BY-SA-3.0 (http://creativecommons.org/licenses/by-sa/3.0)], via Wikimedia Commons 98697124-91146.jpg](https://imageserver.ebscohost.com/img/embimages/ers/sp/embedded/98697124-91146.jpg?ephost1=dGJyMNHX8kSepq84xNvgOLCmsE2epq5Srqa4SK6WxWXS)
Arithmetic Magic
Arithmetic magic depends on the clever use of divisors, multiples, and basic operations. As an example, ask a friend to write down his or her age. Then, add the age on the friend’s next birthday. Add 9 to this sum. Divide that sum by 2. Finally, subtract the friend’s current age. Then, magically announce that the answer is 5. It will always be 5, thanks to mathematics. For example, if the friend’s age is 24, the friend would calculate: 24+25=49; 49+9=58; 58÷2=29; 29-24=5. In fact, with a slight modification of the first calculation (add one more than your starting number), your friend could start with any number, such as 3.5, π, or even -72.3, and the result will still be 5.
Card and Dice Magic
Mathematical magic using playing cards capitalizes on their properties—numerical values 1–13, four suits, two colors, front-back orientation—as well as the fact that a deck of cards can be both ordered and shuffled. As another example with a friend, shuffle a deck of cards, hand it to your friend, and then casually write something on a piece of paper, which is folded and set aside. Ask your friend to deal the top 12 cards face-down on the table and then touch any four cards, which you turn over. Group the other eight dealt cards and return them to the bottom of the card deck. Suppose the four face-up cards are a 3, 5, 7, and King (where all face cards are to be treated as a 10). Taking the deck, deal more cards on top of each card to make 10, counting out loud the sequences (for example, 3, 4, 5, 6, 7, 8, 9, 10 and 5, 6, 7, 8, 9, 10 and 7, 8, 9, 10). Because the King has the value 10, no cards are dealt on top of it. Hand the deck to your friend, ask him to add the values of the original four cards (3+5+7+10=25) and then count out that number of cards (25 cards). When the last card is turned over, reveal that it matches your prediction written on the paper.
Mathematical magic using dice depends on the fact that the pips on the opposite sides sum to 7. As an example of a trick, with your back turned, ask a friend to throw three dice on a table and add the top faces (for example, 2+4+5=11). Then ask the friend to pick up any one of the dice and add its bottom number to the current sum (for example, opposite the 2 on the first dice is a 5, so 11+5=16). Finally, ask the friend to roll that die again, and add the new top face to the current sum (for example, 16+6=22). Turn around and announce that you have no way of knowing which die was rolled twice, pick up the 3 dice, shake them in your hand, and magically announce your friend’s final sum.
Geometric Magic
Mathematical magic involving geometry or topology is similar to actual tricks performed by magicians, such as the Chinese Linking Rings, Magical Knots, and Houdini Escapes. As a simple example, start with an 8×8 grid square and draw 3 lines to subdivide it as shown. Cut along the 3 lines, producing 4 pieces, which can be rearranged to form the 5×13 solid rectangle. What is the magic? The initial square with an area of 64 square units has been transformed into a rectangle with an area of 65 square units.

The Magic Revealed
Why do the previous four tricks work? The first arithmetic trick is explained using algebra, where n is the starting number, shown as

For the second trick, it is important that the card you write on the paper matches the bottom card on the shuffled deck at the start. The trick becomes automatic, since the 4 face-up cards and the 8 cards placed on the bottom as part of the deck essentially force your “secret card” to now be in the 40th position in the original deck. The counting mechanism forces this card to be the card revealed. For the third trick, determine the final sum by adding 7 to the sum of the 3 top faces seen as you pick up the dice. Finally, for the fourth trick, the magical effect is because of the apparent diagonal of the rectangle, as it is not a straight line but is a “thin” parallelogram with an area of 1 square unit. To show this mathematically, the two line segments forming the diagonal have differing slopes of 3/8 and 2/5. As a twist to this trick, note that the square had side length 8 while the rectangle had side lengths 5 and 13, where the numbers 5, 8, 13 are part of the Fibonacci sequence. In fact, any three ordered numbers (different) in this sequence produces this magical effect.
Magic Squares, Cubes, and Circles
In any discussion of mathematical magic, one must mention magic squares, cubes, and circles. First, subdivide a square into smaller squares, each containing a number. The magical effect is that the numbers in each row, each column, and each diagonal all sum to the same constant value.
8 | 1 | 6 |
3 | 5 | 7 |
4 | 9 | 2 |
This common example is the “Lo Shu” magic square with a constant sum of 15, being part of the legend (650 b.c.e.) of the Chinese Emperor Yu finding a turtle with the same square inscribed on its back. Also, the German artist Albrecht Dürer inserted a famous magic square in his painting Melancholia, with its constant sum of 34 and the painting’s date of 1514 included in the bottom row of cells.
16 | 3 | 2 | 13 |
5 | 10 | 11 | 8 |
9 | 6 | 7 | 12 |
4 | 15 | 14 | 1 |
Historically, mathematics and magic are intertwined, back to the Pythagoreans who revered certain numbers with a special mysticism. This “aura” of numbers having special magical effects surfaced often throughout history in the form of special primes, special products, and special properties. For example, one can not dismiss the magic of numbers when considering these number patterns, all evoking a feeling of “Behold!”





Martin Gardner claimed in his 1956 book Mathematics, Magic and Mystery that mathematical magic has a unique but limited audience. In his opinion, mathematicians reject mathematical magic as trivial and dull, while magicians reject it as pseudomagic. The true audience is therefore those who appreciate mathematical recreations implemented in a creative, entertaining context. A master of such presentations is Arthur Benjamin, a combinatorics professor and professional magician, who has appeared on many radio and television programs, such as the widely popular political satire program The Colbert Report, and been profiled in entertainment, news, and scientific publications. His popular demonstrations and explanations of methods for rapid mental calculations, which have been enjoyed by audiences of all ages and cultures worldwide, as well as his many popular books on mathematical magic would appear to belie Gardner’s claim.
Bibliography
Andrews, W. S. Magic Squares and Cubes. New York: Dover, 1960.
Benjamin, A. Secrets of Mental Math: The Mathemagician’s Guide to Lightning Calculation and Amazing Math Tricks. New York: Three Rivers Press, 2006.
Blum, Raymond. Mathemagic. New York: Sterling, 1992.
Carter, Philip, and Ken Russell. The Complete Book of Fun Maths: 250 Confidence-Boosting Tricks, Tests and Puzzles. Mankato, MN: Capstone, 2004.
Gardner, Martin. Mathematics, Magic and Mystery. New York: Dover, 1956.
Longe, Bob. The Magical Math Book. New York: Sterling Publishing, 1997.