Why use Magic for teaching arithmetic and geometric suit, additive groups, and algorithmic notions through Matlab? Magicians know that, once the surprise has worn off, the audience will seek to understand how the trick works. The aim of every teacher is to interest their students, and a magic trick will lead them to ask how? And why? And how can I create one myself? In this article we consider a project I presented in 2009. I summarize the project scope, the students' theoretical studies, their approach to this problem and their computer realizations. I conclude using the mathematical complement as well as weak and strong points of this approach. Whatever the student's professional ambitions, they will be able to see the impact that originality and creativity have when combined with an interest in one's work. The students know how to “perform” a magic trick for their family and friends, a trick that they will be able to explain and so enjoy a certain amount of success. Sharing a mathematical / informatics demonstration is not easy and that they do so means that they will have worked on understood and are capable of explaining this knowledge. Isn't this the aim of all teaching?

Assaf, S., Soundararajan, K., & Diaconis, P. (2009). Riffle shuffles of a deck with repeated cards. DMTCS Proceedings, 21st International Conference on Formal Power Series and Algebraic Combinatorics, FPSAC 2009, 89-102.

Chardiny, N., Dupin, B., & Grosgeorge, S. (2010). Utiliser les mathématiques pour créer un tour de Magie utilisant le mélange FARO. Mémoire de P.S.I, ESIEA.

Diaconis, P. (1998). From shuffling cards to walking around the building. An introduction to markov chain theory. Proceedings of International Congress, Berlin, I, 187-204.

Diaconis, P. (2003). Mathematical Developments from the Analysis of Riffle-Shuffling. In A. Fuanou and M. Liebeck (eds.), Groups Combinatorics and Geometry (pp. 73-97). N.J.: World Scientific.

Gardner, M. (2005). Martin Gardner's mathematical games : the entire collection of his scientific American columns. Mathematical Association of America.

Huet, G. (1991). The Gilbreath trick: A case study in axiomatisation and proof development in the Coq Proof Assistant. Proceedings, Second Workshop on Logical Frameworks, Edinburgh.
doi:10.1017/CBO9780511569807

Schott, P. (2009). The use of magic in mathematics: From primary school to higher education. Proceedings of ICERI2009 Conference, Madrid, Spain, 58-70.