Dramatising events from the history of mathematics and famous mathematical problems can make abstract concepts more accessible to students. With the help of artificial intelligence, teachers and students can create short dialogues for a small number of characters and perform or read them aloud in class. The story does not replace the mathematical exploration of the topic; instead, it provides an engaging starting point.
First, we select an event from the history of mathematics, a famous mathematician or an interesting mathematical problem. If we already know a relevant story, we can provide its most important facts to the AI. We can also ask the AI to suggest a suitable topic, but any information it provides should be checked against reliable sources.
Next, we ask the AI to turn the story into a short dialogue involving a small number of characters. The scene may be serious, humorous or mysterious, but the mathematical content must remain accurate. Students can perform the completed script in class and then explore the mathematical problem together.
The method combines:
mathematical content;
storytelling;
drama activities;
oral communication;
group work;
creativity;
the purposeful and critical use of artificial intelligence.
Stories can help students recognise that mathematics is not simply a collection of ready-made rules and formulae. Mathematical knowledge often emerges from real-life problems, unsuccessful attempts, debates and new ways of thinking.
The method can develop:
interest in mathematical problems;
understanding of mathematical concepts;
logical thinking and reasoning;
the use of mathematical terminology;
reading comprehension;
presentation and communication skills;
collaboration;
source criticism and digital awareness.
Acting out the roles can be particularly motivating for students who engage more readily through stories, human situations and verbal activities than through traditional problem-solving alone.
It is advisable to choose a story that is closely connected to the current curriculum. Possible topics include:
Euler and the Seven Bridges of Königsberg;
the development of graph theory;
the history of zero or negative numbers;
Pascal and Fermat’s work on probability;
mathematics and codebreaking;
documented events from the lives of famous mathematicians;
the development of a famous conjecture or proof;
an everyday application of mathematics.
Whenever possible, the AI should be provided with verified facts about the story. Sources may include textbooks, publications on the history of mathematics, university or professional organisation websites, original papers or other reliable academic materials.
It is helpful to distinguish between:
verifiable historical facts;
mathematical content;
fictional elements added to make the story more engaging.
For a useful result, it is not enough to ask the AI simply to “write a story”. The prompt should specify:
the students’ age;
the mathematical problem to be explored;
the number of characters;
the required length of the scene;
the mathematical concepts to be included;
the preferred tone;
the questions to be discussed after the performance.
Example of a detailed prompt:
Write a dialogue lasting approximately 4–5 minutes for three characters about the Seven Bridges of Königsberg for students aged 14–15. The characters should be two local residents and Leonhard Euler. The scene should introduce the seven-bridge problem, the transformation of the map into a graph, and the concepts of vertex, edge and degree. Explain accurately why there is no route that crosses each bridge exactly once. Clearly identify any fictional historical details. Do not invent quotations attributed to Euler. Add three follow-up questions at the end.
The teacher should always read and review the completed story. It is important to check:
the accuracy of the mathematical statements;
the reliability of the historical information;
any statements attributed to historical figures;
whether the language is appropriate for the students’ age;
the length and performability of the scene;
whether the story genuinely supports understanding of the topic.
Artificial intelligence can produce convincing but inaccurate or entirely fictional details. Fact-checking is therefore not only part of the preparation but can also become an important element of the learning process. UNESCO’s guidance on generative AI in education similarly emphasises human oversight, age-appropriate use and the need to define clear pedagogical purposes. (UNESCO – Guidance for Generative AI in Education and Research)
Roles can be assigned through volunteering or drawing lots. Students should be given a few minutes to read the script and discuss their roles. They do not need to memorise the dialogue: it can also be presented as readers’ theatre.
Simple props, maps, images or drawings on the board can help the audience follow the story. For the Seven Bridges of Königsberg, it is useful to display both a historical map of the city and its simplified graph model.
The teacher briefly introduces the setting and background of the story.
Students are presented with the initial problem but not its solution.
The selected students read or perform the dialogue.
The rest of the class receive observation tasks, such as identifying the mathematical concepts used in the scene.
The class creates a mathematical model of the problem.
Students explain the main idea of the solution in their own words.
The class distinguishes between historical facts and fictional elements added during the dramatisation.
Students apply the new way of thinking in further activities.
In eighteenth-century Königsberg, seven bridges connected four areas of land separated by the River Pregel. The famous problem associated with the city asked whether it was possible to walk through the city and cross each of the seven bridges exactly once.
Leonhard Euler recognised that the lengths, shapes and exact positions of the bridges were irrelevant to the problem. What mattered was which areas of land they connected. He replaced the areas of land with points and the bridges with lines joining them. In modern terminology, the points are called vertices and the lines are called edges.
The four vertices have odd degrees: three, three, three and five. If a route uses every edge exactly once, then at every intermediate vertex we must leave as many times as we enter. Therefore, only the starting and finishing vertices may have odd degrees, meaning that there can be no more than two odd-degree vertices. Since the Königsberg graph has four, the required route cannot exist.
Euler’s work on this problem is regarded as one of the foundations of graph theory. Information about the problem and Euler’s original paper can be found in the Euler Archive.
Characters:
Klara: an enthusiastic local resident;
Johann: her sceptical friend;
Euler: the mathematician.
Klara and Johann are fictional characters, as is the dialogue itself. The mathematical problem and the essential features of Euler’s solution are historically accurate.
KLARA: Just look at the map! Four areas of land and seven bridges. There must be a route that crosses every bridge exactly once.
JOHANN: We tried several routes yesterday, but we always ended up at a bridge we had already crossed. I think it is impossible.
KLARA: Just because we have not succeeded yet does not mean it is impossible. Perhaps we simply have not tried enough routes.
JOHANN: Or perhaps we could keep trying for the rest of our lives.
KLARA: Then let us ask someone who approaches problems differently! Professor Euler, do you think it is possible to cross all seven bridges without using any of them twice?
EULER: That is an interesting question. How have you tried to find the route so far?
KLARA: We walked through the city, drew maps and tested different possibilities.
JOHANN: We made many attempts and reached even more dead ends.
EULER: I would not examine every possible route. First, I would ask which details are genuinely important to the problem.
KLARA: Perhaps the lengths of the bridges? Or the distance between them?
EULER: Neither. The only thing that matters is which areas of land each bridge connects. Imagine replacing every area of land with a point and every bridge with a line.
JOHANN: So the whole city becomes just a few points and lines?
EULER: Exactly. Today, we would call those points vertices and the lines edges. Now let us count how many edges meet at each vertex.
KLARA: Five meet at one vertex, and three meet at each of the other three.
JOHANN: So all four numbers are odd. But why is that a problem?
EULER: Think about what happens when you arrive at an area of land by crossing a bridge. You must leave it by crossing another bridge. The bridges you use therefore form pairs: one brings you in and another takes you out.
KLARA: Except at the place where we begin and the place where we finish.
EULER: Correct. Only the starting and finishing points may have an odd number of bridges. Therefore, there can be no more than two vertices with an odd degree.
JOHANN: But here there are four.
EULER: That is why no route can cross all seven bridges exactly once.
KLARA: So we did not fail because we had not tried hard enough. We failed because such a route does not exist at all.
EULER: Precisely. Sometimes the most important result is not finding a solution but proving that the solution we are looking for cannot exist.
JOHANN: What if we moved or removed one of the bridges?
EULER: Then the degrees of the vertices would change, and the problem might become solvable. That would provide another interesting question to investigate.
KLARA: So even though we cannot complete one perfect walk across the seven bridges, something new has still emerged from the problem.
EULER: Yes. It has led to a new way of thinking in which the structure of the connections matters more than the physical appearance of the map.
After the dialogue, students can explore the following questions:
What do the vertices and edges represent in the story?
What is the degree of a vertex?
Why must the edges at an intermediate vertex form pairs?
How many odd-degree vertices are there in the Königsberg graph?
Why does this prove that the required route does not exist?
How could the bridge network be changed to make such a route possible?
Which elements of the dialogue are historical facts, and which were created by the AI or the editor of the script?
Students can also be given a map of the bridges and asked to create the corresponding graph independently. They can then add or remove a bridge, create new networks and investigate whether each new graph contains a route that uses every edge exactly once.
For students who require more support:
provide a shorter dialogue using simpler language;
give them a completed graph;
provide explanations of the terms vertex, edge and degree;
highlight the mathematical information in the script using different colours;
use a readers’ theatre format;
allow students to complete the follow-up questions in pairs.
For students who progress more quickly:
ask them to verify the statements in the story independently;
have them identify and correct inaccuracies produced by the AI;
ask them to write their own dialogue or an alternative ending;
have them formulate the general condition for the existence of an Eulerian trail;
ask them to design a graph with zero or two odd-degree vertices;
let them dramatise another event from the history of mathematics.
The following aspects can be considered when assessing the activity:
the accuracy of the mathematical content;
the appropriate use of mathematical terminology;
the verification of historical facts;
collaboration between the participants;
the clarity of the performance;
creative solutions;
critical evaluation of AI-generated content;
performance in the follow-up activities.
The method can also be used in other subjects. In science lessons, students can dramatise scientific discoveries. In history, they can explore important decisions and debates. In literature, they can create imagined conversations between authors or characters, while language lessons can use historical or everyday situations in the target language.
The dialogue can be:
performed live;
recorded as an audio drama or short video;
transformed into a comic strip;
supplemented with a narrator;
produced in a foreign language;
used in an Erasmus+ or other international project.
Artificial intelligence can quickly generate mathematical stories and dialogues, but the resulting text should not automatically be treated as reliable teaching material. Teachers and students must check the mathematical statements, historical information and any words attributed to real people.
The main value of the method lies not simply in the finished scene. Selecting the topic, writing an effective prompt, checking the response, performing the dialogue and exploring the mathematical problem together all form part of the learning process. In this way, artificial intelligence does not replace thinking but becomes a tool for creative, critical and collaborative learning.
Note: The opinions and positions expressed herein reflect the author's views only and do not necessarily reflect the official position of the European Union or the Tempus Public Foundation. The European Union and the funding authority cannot be held responsible for them.