Mathematical Wonder: An interview with magicians Matt Baker and Joshua Jay

By Tim Chartier

For many people, what math and magic have in common is that they can both be utterly befuddling. But for Joshua Jay and Matt Baker, there’s much more to the connection than that.

Matt Baker

Joshua Jay is a former World-Champion in close-up magic and Guinness record-holder for card tricks. He makes frequent appearances on TV shows such as The Tonight Show with Jimmy Fallon and The Late, Late Show with James Corden. He even fooled Penn & Teller on Fool Us.

Matt Baker is a professor of mathematics at Georgia Tech and an Associate Dean in the Georgia Tech College of Sciences. He is also an award-winning magician. Matt has performed magic across the U.S., as well as in Colombia, Mexico, Austria, Germany, England, Italy, Spain, and Japan. 

Together, Joshua and Matt (alongside their colleague Andi Gladwin) have created a curriculum that will be implemented in India, to teach mathematical ideas through magic tricks.   To gain more insight into the nexus of math and magic, Math Values interviewed these two accomplished magicians.

Tim Chartier:  You are both accomplished magicians.  So, when I say math and magic, what comes to mind?

Joshua Jay:  For me, the math is always in service of my only objective, which is to give the audience the experience of magic. I love mathematics. I love the elegance of methods that involve math. But math has to be the very best way to accomplish a trick for me to use it. And the math must not only be not understood, it can't even be perceived. If people think the trick is based on a mathematical principle, then I've failed in my goal as a magician.

Matt Baker:  I wear multiple hats, and for me the answer depends on which one I’m wearing. If I’m performing as a magician, then my answer is the same as Josh’s: the goal is to do things which have no possible explanation, so if the audience perceives that a trick is based on math they won’t experience it as magic. It doesn’t matter if they don’t understand the details of the method, the very idea that a trick might be explainable by mathematics kills the sense of wonder. There’s a famous and very relevant quote here by Simon Aronson (whom Josh and I were both quite close to): There's a world of difference between a spectator's not knowing how something is done versus his knowing that it can't be done.

Now, if I’m wearing my math teacher hat, my answer is very different. In that case, the feeling of “real magic” is secondary to teaching interesting mathematical concepts. The audience will ideally still experience something wondrous, but it doesn’t have to be without any possible explanation because I’m going to explain it! For example, the lie detector trick I did at MoMath (See it here.) is puzzling, and fun to play with, but it’s obvious to everyone who sees it that it’s based on some kind of math. So I don’t think of that as “magic.”  However, the explanation is quite interesting, as the trick is based on a famous error-correcting code invented by mathematician Richard Hamming, and understanding why the trick works turns out to be equivalent to understanding how error-correcting codes work. 

Tim Chartier:  Matt, among your mathematical awards and recognitions, you are an AMS Fellow.   You create original magic tricks.  Do they tend to be mathematical?  For math-based tricks, how do you find the math that will make a magic trick?

Matt Baker:  I mainly want to create strong magic; often some math ends up being involved, but I have many effects that involve no math whatsoever. I’ve also created effects that mix math with sleight of hand! For the ones that are purely mathematical in nature, they come in two flavors. There are somewhere I set out to utilize or develop a particular mathematical principle that I like—this is, for example, how the tricks “Single-Fried” and “Crowdsourced Prediction” from my Vanishing Inc Masterclass developed. But there are other tricks where I had a particular effect in mind and then came up with the mathematics needed to make it work. For example, I have an unpublished trick where in order to accomplish the effect I was aiming at, I needed a deck of cards stacked in a very particular order. The question was, does such an order actually exist? With a bit of help from some friends and students who are better at programming than I am, we found a stacked deck that works. Analyzing the conditions under which one can guarantee that such an order exists then led to a math research paper which I wrote with three high school students in the PROMYS program.

Tim Chartier:  Joshua, you also create new magic tricks. Among your accolades, you fooled Penn and Teller on their show “Penn & Teller: Fool Us.”  How do you even go about creating a new magic trick, let alone something that might fool other magicians?

Matt Baker:  I’ll answer that for Josh: he’s in league with the devil.

Joshua Jay

Joshua Jay: What's interesting about the trick I used is that it has a bit of math involved. I don't want to say how, specifically, but it's a pretty equal mix of math and other magic principles.

I know that other magicians think about how to fool their fellow practitioners, but I've never particularly concerned myself with fooling magicians. It's significantly different than fooling a muggle—what we would call a "lay person"—because fooling a magician often involves thinking through whatever method they are likely to suspect and then finding a way to use a different method. But in this case, I used a trick of mine called "Out of Sight" and the driving force behind it has always been the narrative I shared, which is about how I shared magic with a blind person.

Tim Chartier:  Matt, you gave a Math Encounters lecture at the National Museum of Mathematics in December of 2022.  Joshua, you gave the introduction and mentioned how the math of a trick can be disguised so that the audience doesn’t realize the magic relies on math.  You also noted that Matt is particularly gifted at such disguising of math.  Can you both talk about this more? 

Joshua Jay:  What I was alluding to in this case is justifying where math is secretly introduced into a trick. For example, if a method requires the spectator to deal the value of a playing card—for example, deal six cards if you chose a Six, deal nine cards if you chose a Nine—then I like when the performer can elegantly justify why they would ask someone to do this otherwise unnatural action. Suppose the performer asked someone to think of a card. "Now, if you say the card aloud, I might hear you. But I need  you to share it with the people around you. So when I turn away, deal the value of your card quietly into a pile. Then everyone will know the value of your card except for me." Now the magician has created a plausible reason for the mathematical action to occur, without it being apparent that the reason for the deal is actually rooted in the method.

Matt Baker: I’ll piggyback here on what Josh said: it comes down to motivating procedures. If a magician asks you to deal the cards into four piles of five cards each, with no motivation, you might suspect (probably correctly) that the method relies on mathematical patterns aligned with the dealing procedure. But if the magician is telling a story about the wildest hand of poker he ever witnessed, offers to recreate it for you, and asks you to play the role of the dealer, now you probably won’t be thinking about the mathematical patterns underlying the procedure of dealing cards into piles. It’s amazing how much of a difference this kind of motivation has on an audience’s reactions to a trick.

Tim Chartier:  Matt, how do you use magic in your teaching?

Matt Baker:  One example I’m fond of is that when I teach Number Theory and Cryptography, I mention that eight perfect shuffles restores a deck to its original order. Then I demonstrate, doing eight perfect shuffles in a row and showing that the cards are back to new deck order. Finally, I explain why it takes precisely eight shuffles, no more and no less. This turns out to involve some number theory, and more specifically, the kind of number theory that is important in public key cryptography such as the famous RSA cryptosystem.

As another example, when I teach Applied Combinatorics I demonstrate a trick created by the magician Dan Harlan where a group of people put on mismatched pairs of colored gloves and then hold hands with someone wearing the same color. They form a human chain, and I’m able to predict—in advance—which colors will be left at the two ends of the chain. This turns out to be related to a theorem of Euler which essentially gave birth to the field of graph theory. (See https://www.vanishingincmagic.com/blog/feel-the-glove for more details.)

Tim Chartier:  So, magic can teach math! You have a project targeted toward youth in India to teach math with magic. Can you talk about this?

Joshua Jay: Yes! We've partnered with a charity in India called Agastya. Their mission is to serve kids in rural areas of India who don't have easy access to schools. One of their initiatives involves special buses that can be driven into villages and then unfold in a way to become mobile classrooms. It's an amazing project, but a problem that has arisen is that this approach requires the facilitators to "gather a crowd" of kids. So we've developed a magic curriculum that teaches math concepts through performable magic tricks. We wrote a book to go with it and we will go to India to implement our curriculum in October. If it gets picked up, it would be used to teach math to over a million children.

Matt Baker:  I’ll just add that I find magic tricks to be a great way to explain certain math concepts. For example, “The Missing Digit” calculator trick (see https://www.vanishingincmagic.com/blog/missing-digit) is a really nice way to explain the technique of casting out 9s, which has many applications. It also leads naturally into a fruitful discussion of certain concepts from probability theory. This trick is one of many in our book for the Agastya Foundation. Other tricks in the book require algebra to understand why they work, and I think this could be a very interesting way for some students to learn to appreciate algebra.

Tim Chartier: Suppose I want to learn magic. What tips do you have? Where do I begin?

Joshua Jay:  I think a great place to begin is to establish what you want out of magic. Is it to amaze your kids? Your partner? Is it to share magic with a client? A classroom? Just for yourself? Is it just card tricks? Or do you want to do magic on a big stage? Once you establish that, it's easier to zoom in and feed your curiosity.

Matt Baker: Josh’s book Magic: The Complete Course is a great starting point for beginners at any level. For mathematical magic, Martin Gardner’s book Mathematics, Magic, and Mystery is the classic introduction. For a comprehensive introduction to card magic at a professional level, Roberto Giobbi’s five volumes of Card College are hard to beat. Many magicians learned the basics from either The Tarbell Course in Magic by Harlan Tarbell or The Royal Road to Card Magic by Braue and Hugard.


Tim Chartier is the 2022-23 Distinguished Visiting Professor at the National Museum of Mathematics and the Joseph R. Morton Professor of Mathematics and Computer Science at Davidson College.