The musical formula

Manjul Bhargava giving lecdem Maths and Music at Music Academy in Chennai on December 31, 2015. Photo: R. Ragu

Manjul Bhargava giving lecdem Maths and Music at Music Academy in Chennai on December 31, 2015. Photo: R. Ragu

In his lec-dem, Manjul Bhargava, Fields medallist and R. Brandon Fradd Professor of Mathematics at Princeton University, explained the connection between music, mathematics and Sanskrit poetry. Bhargava said phonetics, rhythm and intonations all have a scientific basis in Sanskrit.

In Sanskrit poetry, there are long and short syllables. The long lasts for two beats and short for one beat. In terms of music, there are two phrases, with one taking twice as long. The long phrase is called guru and the short one is called laghu.

Ancient poets were doing mathematics just by studying this simple set up. How many rhythms of say 8 beats of short (S) and long (L) syllables can you come up with? You can have LLLL, or LLSSL etc. Our ancient poets gave an ingenious way to get the general answer. Write down the numbers 1 and 2. Every subsequent number is obtained by adding the previous two. So you get a sequence like this: 1,2,3,5,8,13, 21, 34, 55, …

The nth number gives the total number of rhythms of ‘n’ beats. The eighth number in the sequence is 34. So for eight beats, there are 34 rhythms of longs and shorts.

Gujarati scholar Hemachandra gave these numbers in 1150 C.E., although we call them Fibonacci numbers, after the Italian mathematician who came up with the same sequence in 1202 C.E! Hemachandra’s successor Sarangadeva, author of Sangita Ratnakara , generalised the whole theory.

Coming to rhythms consisting of ‘n’ syllables, how many rhythms are there consisting of exactly ‘n’ syllables? The first syllable can be long or short and the same goes for all syllables up to the nth. So we always have a choice of 2. So 2x2x2x…= 2 n , and 2 n is the number of rhythms having n syllables.

This was described by Pingala (300 B.C.E) in a poem, in which he gives the answer 2 raised to the power of n. Pingala gave a solution for this general ‘n,’ in what he called a mountain of jewels — Meruprastara (see figure). As can be seen from the figure, in each row, every number is obtained by adding the two numbers immediately above it.


Entries in Meruprastra are called binomial coefficients. They are important in statistics, combinatorics and number theory. However, we refer to Meruprastara as Pascal’s triangle, although Pascal came 2000 years after Pingala!

So counting rhythms/meters having a fixed number of beats (matras) yields Hemachandra numbers.

Counting rhythms/meters having a fixed number of syllables yields Pingala’s Meruprasatara. The two constructions are related in a beautiful way. You can think of the number of rhythms having ‘n’ beats and how many syllables you can use to make n beats and you’ll see the relation. Now what happens if there are three types of syllables - short (1 beat), long (2 beats) and extra long (3 beats)? You get ‘Tremachandra’ numbers and you get a three dimensional Meruprastara. These numbers decide how many rhythms with ‘n’ beats, having a certain number of shorts, longs and extra longs you can get. In mathematics, these are called trinomial coefficients.

Talking about mnemonic devices, which are useful to both musicians and poets, Bhargava elaborated on a nonsense word – yamAtarAjabhAnasalagAm, which has to do with the sequence of shorts and longs.

ya mA ta rA ja bhA na sa la gAm

0 1 1 1 0 1 0 0 0 1

In this sequence, each consecutive triplet of syllables has a distinct pattern and occurs only once. And yamAtarAjabhAnasalagAm displays all 8 possible patterns. Given yamAtarAjabhAnasalagAm, ‘ya’ is 011, because the triplet that starts with ‘ya’ is ya mA ta.

The purpose of this word was to preserve the integrity of rhythmic compositions. Poets would give the name of the rhythm in a verse, and embed in the poem the code for the rhythm. Bhargava gave two examples:

suryaAsvair yadi mah sajau satatagAh shArdUlavikrIditam. Here we have the name of the metre — ShardUla, and the property ma sa ja sa ta ta ga. So in terms of yamAtarAjabhAnasalagAm, we get : 111 001 010 001 110 110 1 (LLL/SSL/SLS/SSL/LLS/LLS/L). The metre BhujangaprayAta is given in BhujangaprayAtam caturbhiryakAraih. The verse specifies four ‘ya’s. So in terms of yamAtarAjabhAnasalagAm, we get 011 011 011 011.

Bhargava concluded the lecture with the observation that there may be students interested in the arts, but not in mathematics per se. He hopes to get them interested in mathematics through poetry and music.

Our code of editorial values

This article is closed for comments.
Please Email the Editor

Printable version | May 20, 2022 3:03:38 pm | https://www.thehindu.com/features/friday-review/the-musical-formula/article14090140.ece