Magical Mathematics

Magical Mathematics: The Mathematical Ideas That Animate Great Magic Tricks

With a foreword by Martin Gardner
Copyright Date: 2012
Pages: 258
Stable URL:
  • Cite this Item
  • Book Info
    Magical Mathematics
    Book Description:

    Magical Mathematicsreveals the secrets of amazing, fun-to-perform card tricks--and the profound mathematical ideas behind them--that will astound even the most accomplished magician. Persi Diaconis and Ron Graham provide easy, step-by-step instructions for each trick, explaining how to set up the effect and offering tips on what to say and do while performing it. Each card trick introduces a new mathematical idea, and varying the tricks in turn takes readers to the very threshold of today's mathematical knowledge. For example, the Gilbreath Principle--a fantastic effect where the cards remain in control despite being shuffled--is found to share an intimate connection with the Mandelbrot set. Other card tricks link to the mathematical secrets of combinatorics, graph theory, number theory, topology, the Riemann hypothesis, and even Fermat's last theorem.

    Diaconis and Graham are mathematicians as well as skilled performers with decades of professional experience between them. In this book they share a wealth of conjuring lore, including some closely guarded secrets of legendary magicians.Magical Mathematicscovers the mathematics of juggling and shows how theI Chingconnects to the history of probability and magic tricks both old and new. It tells the stories--and reveals the best tricks--of the eccentric and brilliant inventors of mathematical magic.Magical Mathematicsexposes old gambling secrets through the mathematics of shuffling cards, explains the classic street-gambling scam of three-card monte, traces the history of mathematical magic back to the thirteenth century and the oldest mathematical trick--and much more.

    eISBN: 978-1-4008-3938-4
    Subjects: Mathematics

Table of Contents

Export Selected Citations
  1. Front Matter (pp. i-vi)
  2. Table of Contents (pp. vii-viii)
  3. FOREWORD (pp. ix-x)
    Martin Gardner

    If you are not familiar with the strange, semisecret world of modern conjuring you may be surprised to know that there are thousands of entertaining tricks with cards, dice, coins, and other objects that require no sleight of hand. They work because they are based on mathematical principles.

    Consider, for example, what mathematicians call the Gilbreath Principle, named after Norman Gilbreath, its magician discoverer. Arrange a deck so the colors alternate, red, black, red, black, and so on. Deal the cards to form a pile about equal to half the deck, then riffle shuffle the piles together. You’ll be amazed...

  4. PREFACE (pp. xi-xiv)
    Persi Diaconis and Ron Graham
  5. Chapter 1 MATHEMATICS IN THE AIR (pp. 1-16)

    Most mathematical tricks make for poor magic and in fact have very little mathematics in them. The phrase “mathematical card trick” conjures up visions of endless dealing into piles and audience members wondering how long they will have to sit politely. Our charge is to present entertaining tricks that are easy to perform and yet have interesting mathematics inside them. We cannot do this without your help. To get started, please go find four playing cards. They can be any four cards, all different or the four aces. It doesn’t matter. Let us begin by performing the trick for you....

  6. Chapter 2 IN CYCLES (pp. 17-29)

    In this and the following two chapters, we explain a wonderful magic trick that leads to, and profits from, beautiful mathematics. The trick is one we have performed for drunks in seedy nightclubs, at Hubert’s Flea Museum, and at a banquet of the American Mathematical Society. The trick really fools magicians, mathematicians, and “normal” people too. The mathematics involved begins with basic graph theory. Indeed, it uses ideas that started the subject of graph theory. It also needs tools of finite fields and combinatorics. At the heart of the trick are de Bruijn sequences. These are used in applications far...


    The sequence 0000100110101111 has the property that successive groups of four 0000, 0001, 0010, 0100, … , go through each of the successive sixteen zero/one strings of length four once (going around the corner). Such a sequence is called a de Bruijn sequence of window length four. In chapter 2 we showed how longer versions with window length five are the basis of good card tricks. In this section we show how de Bruijn sequences and some variations are of use in robotic vision, in industrial cryptography, in putting together (and pulling apart) snippets of DNA, in philosophy, and in mathematics itself....

  8. Chapter 4 UNIVERSAL CYCLES (pp. 47-60)

    We have used de Bruijn sequences for magic tricks and shown how they can be applied to make and break codes for spies and for analyzing DNA strings. The magic angle suggests wild new variations. Some of these lead to amazing new tricks. Some lead to math problems that will be challenges for the rest of this century. The following effect begins like the ones in earlier chapters but the information source is different.

    Our start in this direction was the following magic trick, invented jointly with the chemist-magician Ronald Wohl. It has never been explained before. Here is how...


    The above is wordplay; the connections between the invariants of a random riffle shuffle and the universal structure in the Mandelbrot set lie far below the surface. We’ll only get there at the end. This chapter gives some very good card tricks and explains them using our new “ultimate” Gilbreath Principle. Later in this chapter, the Mandelbrot set is introduced. This involves pretty pictures and some even more dazzling universal properties that say that the pretty pictures are hidden in virtually every dynamical system. We’ll bet you can’t yet see any connection between the two parts of our story.


  10. Chapter 6 NEAT SHUFFLES (pp. 84-102)

    Some magicians, and some crooked gamblers, can shuffle cards perfectly. This means cutting the deck exactly in half and riffling the two halves together so that they alternate perfectly (see figure 1). Eight perfect shuffles bring a fifty-two-card deck back to where it started. We have friends who can do this in under forty seconds, almost without glancing at the pack. To see why crooked gamblers are interested in such things, consider an ordinary pack of cards with the four aces on top. After one perfect shuffle, the aces are every second card. After two perfect shuffles, the aces are...


    A thirteen-year-old boy slowly opens the door to the world’s largest magic shop. It’s two in the afternoon and the boy has cut school, making the trip on New York’s grimy subways. The shop is Louis Tannen’s Magic Emporium at Forty-second Street and Sixth Avenue in New York’s Times Square. Not the usual street-level shop with doggie doo and plastic vomit in the window, Tannen’s is on the twelfth floor of the Wurlitzer Building. You have to know about it to find your way in. It’s a slow day, but some of the regulars look up and smile. There’s Manny...

  12. Chapter 8 MAGIC IN THE BOOK OF CHANGES (pp. 119-136)

    Mathematicians are sometimes seen as the ultimate nerds. An old joke goes: “An outgoing mathematician is one who looks atyourshoes during conversation.” Your authors do not fall into this mode. Each of us has had show business careers and gives more than fifty talks a year (in addition to our scheduled classes). By now, nothing makes us nervous in public presentations. Except for just one time!

    In May 1990, John Solt invited us to give a talk at Harvard’s Department of East Asian Languages and Civilizations colloquium. We are not sinologists but knew John through magician-historian Ricky Jay....

  13. Chapter 9 WHAT GOES UP MUST COME DOWN (pp. 137-152)

    Juggling, like magic, has a long history, both dating back at least four thousand years. Indeed, magic and juggling are often associated with each other. Certainly, some of the top jugglers seem to have supernatural abilities, while a number of magic tricks (such as perfect shuffles) require highly developed physical skills. In fact, many talented magicians are also skilled jugglers, e.g., Ricky Jay and Penn Jillette. Moreover, there is also a strong connection between juggling and mathematics. Mathematics is often described as the science of patterns. Juggling can be thought of as the art of controlling patterns in time and...


    People have been inventing self-working magic tricks based on simple mathematical ideas for at least a thousand years. In the past hundred years, a revolution has taken place. This comes from the emergence of serious hobbyists. They support magic dealers (many sizable towns have one), hundreds of magic clubs, and about a hundred yearly conventions. Out of this comes progress. There is a constant call for something new. Old tricks are varied, improved, and classified. They are recorded in journals. There are quarterlies, monthlies, and even a weekly journal,Abracadabra, which ran for over fifty years. The large magic journals...

  15. Chapter 11 GOING FURTHER (pp. 220-224)

    Suppose you’ve gotten this far and want some more. More recreational mathemagic, more math, more magic. This chapter gives pointers to resources and techniques for going forward.

    It’s always nice when questions have easy answers. How does one learn more recreational mathematics? What are the best, most interesting sources? Answer: Go get any (or all) of Martin Gardner’s collections ofScientific Americancolumns or hisColossal Book of Mathematicsfor a good sampling. If you are interested in magic, all of these books have a chapter focused there as well. The books have so much more and are so engagingly...

  16. Chapter 12 ON SECRETS (pp. 225-230)

    Magic gets some of its appeal from its secrets. The magician knows but doesn’t tell. Some spectators find this frustrating, some find it alluring. The secrets are a central part of the story. When you are accepted into the magicians’ world, you agree to keep the secrets private. Those who deviate are shunned, literally thrown out of the club and not usually accepted back. David Devant, one of the great creators and performers in the early twentieth century, “erred” in writing a magic book for the public. He was thrown out of The Magic Circle, an exclusive English magic society...

  17. NOTES (pp. 231-238)
  18. INDEX (pp. 239-244)

You are not currently logged in.

Login through your institution for access.


Log in to your personal account or through your institution.