Magically Multiplying with Lines

“Magic is just science that we don’t understand yet.” – Arthur C. Clarke

The same can be said of mathematics. Such enchantments can occur when a professor stands at the front of the room and magically finds the sum of an infinite series, the product of polynomials, or even the product of two numbers. When we stand on the other side of understanding, that which seemed magical can seem quite logical.

Math is a place where we can help each other bridge those gaps and see the magical become understood. To tap into this, let’s see an example of multiplying numbers that simply mystified me when I first saw it back in 2006. While more polished videos exist now, the simplicity of this video has its charm and the silence adds to its mystery.

Before unveiling the math (trick) behind this magic. Let’s diverge to another form of multiplication by using a table to review the process of multiplication. We’ll find the product of 21 and 13. To begin, we form the table as below:

103
20
1

Then each entry of the table is filled with the product of the numbers in its respective row and column as seen below:

103
2020060
1103

Now, to simplify the discussion below, let’s concentrate only on the entries that were products of row and column headers in the table above. This gives us:

20060
103

Adding the entries of the table gives the desired product to our problem, 273. However, notice for a moment that we could also add along the 3 diagonals that run from the upper right to the lower left. Our first diagonal has only one entry 200. The second diagonal has the numbers 60 and 10; so the sum is 70. Finally, the last diagonal has the entry 3. As you sum along each diagonal, the numbers have the same place value. The first is hundreds, the second tens and the last ones.

Let’s use this knowledge to look at the trick again. Below is my rendering of the trick with the intersection points delineated by color.

Compare this to the table and adding along those diagonals. Notice a similarity? If not, the colors of the dots may help. Each color corresponds to a different place value. Each purple dot is a hundred, each green ten and each orange one. Further, notice how adding the dots, particularly in the middle of this picture, corresponds to adding along the diagonals in the table.

Got it? Try the method of drawing lines to find the product of 32 and 12. When you get that, try 62 times 14. You might want to go back to the table, if you struggle to think through what to do with the sums you get with the points.

Magical? Possibly…but when we bridge that magical gap with understanding, such a trick, at most, is magical for mathematical muggles.

Computing magic

Suits of cards on a laptop screen

A clever use of mathematics can mystify audiences. A variety of resources divulge such secrets for a budding mathematically-inclined magician. Colm Mulcahy’s (Spelman College) column Card Colm on MAA Online reveals the mathematics behind a variety of tricks that involve such topics as Fibonacci numbers and results of Paul Erdös. Mathemagician Art Benjamin (Harvey Mudd College) unveils secrets of rapid mental calculation in his book, Secrets of Mental Math. How magical such tricks appear is correlated to one’s insight into the underlying mathematics.

Many math-based card tricks exist on YouTube. I’m fond of math-based magic. My fondness is proportional to my inability to do any magic that isn’t self-working. Simply put, I like the math but I like that the math makes me look magical. Further, magic can engage audiences of many ages. Here you see a picture of Tanya Chartier engaging a youth with card magic trick at the National Museum of Mathematics’ New York City Math Festival in 2019.

Want to be a mathematical card magician? YouTube is a trove of tricks. Here is a fun (self-working) one (with a short video):

As with any trick I see, my initial reaction is, “Wow! That’s amazing!” I can sense the math but am overtaken with the mystery. An attribute of a self-working trick is only the steps need to be remembered – the magic takes care of itself.

Try the trick in the magic in the video. It works — every time regardless of the order of the deck. And then comes the real trick — after the initial “Wow” comes the desire to understand. Why does the trick work and this is when the magic turns to math. Not surprisingly, trick relies on placing the chosen card ninth from the bottom. There are 52 cards so the chosen card is 43 from the top.

First, imagine capping all four piles of 10 cards. Then, each pile contains 11 cards and the last pile IS capped with the chosen card. However, in every other case, the trick works as outlined in the video. Sum the cards that are face up and count that many cards down. If the sum is 10, for example, the tenth card dealt will be the chosen card. Why does the trick work? I’m going to leave that to your mathematical exploration, mainly due to my repeated inability at writing a clear, succinct answer.

Unless you cap all four piles, you are able to add up the sum of the cards that are face up and count that many cards down to unveil the chosen card. If you cap all four piles, there are no cards face up. In such a case, the “zero” card (rather than the first or thirteenth card, for instance) is the chosen card. Granted, a magician, such as yourself, could finesse unveiling such a “zero card,” which would be the card to cap the fourth pile. In my mind, this is less magical than counting down and finding the chosen card. I found myself wondering, “What is the probability of this even happening?” Feeling quite nerdy but not minding (much), I grabbed a pencil and paper and begin trying to compute such a probability. Soon, it appeared I would need to cover several cases or sit until I perceived another approach. Then, I laughed in the realization, “I’m a mathematician and computer scientist! Let the computer do the computing!”

I quickly coded a program to perform the trick. I created a deck and randomly permuted the cards to serve as my shuffle. Then, I simply performed the trick 100,000 times keeping track of how often I capped all four piles in the trick. The first time I ran the computation, this occurred 1352 times. The second time I (via my program) performed the trick 100,000 times capping all four piles 1336 times.

So, I would have about a 1.3% chance of capping all four decks. Given I rarely perform magic, this is a pretty small chance. If I decided to perform the trick more often, could I live with that probability? Would you? It may partially depend on what you do when the case arises. Frankly, I might just put the chosen card as the 8th card from the bottom and then count down the desired number of cards and the next card is your card. In such a case, if every deck is capped, the next card is your card. The math is easier to perceive though…But, I often perform math-based magic tricks so people can learn and struggle with the math. Yet, maybe that’s precisely why the original trick is compelling! I, for instance, sat and coded a computer program to perform the trick, and am now blogging about it! Were the card the 8th from the bottom, maybe once I saw the trick, I might have even forgotten about it several hours later. I guess, now that I think about it, I can live with that 1.3% chance in the hopes that someone else might enjoy a similar mathematical journey. And then again, maybe I’m the only one who might not be that great at finessing a zeroth card!

What choice would you make?