Dr Ciarán Crilly (PhD 2008) of UCD’s School of Music

Music and Maths

What’s the relationship? Patterns, numbers, geometry and counting, writes Dr Ciarán Crilly (PhD 2008) of UCD’s School of Music

Have you ever wondered why the seemingly distinct disciplines of mathematics and music are so often spoken of in the same breath? Or why it is often assumed that a good musician must also be adept at maths? Perhaps the common denominator is that the theoretical foundation of each realm is essentially one and the same. Numbers and numerical systems are relied upon in the understanding, execution and creation of musical works. Even at its most basic level, the performance of notated music involves a sufficient grasp of proportionately related values of duration, and the ability to translate a sequence of ordered pitches into sound. To compose music, the relationships become even more sophisticated, as one must consider how these sounds might work in combination.

The connection permeates the entirety of our mappable musical history. The earliest known musical instrument is a three-holed flute fashioned from an animal bone that was discovered in Slovenia in 1995, and estimated to be between 50,000 and 60,000 years old. Even an instrument as basic as this demonstrates an innate understanding of links between measurement and pitch by placement of holes drilled into the bone.

We can best elucidate the multiple parallels by dividing the building blocks of music into three distinct categories: rhythm, pitch, and harmony.

From the perspective of pure acoustics, pitch is all about frequency levels in sound waves.”


A rhythm is a combination of differing durations in a phrase, each connected to another by numeric proportions, with rhythmic symbols acting as a visual shorthand for numbers. If you imagine clicking your fingers or clapping along to a song, this process suggests a basic unit of rhythm. Most commonly, this will be represented by a crotchet (♩), and the most prevalent arrangement of crotchets is ‘four-in-a-bar’. Imagine a 1–2–3–4 count in that is often given by the drummer in a band, sometimes made just by striking the drumsticks together.

When notated, each bar conforms to a regular number of beats indicated by a time signature comprising two numbers. For example, in the time signature 4/4, the lower number tells us the type of beat (crotchet) and the upper one the number of beats (four). Thus, 4/4 means four crotchet beats in a bar. Other note values are proportionately related to our basic unit of pulse. A crotchet is twice as long as a quaver, four times as long as a semiquaver, and half as long as a minim.

From the perspective of pure acoustics, pitch is all about frequency levels in sound waves. This is most easily conceived as the rate of vibrations produced by a bowed or plucked string: the higher the number of vibrations per second, the higher the frequency, and in turn the pitch. A sequence of rising numbered pitches delivers a musical scale, with the first– second–third corresponding to the notes labelled as do–re–mi, and so on.

Here is a rising C major scale with note names in place of numbers or the do system, from middle C to the C an octave (eight notes) above.

We encounter harmony when pitches are combined one on top of another, and these may be considered consonant when the combinations are pleasing, or dissonant when they communicate tension. The primary harmonic unit combines the first, third and fifth degrees of the do–re–mi scale in a triad, with the example below being constructed upon the note C. The lowest note is C, with E a third above it and G a fifth below.

The most fascinating aspect of this consonant arrangement of notes is how they are found in the natural world in the form of the harmonic series. This is the sequence of notes that sounds almost imperceptibly above the so-called ‘fundamental’ note when, for example, you play an open string on a cello.

A harmonic series on the note C – the lowest string on the cello – yields another C an octave above, then a further fifth (G), third (E), third (G), and so on, with the intervals becoming increasingly smaller. The beginning of this natural series presents us with the notes of our basic major triad (C–E–G), and thus a gateway into a universal harmonic vocabulary.

Music + Maths


In my own work as a conductor, the numeric and geometric are critical to performance preparation. When teaching conducting to students, I regularly emphasise that the unadorned text of music – the score – is akin to a book in which there are no paragraphs, no sentences, no phrases. This is underlined by a statement by the influential 20th century composer Arnold Schoenberg, who wrote: “Without organisation, music would be an amorphous mass, as unintelligible as an essay without punctuation, or as disconnected as a conversation that leaps purposelessly from one subject to another.”

Structural analysis enables the music to become a readable narrative rather than a sonic stream of consciousness. The overall architecture often conforms, if loosely, to prevalent templates, while the negotiation of musical statements over time requires keen anticipation of the journey ahead. You cannot adequately commence a phrase without knowing how long it will last; think of this in terms of how deeplyyou need to fill your lungs in order to effectively sing a particularly short or long line of melody.

All my performance scores contain extensive markings, with the most crucial being the numbers that indicate phrase structure, also called the hypermetre. Metre tells us the number (and type) of beats in the bar, hypermetre the number of bars in a phrase. Analysis also situates the phrase within a larger formal framework, and that sense of geography means you are better equipped to focus on the potential vagaries of the live concert environment. At this point, it can be a little more unpredictable.

In my own work as a conductor, the numeric and geometric are critical to performance preparation. “

For the singer in a choir or the instrumentalist in an orchestra, counting is a critical activity. Most classical works from the 17th to 19th century involve a regular recurring pulse, like three or four in a bar. But as we enter the 20th century, variations on this become more frequent. The pivotal piece that incorporates rapidly changing metres is Igor Stravinsky’s The Rite of Spring, first performed in Paris in 1913, and famously inspiring an audience riot. In this score, it is common for extended sequences of bars with contrasting metres: four crotchets in a bar (4/4) might be followed by three in a bar (3/4), sometimes three quavers (3/8), or even five semiquavers (5/16). One particularly notorious example is a single bar comprising eleven crotchets (11/4). Such complexity demands the utmost level of concentration – and non-stop counting.

But even in music of greater metric consistency, counting remains vital. This is especially true when not playing and you are counting the empty bars until you have to begin again. Let us consider one legendary example. If you are the tuba player in the famous ‘Largo’ from Dvořák’s New World Symphony, you play for five bars, then count – very slowly – for 114 bars, play for another four bars, and you are done. As a conductor, I am always counting, if subconsciously, and it would be expected that I give the tuba player a decisive nod at this crucial moment. But as a player, you may not want to take that chance, so you methodically count the 114 bars of 4/4 – 456 beats in total.


It was Pythagoras, the Greek philosopher and mathematician of the sixth century BCE, who is often credited with discovery of proportional relationships in music by way of an undoubtedly apocryphal tale about a blacksmith striking anvils with hammers of contrasting dimensions. Aristotle observed that the Pythagoreans “believed the entire vault of heaven to be harmony and numbers”, and their underlying principles endured for centuries. Music was regarded as a subject to be studied alongside arithmetic, geometry and astronomy in dominant models of classical education. Increasingly, it began to assert itself more as art form rather than a science, but mathematical attributes persisted in works by the greatest composers.

J.S. Bach in particular has been associated with mathematical sleights of hand in his music. Bach mastered and refined technical aspects of the fugue, a form of counterpoint that treats musical ideas in an almost mechanistic way. Fugues often incorporate mathematical ploys such as inversions and retrogrades, which are both types of mirroring. Inversions flip the theme on a horizontal axis, while retrogrades are the musical equivalent of palindromes.

His unfinished masterpiece The Art of Fugue employs the following principal theme, commencing with a rising fifth, then a descending third, another descending third, and so on.

A later movement, ‘Contrapunctus IV’, begins with an inversion of this theme: a descending fifth, followed by an ascending third, another ascending third, and so on.

The most famous instance of a retrograde in Bach’s music is the crab canon (canon canzicrans) from The Musical Offering of 1747. This is an 18-bar theme that proceeds as normal before being played backwards in its entirety. Both versions of the theme can then be played simultaneously. This has been compared with the mathematical concept of the Möbius Strip (see below) in which two ends connect in such a way that the strip shall only possess one side.

A  twelve-tone composition matrix by Arnold Schoenberg.
A twelve-tone composition matrix by Arnold Schoenberg.

Similar strategies would be popularised in the early 20th century, when numerical and geometric matters once again seemed to take centre stage. Maybe the most mathematical of trends was pursued by the Second Viennese School consisting of the aforementioned Arnold Schoenberg and his disciples. Schoenberg frequently employed inversions and retrogrades, while his student Alban Berg placed a large-scale palindrome at the centre of his opera Lulu.

But these tendencies pale in comparison to the mathematical rigour of a compositional system that Schoenberg pioneered in the 1920s. This system, called dodecaphony or twelve-tone technique, allowed each of the twelve notes in the chromatic scale – all the white and black notes within an octave range on the piano keyboard – to have equal weighting. While classical works had traditionally been subject to the gravitational pull of a central pitch, Schoenberg’s democratisation of the twelve individual pitches generated a music that seemed to be suspended in mid-air. “In this space,” he wrote, “there is no absolute down, no right or left, forward or backward.” For many, this was the quintessential sound of musical Modernism, equivalent to the Joycean novel in literature, or the abstract canvases of Kandinsky, Malevich, Kupka, and others.

An intriguing addendum to Schoenberg’s story is that he was afflicted with triskaidekaphobia, an irrational fear of the number 13. Schoenberg refused to use it as a bar number in his own manuscripts, adopting 12A as a substitute. He also once refused to rent a house with the dreaded number on account of this condition, and even respelled the title of his opera Moses und Aron so it only contained 12 letters, not 13 as the correct spelling of Aaron would have entailed. He became superstitious about dying at an age that constitutes a multiple of 13 but managed to avoid this fate; he actually died at the age of 76 – on Friday 13 July 1951. His final utterance, if reports are to be believed, was simply: “Harmony.” ■