Introduction
A trick is a theorem you can hold
Magic & Math with Cards is a course by Neeldhara Misra at IIT Gandhinagar: sixty twenty-minute lectures, twenty-two card tricks, and the mathematics that makes each trick work. Every trick here is self-working. There is no sleight of hand: the method is mathematics, and in the last section also a partner who knows the code.
What this course is
Every trick in this course keeps a promise that the spectator’s choices seem bound to break. A deck the spectator shuffles still splits evenly. Four cards, mixed by the spectator’s own hands, still give up the one they remembered. Five cards are chosen, four are shown, and the fifth is named. The course asks why, and the answers are some of the most useful ideas in mathematics: invariants, codes, graphs, permutations, counting and matchings.
You need to be comfortable with basic mathematical reasoning, and that is all. Permutations, graphs and encoding are introduced with pictures, as they are needed.
Self-working means no concealed sleight of hand is needed. Some tricks use a prepared packet, a card the spectator shows openly, a memorised code or a trained partner, and the lectures say so. A trick is only guaranteed under its stated conditions, so every lecture and every trick page spells those conditions out.
How it is organised
The course has seven sections and sixty lectures of about twenty minutes each, twenty hours in all. Each section builds on the ones before it, and every lecture page lists what to watch first.
| Section | Lectures | Tricks |
|---|---|---|
| 1. Basic Concepts | 01–03 | 1 |
| 2. Hummer Shuffles | 04–12 | 4 |
| 3. Order Matters | 13–27 | 4 |
| 4. The Gilbreath Principle | 28–39 | 4 |
| 5. Count Out and Transfer | 40–45 | 3 |
| 6. Assorted Tricks | 46–51 | 3 |
| 7. The Best Card Trick | 52–60 | 3 |
There are two kinds of lecture.
- Performance lectures (twenty-two of them) open with a trick performed at the table, with a real spectator making real choices. Then the cards are taken apart with animation until the mechanism is plain, and the lecture closes with a short challenge. Each performance lecture explains its own trick completely.
- Mathematics lectures (thirty-eight) start from a question you can see and follow one idea further: a proof, a generalisation, a construction, a limitation or an application. They come after the performance they grow out of.
How to use the lectures and the tricks
Every lecture has its own page, with the video, what you will learn, what to watch first, an outline of the lecture, and its sources. The videos are in production and appear on these pages as they are finished; until then, the outlines and the tricks stand on their own.
A good rhythm for a performance lecture: watch the trick, then pause and play it here yourself, as the spectator. Come back for the explanation. Then follow the mathematics lectures that come after it. Each trick page also links back to its lecture.
How a trick page works
Each trick page has the same three movements.
- Try it. You play the spectator. You choose the cuts, the cards, the numbers and the piles. The cards on screen follow exactly the moves you would make at a table, and the ending is computed from what you actually did.
- Lift the curtain. Below the curtain, step through the same moves slowly, with the hidden structure drawn in. Then test yourself with a challenge: a new case, a rule that has been quietly broken, or a packet you design. You can lower the curtain again before showing the trick to a friend.
- Take it to the table. The exact set-up and handling, with the places where a performance usually goes wrong.
Try a trick a few times before you open the curtain. The surprise is part of the lesson: the feeling that the spectator’s choices should have destroyed something, and somehow did not.
The interactive pages are extra practice, not part of the twenty hours. Every lecture makes sense on its own, without a browser.
What the colours mean
Colour is used sparingly and always means the same thing.
- Teal marks the card, step or quantity being followed right now.
- Gold marks what never changes: the invariant, or a result that has been established.
- Coral marks a specific failure: an illegal move, or a counterexample to a claim.
Red and black on a card are only ever the suits. They never mean right and wrong. When a colour code is used, black is 0 and red is 1; when face orientation is used, face down is 0 and face up is 1.
Where the tricks come from
The course draws mainly on two books: Persi Diaconis and Ron Graham, Magical Mathematics: The Mathematical Ideas That Animate Great Magic Tricks (Princeton, 2011), and Colm Mulcahy, Mathematical Card Magic: Fifty-Two New Effects (CRC Press, 2013). The tricks themselves belong to a long tradition of magicians and mathematicians, among them Stewart James, Bob Hummer, Norman Gilbreath, William Fitch Cheney Jr. and Martin Gardner.
For the 124-card mathematics of the last section, the course follows Norman Do’s “A Mathemagical Card Trick” and Shai Simonson and Tara S. Holm’s “Using a Card Trick to Teach Discrete Mathematics”; Michael Kleber’s “The Best Card Trick” is good further reading. Every lecture page and every trick page credits its own sources.
The lectures, explanations, interactive pages and handling notes are newly written for the course; the sources supply principles and reference handling, not copied narration. Where a lecture or a trick page uses a smaller packet or a fixed teaching example in place of a larger routine, it says so.
Accessibility
Every control is a real button you can reach with the keyboard. Cards announce their names to screen readers, and each completed move is announced. If your system asks for reduced motion, cards move straight to their new places without travelling.