It's not often you see an eminent professor reduced to zero on stage and then stuffed into a bag. But this is exactly what happened to Marcus du Sautoy, Simonyi Professor for the Public Understanding of Science and a Professor of Mathematics at Oxford, at the Science Museum last week — and by means of a mathematical argument at that. Only du Sautoy wasn't being himself of course. He was playing the role of X in the Twin Prime production X&Y.

Victoria Gould and Marcus du Sautoy.

X&Y is a two-hander featuring Victoria Gould alongside du Sautoy. It's a story of contrasting world views. X lives life through mathematical abstraction, lonely but happily confined to a cube he never leaves. Y has spent her life exploring their known universe, travelling through many, many cubes identical to X's and hoping with each that she'll finally find an exit and answer to the universal question: "Is there more than this?" When they meet they begin to argue about the shape of the world they live in: is the line of cubes infinite? Does infinity even exist? Can you create it in 16 seconds? From here the plot unfolds into a story of mathematics, theatre and friendship.

This is not the first time that du Sautoy and Gould have worked together. A few years ago they helped develop A disappearing number, a play about the remarkable collaboration between the Cambridge mathematician G.H. Hardy and the Indian genius Srinivasa Ramanujan. It was a play about mathematicians, but inspired du Sautoy and Gould, who also has a background in maths, to do a play about mathematics itself. This is not as strange as it sounds. As they point out (you can listen to our interview in this podcast), theatre and mathematics are both imagined things that need to be consistent to work. And while mathematics is abstract it is also physical — there are patterns, rhythms, forms and shapes — and this can be conveyed on stage.

You can listen to an interview with Victoria Gould, Marcus du Sautoy and Dermot Keany in our podcast.

But what du Sautoy and Gould have produced, under the direction of Dermot Keany, isn't abstract physical theatre. The dialogue is funny and sharp, there's a story being told which, with a couple of twists, explores the common ground of maths and theatre, and the friendship between two very different people. If you know maths the concepts will be familiar. If you don't, some jokes may be lost on you ("that's a very small epsilon"), but the play works on this level too, hinting at ideas, exploiting intuition and in places even explaining. If you are familiar with theatre, you might be surprised by the comparisons the play draws, such as maths and theatre both being axiomatic in nature: relying on a few fundamental rules. The play reveals one of mathematics' best kept secrets: that it's as much about creativity and imagination as it's about sticking to rules. And while abstraction can preclude the obvious (du Sautoy's range of very puzzled faces is impressive) it also allows you to invent new worlds.

The play benefits from simple yet striking stage design: a glowing cube hovering in the darkness, limited props used to full effect and the rest created thanks to clever use of mime and the audience's imagination. There is even a bit of audience involvement in this show. It thrilled this particular audience which, it being a matinée performance, contained a large proportion of teenagers. And one thing's for sure: if a play about maths can hold the attention of teenagers for over an hour eliciting shrieks, laughs and sighs, then it must be doing something right.

You can catch X&Y at the Manchester Science Festival from Wednesday 30 October to Sunday 3 November.