
HWS News
9 July 2025 • Research The Mathematics of Music
HWS students explore the science behind sound.
Why does the simple lullaby “Twinkle, Twinkle, Little Star” soothe so many children to sleep? A team of Hobart and William Smith students believes the answer lies not just in melody, but in mathematics.
As part of their Mathematics Capstone Course, taught by Associate Professor of Mathematics and Computer Science Jocelyn Bell, Sayf Elhawary ’25, Djeneba Diop ’25, Ryan Pero ’25, Nickolas Provenzano ’26 and Van Tran ’25 explored the intricate relationship between numbers and notes. During HWS Day, they presented their study, The Mathematics of Music, revealing how music’s emotional resonance is often powered by formulas, frequencies and patterns.
Provenzano, a double major in music and mathematics, opened the presentation with a demonstration on the piano. Using notes and scales, he illustrated how music theory is built on mathematical intervals such as tones, semitones, and even the Fourier series, a trigonometric tool used to break down sound waves. “Music expresses our emotional connection to the world,” he says. “Putting mathematical reasoning behind it introduces new ways to explore those connections.”
Diop, also a mathematics major with a French minor, brought visual clarity to the group’s ideas using clock diagrams and the pitch class method. These tools assign numerical values to musical notes, mapping out harmonic intervals and revealing the math behind tension and resolution in music. “When you understand the formulas behind music, it becomes more accessible,” she explains. “It’s no longer about talent—it’s about patterns.”
The historical roots of this relationship were explored by Pero, who shared the story of Pythagoras discovering musical intervals through ratios. By demonstrating how a simple ratio like 2:1 creates an octave, Pero showed how ancient theories still inform modern tuning systems. “As someone preparing to teach secondary math, I see so much potential in using music to engage students in learning,” he says.
Tran, majoring in economics and mathematics, dove into the science of waveforms including Sine, Square, Triangle and Sawtooth, and examined how these shapes determine what we hear. “Analyzing waveforms gives musicians a visual language for assessing sound,” she notes, using “Twinkle, Twinkle” as a case study in how mathematical patterns guide pitch and tone.
Elhawary, a double major in computer science and mathematics, took the connection even further, demonstrating how music can be generated using mathematical code. With the help of Mathematica software, he showed how to recreate melodies by using formulas and trigonometry to shape sound. “Math lets us build music from scratch—whether it’s a guitar riff, a symphony or a streaming file,” he says. “It connects science and art in ways that deepen our understanding of both.”
For Professor Bell, the project was a highlight of the semester. “This group complemented each other beautifully,” she says. “I told them from the beginning that this course was an experiment, and they took full advantage of that freedom. They exceeded my expectations, and I’m incredibly proud of what they created.”
Top: Djeneba Diop '25 introduces the clock diagram and the pitch class method to an audience, surrounded by her co-presenters, (L to R) Ryan Pero '25, Nickolas Provenzano '26, Sayf Elhawary '25 and Van Tran '25.