How maths turned music into medicine
By Vaida Bankauskaite
From childhood, two influences shaped Elaine Chew’s world: mathematics and music. Her father, a mathematics professor, revealed the hidden order in everyday life -whether modelling the most efficient way to arrange furniture during a move or treating permutations on the Rubik’s Cube as a problem in algebra. For Chew, 'mathematics was just a way of thinking, a way of living.’
Elaine Chew was also a pianist. She studied piano from a young age but did not like repetitive practice; instead, she looked for patterns, predicting sequences to minimise repetition. A turning point came during her father’s sabbatical in Vancouver, where six months without a piano forced her to sight-read all the music she could find during Wednesday afternoons at the school piano. When she finally returned to piano lessons, her teacher was astonished by her progress. That was when she understood that music was not just a skill but part of who she was.
Guided by her father’s pragmatism, she studied mathematical modelling, computational mathematics, and statistics. In her graduate programme, she specialised in operations research -a field that applies mathematical models to real-world problems.
At Stanford, she enrolled in the mathematical and computational science programme offered across four departments (mathematics, statistics, operations researcxh, computer science) while concurrently pursuing studies in music performance. At MIT, where she pursued PhD studies in operations research, she was able to design an interdisciplinary programme while serving as an affiliated artis of music and theatre arts. She describes herself as ‘lucky to work with people who were breaking boundaries.’ They were taking operations research into new fields, and she could experience this first-hand. She worked in several areas, including non-linear optimisation, computational biology (at the start of the Human Genome Project) and computational finance. Yet none of these fields truly resonated - until she met Jeanne Bamberger, a pioneer in AI and music. Bamberger connected Chew with researchers in Edinburgh who were using algorithms to analyse tonality, the harmonic foundation of musical keys. She immediately saw how their models could be refined and decided to merge mathematics and music.
A new kind of career
Turning this passion into a career was the next challenge. In the 1990s, ‘mathematical musician’ was not a recognised profession - but the early digital music revolution changed that. The emerging field of Music Information Retrieval (MIR), which powers platforms such as Spotify and Shazam, needed exactly the kind of algorithms she was developing. She joined the University of Southern California’s Viterbi School of Engineering and has since spent over 25 years at the intersection of music and computation in Los Angeles, London, and Paris.
Her key contribution was transforming Euler’s Tonnetz - an 18th-century 2D model of musical pitches - into a 3D geometric space called the Spiral Array. Unlike traditional approaches, where musical notes are treated as nodes and the edges between them merely show how they harmonise, this 3D model lets algorithms move freely through musical possibilities, making it easier to follow the harmonies and trace how harmonic tension rises and falls in real time.
By shaping the Tonnetz into a 3D form, this model can measure how harmonies clash or blend, support the creation of new music, and help AI improvise while staying in key. It brings together exact maths and creative flexibility, opening up possibilities for teaching, making music, and exploring how we actually experience sound. This showed how musical structure shapes listeners’ perceptions and emotions -a thread that would later connect to her ERC-funded work in medicine.
Mapping musical space
Little did she know that her own heart - prone to erratic rhythms since childhood - would one day become the bridge between her two passions and medicine. Since childhood, she had lived with cardiac arrhythmias: episodes of supraventricular tachycardia where her heart rate would abruptly double, then reset. Treatment options were limited at that time, and the risks outweighed the benefits, so she learned to manage the condition. She finally underwent ablation, which seemed to resolve the issue—until stress-induced atrial fibrillation struck, which was again ablated.
This experience led her to a profound question: could the same principles that she had spent a lifetime studying in music and in maths also help us understand -and even treat - cardiac rhythm? The patterns that had fascinated her since childhood were all part of the same fundamental quest: to model the unseen structures that shape our world.
Today, her work weaves together music, mathematics, and medicine, not as separate disciplines but as variations on a single theme. The challenge -and the beauty - lies in finding the patterns that connect them.

© EC
How music affects the body
Modelling how music affects health requires a delicate balance - precise mathematical rules and human adaptability. Musicians naturally adjust timing and tension, and what Chew calls ‘tipping points’, to create emotional and physiological responses. A singer might hold a note longer or shorter, stretch a phrase or delay a beat. While these techniques can be defined mathematically (for example, as rhythmic delays), their real-world impact depends on musicians’ real-time decisions. This spontaneity is hard to measure but crucial to music’s power over our bodies and emotions.
The stakes extend beyond theory. With stress-related conditions like hypertension rising, music offers therapeutic potential - but only if we can model both its structured patterns and human unpredictability. The goal would be to create adaptive systems that adjust to listeners’ changing states, just as performers respond to an audience. In turn, these systems could lead to personalised music interventions.
Chew’s ERC-funded research reveals that music interacts directly with the autonomic nervous system - the body’s control centre for heart rate and blood pressure. A striking discovery is that people with hypertension, affecting a third of adults worldwide, show weaker cardiovascular responses to music compared to healthy individuals. Music can therefore support diagnosis, as algorithms can pick up subtle autonomic nervous system abnormalities that might otherwise go unnoticed. According to Chew, music is like ‘a gentle exercise, which is good for us.’
Towards adaptive music medicine
However, challenges remain. Even with precise mathematical models of musical structures, their effects vary due to individual differences, context (for example, setting and environmental influences), and causality (for example, whether music’s effects are direct or mediated by emotion or memory). The way forward lies in adaptive models that predict physiological responses to musical elements, adjust in real time using wearable data such as heart rate variability, and personalise music for conditions like hypertension. This requires collaboration between mathematicians, musicians, and medics to merge scientific and clinical precision with artistic flexibility—a frontier where music becomes a tool for both diagnosis and healing.
Their approach to autonomic traits involves selecting music based on its structural patterns rather than genre or composer. By matching these structures to likely physiological responses, they can suggest music to achieve specific effects. However, this needs long-term study; while acute effects may be observable, the aim is lasting benefits, such as managing hypertension.
With support from the ERC, projects like Elaine Chew’s are turning these ideas into tools that one day could deliver personalised ‘music medicine’ alongside conventional cardiovascular care.

Biography
Elaine Chew is Professor/Founder of the Digital Music Theranostics Lab at King’s College London’s School of Biomedical Engineering & Imaging Sciences and Department of Engineering. She studied piano (FTCL), music performance and mathematical/computational sciences (BAS Stanford) and operations research (SM, PhD MIT). A pioneer in music information research, she is forging new paths at the intersection of MIR and cardiovascular science. Her research models structures in music and physiological (cardiovascular) signals. She recently won the Best Innovation in AI and Digital Medicine in Clinical Electrophysiology award from the European Heart Rhythm Association.