The Katapayadi Number System

By Image: Gallery: archive copy, Public Domain, Link

What’s common between the first verse of Mahabharata and the last verse of Mēlputtūr Nārāyaṇa Bhaṭṭatiri’s Narayaneeyam written in 1586 CE.?

The first verse of adi parva reads

नारायणं नमस्कृत्य नरं चैव नरॊत्तमम देवीं सरस्वतीं चैव ततॊ जयम उदीरयेत

(” Om ! Having bowed to Narãyana and Nara, the most exalted male being, and also to the Goddess Saraswati, must the word Jaya be uttered)

Mēlputtūr Nārāyaṇa Bhaṭṭatiri’s Narayaneeyam ends with the words ayur- ̄arogya-saukhyam. This wishes long life, health, and happiness to the readers of his devotional poem.

The words jayam and ayur- ̄arogya-saukhyam have two properties.

  1. Both have proper meanings in the context of the sentence used (as in, they are not gibberish words.) This matters as we go into the details.
  2. The second property is not well known. Both those words encode a number that has a deeper meaning.

In this system of encoding, jaya represents 18 and ayur- ̄arogya-saukhyam 17,12,210. Counting those many days from Kali Yuga, gives the date as 8th December 1586, the completion date of Narayaneeyam.

This article looks at this style of representing numbers using meaningful words.

Katapayadi Number System

Process-wise, the encoding is simple. Each Samskritam consonant is given a number. Hence the algorithm is as simple as reading it from right to left.

encoding of jaya in katapayadi system

The letter ja is assigned the number 8 and ya, 1. Reading from right to left, it becomes 18.

Why did Vyasa pick on the number 18 and encode it as jaya? Why did he call Mahābhārata as jaya. Mahābhārata has 18 parvas. Gita has 18 chapters. The war was fought for 18 days. There were 18 akshauhini’s in the war. Thus jaya was not a random selection.

Here is the full table of the consonant to number assignment.

ka क കkha ख ഖ
ga ग ഗ
gha घ ഘ
nga ङ ങ
ca च ച
cha छ ഛ
ja ज ജ
jha झ ഝ
nya ञ ഞ
ṭa ट ട
ṭha ठ ഠ
ḍa ड ഡ
ḍha ढ ഢ
ṇa ण ണ
ta त ത
tha थ
da द ദ
dha ध ധ
na न ന
pa प പ
pha फ ഫ
ba ब ബ
bha भ ഭ
ma म മ
ya य യ
ra र ര
la ल ല
va व വ
śha श ശ
sha ष ഷ
sa स സ
ha ह ഹ
katapayadi table

Look at the letters which represent the number 1. ka, ta, pa, ya gives it the name katapayadi (adi in Samskritam means beginning). Vowels meant 0, and vowels followed by a consonant had no value. In the case of compound letters, the value of the last letter was used.

In its land of origin, Kerala, it was known by a different name Paralpperu where paral means seashell and peru name” (astronomical calculations were done using seashells).

Here is another example. The year 2010 is expressed as natanara.

This is because


If you read this backward, you get 2010. An important point is that the letters are not chosen randomly. They mean something. In this case, natanara means “a man (nara) who is an actor ( nata)”. Since there are many possible letters for each number, the mathematician can create a meaningful word from the numbers.

Similarly, ayur- ̄arogya-saukhyam represents 17,12,210 to represent the date of 8 December 1586. Why was the epoch chosen as the beginning of Kali Yuga? It was the popular way of dating events called the Kali-ahargana. Kali-yuga started at sunrise on Friday, 18 February 3102 BCE, and computing the number of days from then was common in planetary calculations.

The fact that Bhaṭṭatiri used this system is not surprising. He was a student of Achyuta Pisharati, a member of the Hindu school of Mathematics from Kerala. This is also an example where it was used in non-scientific work.

Thus the katapayadi system allows the author to represent large numbers using easy-to-remember words. It also has the flexibility to let the author pick an appropriate word for the context and one that fits the meter if it’s a poem.

During the time of Aryabhatta, there were at least three methods of writing numbers. Mathematicians like Varahamihira and Bhaskaracharya used a system called the bhoot samkhya. Aryabhatta, though, invented his own system, which was a new contribution.(The Aryabhata Number System)

Katapayadi number system was primarily used by Hindu mathematicians and astronomers in Kerala. The fact that numbers can be converted to meaningful words that can be strung together helped Malayali mathematicians perform complicated calculations from memory. They computed eclipses, memorized the calculations using words, and committed to memory. This way, there was no dependency on books or tables. This system of memorization was prevalent till around 100 years back.

The book Moonwalking with Einstein talks about various techniques used by the ancients to memorize data. One of the techniques was called memory palace. The katapayadi system looks simpler as the data to commit to memory is that table.

Origins and Spread

If you ask, who started this number system, there are many answers. It’s possible that Vararuchi wrote them in Candra-vakyas in the fourth century. Aryabahata I, who lived 100 years after, was aware of it. It was then popularized in 683 CE in Kerala by Haridatta. ́Sankaranarayana ( 825–900 CE) mentions this name in his commentary on the Laghubhaskarıya of Bhaskara I. Subhash Kak argues that the the system is much older

Though the system originated in Kerala, it spread around India. Though it was well known in the northern part of India, it was not widely used. It spread from Kerala to Tamil Nadu and Pondicherry. That came due to their contact with Nilakanta Somayaji, another mathematician from the Madhava school. In Karnataka, Jains used it in their writing. Orissa has manuscripts that show usage of this system. Aryabhata II used this in the 10th century with some modifications. Bhaskara II used both Bhootsamkya system and Katapayadi system in his works.

This system was not used just in astronomy and mathematics but also in classifying music. For example, the 72 ragas were classified by musicologist Muddu Venkata Makki using the first two letters to indicate the serial number of the Melakartharagam. Thus Kanakangı shows the serial number 1, Rupavatı 12, Sanmukhapriya 56, or Rasikapriya 72.

You are too late if you think this system would help write something like Da Vinci Code. The National-Treasure-in-India script was done a few hundred years back. Ramacandra Vajapeyin, who lived in Uttar Pradesh, used this technique to forecast a dispute or war victory. His brother wrote a text to draw magic squares for therapeutic purposes.

Forgotten Mathematicians

I learned about the Hindu school of Mathematics (as opposed to the Jain school) from Kerala by reading A Passage to Infinity by George Gheverghese Joseph. Though there were few mathematicians in Kerala in the 9th, 12th, and 13th centuries, what is today called the Kerala School started with Madhava, who came from near modern-day Irinjalakuda. His achievements were phenomenal; they included calculating the exact position of the moon and what is now known as the Gregory series for the arctangent, Leibniz series for the pi and Newton power series for sine and cosine with great accuracy.

Some of these techniques were forgotten, but thanks to a renewed interest in Samskritam, there is a revival of knowledge. This whole article was triggered when I read the first chapter of my Samskrita Bharati book on sandhis which mentioned the katapayadi system.


  1. If are you curious to know why Mahābhārata was called jaya, then read this article.


  1. Vijayalekshmy M. “‘KATAPAYADI’ SYSTEM — A CONTRIBUTION OF MEDIEVAL KERALA TO ASTRONOMY AND MATHEMATICS.” Proceedings of the Indian History Congress, vol. 69, 2008, pp. 442–46, Accessed 7 May 2022.
  2. Anusha, R., et al. “Coding the Encoded: Automatic Decryption of KaTapayAdi and AryabhaTa’s Systems of Numeration.” Current Science, vol. 112, no. 3, 2017, pp. 588–91, Accessed 7 May 2022.
  3. Kak, Subhash. “INDIAN BINARY NUMBERS AND THE KAṬAPAYĀDI NOTATION.” Annals of the Bhandarkar Oriental Research Institute, vol. 81, no. 1/4, 2000, pp. 269–72, Accessed 7 May 2022.
  4. Iyer, P. R. Chidambara. “REVELATIONS OF THE FIRST STANZA OF THE MAHĀBHĀRATA.” Annals of the Bhandarkar Oriental Research Institute, vol. 27, no. 1/2, 1946, pp. 83–101, Accessed 7 May 2022.
  5. A. V. Raman, “The Katapayadi formula and the modern hashing technique,” in IEEE Annals of the History of Computing, vol. 19, no. 4, pp. 49-52, Oct.-Dec. 1997, doi: 10.1109/85.627900.

The Origin of Onam

Boat Race for Onam via WikiCommons

The popular narrative of Onam goes like this. There used to be a king who ruled Kerala called Mahabali. During his time — according to a popular saying in Malayalam — there was unity among people, who were honest and all around prosperity. Consumed by jealousy, Indra approached Vishnu and requested him to remove Mahabali. Vishnu took the Vamana avatar and asked Mahabali for three feet of land.

The charitable king agreed and Vamana, who was a little boy, grew to a gigantic form. With his one feet, he measured the earth. With the next he measured the entire universe. Mahabali realized who he was dealing with and offered his head for the third foot of land. Vamana placed his foot on the king’s head and pushed him to paataal. Before leaving, the king asked for one boon, — to visit his people once a year — which was granted. Onam is the time when Mahabali visits Malayalis

By Raja Ravi Varma

If you hear this version, Mahabali is a martyr and Vishnu is a villain. Why on earth would Vishnu take an avatar to get rid of someone who had all the noble values? Now you can add the liberal, subaltern flavor to this. Vamana being the avatar of Vishnu was a savarna, who pushed a dalit down. This of course is a perfect example of brahminical patriarchy. There is even an Aryan Invasion version of Onam. Something seems to be incorrect here.

What is the truth as per our scriptures though? In fact, Parikshit had the same question and he asked it to Shukracharya. To know the truth behind this literary conceit, you just need to read Bhagavatam.

Let’s look at the sequence of avatars. In the list Vamana comes after Parasurama. This may not be a well know fact outside Kerala, but Parasurama is credited with the creation of Kerala. It is said that when he threw his axe and land arose from the sea. So if the Mahabali event happened earlier with an earlier avatar, then he obviously was not in the land we call Kerala.

For the next point, we need to go into the details of devas and asuras. The devas and asuras are children born of the same father. Kashyapa Prajapati had children with his wife Aditi and Diti. Though they were born of the same father, the children had different natures. The children of Aditi had more sattva in them, while the the children of Diti turned out to be asuras.

We all know the story of Prahlad who was the son of the erasure king Hiranyakashipu. Prahlad had a son named Virochana and Mahabali was his son. During his youth, Bali went for a war with Indra and lost his life, but the Asura guru Shukracharya revived him back to life. Shukracharya wanted his disciples to vanquish the devas. Bali wanted his revenge.

Onam Feast By Rohan S on Flickr

This was a time when Vishnu stood back. He had noticed the arrogance of the devas and wanted to teach them a lesson. Shukracharya had noticed this as well. That was the opportune moment for him. When the forces of Shukracharya and Bali were combined, the asura strength increased. Bali attacked Indra and defeated him. Bali then following Shukracharya’s instructions, ruled the devaloka as well.

Even when he was without a throne and was wandering around, Indra did not approach Vishnu and ask for his help in making Bali disappear. Who approached Vishnu and triggered the Vamana avatar?

That was Aditi. Seeing the sad state of her son, she approached her husband Kashyapa, who advised her to perform a vrata. Pleased with her vrata, Vishnu appeared before her. Aditi explained the homelessness of her son and pleaded with him to do something. Seeing her hard austerities and heart felt plea, Vishnu promised to find a solution.

Thus on a shravan month, on the Abhijit muhurta, Vamana was born. Mahabali was performing a yaga on the banks of river Narmada (not in Kerala), when Vamana appeared there. On asking why the child came there, Vamana said that he came for a dana of three feet of land. Hearing this, Bali ridiculed him, but Vamana did not change his request. Shukracharya, immediately realized who the boy was and asked Bali to withdraw his pledge to fulfill the request. When Shukracharya told him who the boy was, Bali realized that he was the same person who protected his grand father Prahlad.

To be ignorant of what occurred before you were born is to remain always a child. Prahlad had advised Bali to rule based on dharma, but with his typical arrogance he responded back that he was not afraid of anyone. Prahlad warned him that one day Maha Vishnu would kill him, but Bali told him that the rakshasas were powerful than Vishnu. Even a person like Prahlad could not take this mindless self-righteous posturing anymore. He cursed his grandson that he would lose his kingdom and all his prosperity. When Bali asked for forgiveness, Prahlad asked him to take refuge in Vishnu.

Snobbishness can sometimes be entertaining, other times, it can destroy your life. When Shukracharya found that Vamana was not listening to him, he cursed the king as well. This guru-sapam, sealed his fate. The king went and washed Vamana’s feet in preparation for his dana. Seeing this some of his soldiers tried to attack Vamana. Bali stopped them. He said, the same god, who caused the destruction of the devas and helped with our victory is now doing the opposite. Please be calm. Thus Bali himself did not have an issue with what was going to happen.

When Vishnu was about to keep his feet on Bali’s head for the third boon, Prahlada also appeared there. Seeing him, Vishnu was happy. Prahlada pleaded on behalf of Bali to Vishnu. Vishnu then promised to give Bali something which was impossible for devas to attain. He blessed Bali to live in a place called suthala (made by Vishwakarma) with all the pleasures of life. Vishnu also agreed to protect Bali’s family and the boon to see the Lord whenever he wanted.

“According to Vedic texts, there are 14 worlds in the universe – seven upper worlds and seven subterranean ones. Atalam, Vitalam, Sutalam, Tala-Talam, Rasa-Talam, Maha-Talam, and Pathalam are the seven lower worlds, all of which have been described in detail in the Puranas.

Of these, Pathalam is the lowest world inhabited by Nagas, the serpent people and is said to be a dreaded place. Sutalam, on the other hand, is considered by the asuras as equivalent to or even more desirable than ‘swargaloka’.

Revisiting the Onam myth

As Bali prepared to go to suthalam, he asked Vishnu to bless him with his feet. To satisfy Bali, Maha Vishnu kept his right feet on Bali’s head and blessed him. After Bali went to suthalam, the Indra was returned to power.

The part of Bali going to suthalam instead of paatalam has been lost. Even if Bali went to suthalam, he can still come to visit his subjects once a year.

Thrikkakarayappan by Ramesh NG on Flickr

But here is an interesting bit. With the false narrative that is going on, one would think that it is only Mahabali who is celebrated and Malayalis dislike Vamana. But there is a tradition where we keep two banana leaves and two seats and serve feast on them. This is for both Maha Vishnu and Mahabali. Also, one of the traditions followed now, is the creation of a floral decoration called the pookkalam. At the center of the the pookkalam, we keep a clay pyramid called Thrikkakarayappan. Thrikkakara is one of the few temples dedicated to Vamana and keeping Thrikkakarayappan, is honoring Vamana as well.

Finally, why is the festival called Onam? It comes from the name of the month of the birth of Vamana. Shravanam -> Savanam -> Avanam -> Onam. As the name of the month moved from Sanskrit to Malayalam, this change happened.

Bhagavatam, Vishnu Puranam, Vamana Puranam, Mahabharatam, Yoga Vasishtam, and Narayaneeyam reveal the special bond between Mahabali and Maha Vishnu. The name of the festival itself comes from the birth month of Vamana. The traditions followed now also reflect this divine relation. When there was no animosity between them, why is such a narrative prevalent today? Instead of propagating that version, it is better to remember that Onam is a time when both Maha Vishnu and Mahabali come together.


  1. Speech by Swami Chidananda Puri
  2. Thiruvonam – Aitheehyavum Yadharthyangalum
  3. Revisiting the Onam myth
  4. The origin of the name Onam comes from a comment Prof. S Guptan Nair wrote in (2)

Sanskrit Notes: Order of Words

Rudraksha by Kinshuk Sunil (flickr
Rudraksha by Kinshuk Sunil (flickr)

One of the interesting features of Sanskrit is that, in a sentence, the order of the words don’t matter. You can switch them around and the meaning remains the same.
Take for example a sentence like, Rama is going to the forest. You can’t say, “Rama going forest.” You need the “is” and “to the” to make sense of the sentence. The “is going” indicates that it is one person who is doing the action. Now, “to the forest” indicates that the forest is the object of the action.
In simple Sanskrit, you would write it like this
रामः वानमं गाच्छति
It reads, “Ramah vanam gachati”,  When you say “Ramah”, it indicates one Rama. A forest is “vana”, but in the sentence, we wrote it as “vanam”. That indicates, it is the object of Rama’s destination. The “ti” at the end of “gacchati” indicates that it is one Rama who is going (not two)”. If there were many Ramas, it would have become “gacchanti”. Thus the “is going” and “to the” are built into the words themselves.
This makes it interesting. Now you can write

  • गाच्छति रामः वानमं
  • गाच्छति वानमं रामः
  • वानमं गाच्छति रामः

All these sentences mean the same even though the order of words are switched around. Since each word has the part which maintains its relationship to the verb, the order does not matter. Due to this, in poetry, you can switch words around to fit the meter. In Hindu tradition, almost everything is written in poetry form and this made it easier for an oral society to remember anything forever.
Here is a complicated sentence
भारत ! यदा यदा धर्मस्य ग्लानिः अधर्मस्य अब्युधानं च भवति तदा अहम् आत्मानं सृजामि
Take those words and resequence them and apply the sandhi rules, and you get the following verse from chapter 4 of Gita

यदा यदा हि धर्मस्य ग्लानिर्भवति भारत ।
अभ्युत्थानमधर्मस्य तदात्मानं सृजाम्यहम् ॥४-७॥

Here is an exercise. Try the “Rama is going to the forest” in your mother tongue and see how it behaves. Does it work the same in Dravidian languages and Indo-European languages? In Malayalam, it behaves exactly the same as in Sanskrit. In Hindi, it does not.

  • Based on the lectures of Varun Khanna at Chinmaya International Foundation
  • Gitapravesha by Samskrita Bharati

The Dhow to Khor Fakkan

By <a href="//" title="User:Xavier Romero-Frias">Xavier Romero-Frias</a> - <span class="int-own-work" lang="en">Own work</span>, <a href="" title="Creative Commons Attribution-Share Alike 3.0">CC BY-SA 3.0</a>,
A deep-sea dhow (from Wikipedia By Xavier Romero-FriasOwn work, CC BY-SA 3.0)

In 1957, the first democratically elected Communist government took office in Kerala. By 1960, the people of Kerala were willing to do anything, including  voyages across the open ocean in dhows to get away from the state and find employment. A recent Malayalam movie, Pathemari (Dhow), is the story of one such man, Narayanan, who takes such a voyage from Kerala to Khor Fakkan in the United Arab Emirates. Unlike the African slave trade, these men willingly took a journey to an unknown land to become indentured servants. The movie is a realistic portrayal of the life of the early Gulf Malayalis and one of the best performances by Mammootty (who is also a board member of the Communist party-run Kairali TV)
Pathemari - Movie poster (via Wikipedia)
Pathemari – Movie poster (via Wikipedia)

Spices were transported from the East, both by camel caravans and dhows crossing the ocean. The dhows would take the goods to Basra, Jiddah, Muscat or Aqaba and from there camel caravans took them to Alexandria and Levant. These traders did not movie goods just to the West, they went as far as China and Indonesia. In the movie, a young Narayanan boards a dhow owned by a person called ‘Launch Velayudhan’, (based on a real-life person, who died few years back) who is in the business of transporting goods to the Middle East, as well as people who want to escape poverty.
The dhows reached their destination due to the clockwork predictability of the monsoon. From May to August, the summer monsoons blows out from the southwest and fades away by September. From November to March, the winter monsoons blew from the northeast bringing traders and religious fanatics to India. This switch of direction across a large body of water is unique.

But the Arab, Persian, and Indian dhows* could well manage this, with their huge lateen rigs lying as close as 55 to 60 degrees in the direction of the soft northeast headwind—sailing right into it, in other words.† This is almost as good as a modern yacht and a considerable technical achievement. The importance of it was that India’s southwestern Malabar coast could be reached from southern Arabia by sailing a straight-line course, even if it did involve the discomfort of what seamen call “sailing to weather.”
Despite the occasional ferocity of the southwest wind, the discovery of the monsoonal system, which so easily favored trip planning, nevertheless liberated navigators from sailing too often against the elements.1 So the Indian Ocean did not—at least to the same degree as other large bodies of water—have to wait until the age of steam to unite it. [Monsoon]

This, in fact, helped develop the trading hubs of the old world.

The Prime Minister and Cheraman Perumal

The Prime Minister of India tweets

Wish he had read the following before tweeting

  1. The myth of Cheraman Perumal’s conversion
  2. Unraveling the Cheraman Perumal Myth
  3. The Perumal and the Pickle
  4. A tale of two conversions
  5. Cheraman Perumal and the myths

How the RigVeda is memorized

(This is a guest post by reader Ranjith P, after he saw a RigVeda chanting exercise in a temple near his home)
As you might  know it is a puzzle that how is RigVeda,  a ~4000 year old text is still memorized and chanted without making any mistake. It turns out that  people have made many special exercises to make sure that each person understands each word in detail, and can chant it in any order.  Once such exercise is called vaaram which helps people  learn RigVeda word by word by reciting it in a complex ordered way.
For example, these are the verses from Book 1, Hymn 23

Now watch these being recited
The two persons chanting are Dr. Mannoor Jathavedan Namboodiri (first person) and Mr. Naarayanamangalam Visakh. The second part (second person) is from Rig Veda Book 8 Hymn 11
When you see the video, you will note a few things

  1. In the first few minutes you can clearly see some stones near the person. They use some stones and somehow generate a random number. And using this, they choose a random hymn  in RigVeda and start from there. They don’t pre-plan where to start. That means, they have to know the whole of Veda by heart
  2. They repeat  words like: alpha beta, beta gamma, gamma, delta etc (first word, second word, second word, third word, third word fourth word etc).
  3. At the end of each sentence (and randomly) they have to split words (spitting sanskrit words is tough) .
  4. If you imagine transmitting some information orally, after some generations, very likely that one will goof up long and short vowels. For example,  words like “devaa” could be mistaken for “deva” and “vayoo” for “vayu“. To avoid it, they have developed a way of chanting where they stress the long vowels very clearly by extending it a bit too long so that the “deergham” is very clearly conveyed orally

When the second person chants you can see the first person, using his fingers, at random locations, ask the second person to split words (to test whether he knows)
This vaaram is like a minor day-to-day version of the famous Kadvalloor Anyonyam. vaaram is only one of the exercises and there are many others as well.
PS: This event happened at the Edakkuda temple, Malappuram district, Kerala

Unraveling the Cheraman Perumal Myth

(All photographs by author)

This is the board outside the Cheraman Perumal Juma Masjid near present day Kodungallur, Kerala which proclaims that the mosque was established when Prophet Muhammad was alive. It also means that this particular mosque was established before the first mosques in Iraq (639 CE),  Syria (715 CE),  Egypt (642 CE), and Tunisia (670 CE) thus making it oldest mosque after the first mosques in Saudi Arabia and China. The interesting question is why would a mosque be established so far away from the deserts where Islam was spreading? Who was behind it and more importantly, is the mosque as old as it claims?
There is a popular story behind this mosque which is well known in Kerala even today. Once a king — a Cheraman Perumal — was walking on the balcony of his palace when he spotted the moon splitting into two and joining back again. Bewildered, he consulted a few astrologers, who confirmed that such an event had indeed occurred and was not a mystical experience. Few months later, he got a few Arab visitors on their way to Ceylon and  from them, the king learned that Prophet Muhammad was behind this miracle and he was the founder of a new religion. The king did something drastic. He abdicated the throne, divvied up the kingdom and set sail to Mecca to meet this man. He met the Prophet and converted to Islam and lived in Arabia for a while. Then to spread the religion in his homeland, the converted Perumal returned to Kerala, but he died somewhere along the way.
Later, few of his followers reach Cranganore and it is they who set up the first mosques, including the one at Kodungallur. According to the legend, Saraf Ibn Malik, Malik Ibn Dinar, Malik Ibn Habib, Ibn Malik and their wives and friends were responsible for establishing the first mosques at Kodungallur, Kollam (in North, not Quilon), Maravi (Matayi), Fakanur, Manjarur (Mangalore), Kanjirakuttu (Kasergode), Jarfattan (Karippat), Dahfattan (Dharmatam), Fandarina (Pantalayani Kollam) and Caliyath (Chaliyam near Beypore)
A photo of the old mosque. Taken inside the museum

There is one thing to be noted about Cheraman Perumal. That was not the name of a particular king, but a title. Cheraman was the name of the dynasty of Chera rulers and Perumal meant, ‘the great one’. According to Keralolpathi (Origins of Kerala), written in the 17th or 18th century, following various conflicts in the 9th century, the representatives of 64 settlements in Kerala brought the Perumals from outside Kerala and each one was to rule for 12 years. There have been exceptions, though and once such exception would play an important role in this story.
First, is this story really true?
This story is found in a Muslim account recorded by Sheikh Zeinuddin as well as in the Brahminical narrative, Keralolpathi. The story has been retold countless times by the Portuguese, Dutch; the court chronicles of Calicut and Cochin begin with this narrative. There is epigraphic evidence as well: a Chola inscription mentions that the Cheras took to the sea after they were attacked which historians interpret to mean the Cherman Perumal voyage. There is evidence even from Arabia about the tomb of a king from Malabar who converted to Islam. Thus there seems to be sufficient evidence to suggest that a king from Malabar converted to Islam. That brings us to the second question: When?
This fascinating tale of a Kerala king meeting the Prophet was first recorded in 1510 CE by the Portuguese writer Duarte Barbosa.  Barbosa, who would later become Ferdinand Magellan’s brother-in-law and would join him on his trip around the world, reached Kerala in 1500 with his uncle and stayed there for five decades.  Quite conversant in the local language and based on his familiarity with the traditions and customs, he wrote the story of this Cheraman Perumal based on what he had heard.
His version goes as follows: Around 600 years before Barbosa’s time, there was a mighty lord named Chirimay Perumal, whose capital was a popular port for pepper trade. The Moors who came for trade had numerous discussions with the king and they converted him to Islam. He went to Mecca in their company and died either there or on the way back; the Malabar people never saw their king again. Barbosa also wrote that the single kingdom which Cheraman Perumal ruled was partitioned into three — Cannanore, Calicut and Quilon — with Calicut having the right of coinage. But pay attention to one little detail: Barbosa mentions that this incident happened 600 years back and not 875 years.
A model of the old mosque

The next version of this story was written eight decades later by Sheikh Zeinuddin, a Malayali Muslim with Arab ancestry. In his account, a set of Arab Muslims reached Cranganore on their way to Adam’s foot in Ceylon (See: How did Adam reach Sri Lanka). The king invited them to his palace and in what must be one of the easiest conversion attempts in the world, converted after listening to their conversation. He divided the kingdom and secretly went to Arabia with the pilgrims which agrees with what  Barbosa wrote. Zeinuddin  also mentioned  that this king was ruler of the land from Kasargod to Kanya Kumari and gives an important detail regarding the date. According to him, this incident did not happen during the lifetime of the prophet, but two centuries later.
In 1610 CE, another version of this story came out from another Portuguese writer named Joas de Barros. Barros was an administrator in the House of India and Mina in Lisbon and was responsible for dispatching various fleets to India and his work was completed by Diogo de Coutos. According to his account, Cherman Peruman was a great king and his kingdom was frequented by many Moors for commerce. According to Barros, these Moors were religious fanatics and converted the king to Mohammedanism. He moved to Calicut and the Moors there made him believe that he had to go to Mecca to save his soul, which he promptly did after diving up his kingdom. This was the time when the Portuguese  had to resort to sea voyages to avoid Muslim controlled land route and were in competition with the Muslim traders to gain favours with the kings of Kerala for trade rights. Some of that antagonism is visible in the language.
Coutos then adds a twist to the tale which makes this very interesting. According to him, the Perumal was close to the St. Thomas Christians based in Kodungallur and would not do anything without consulting them. Coutos drops a bombshell by adding that he was converted to their holy faith, implying that the Perumal was converted to Christianity and not Islam. Coutos also mentions that the Perumal died in the house of Apostle St. Thomas in Mylapore and thus disagreeing with the Mecca trip.
Thus within a century, you see the story being retold to based on the convenience of the Portuguese who were doing excellent trade in Malabar. But there is one data point that stands out in the narrative of Barros. He writes that the king, Sarama Perumal  reigned 612 years before “we” landed in India. It is not clear if that refers to the period when Barros’ ships landed in Malabar or if it refers to Vasco da Gama’s first voyage of 1498. Even if you take 1498 CE, the king would have reigned in 886 CE which is two centuries after the date mentioned on the board at the Cheraman Perumal Juma Masjid. This also agrees with what historian A Sreedhara Menon mentioned in his Survey of Kerala History
This is how the mosque looks now

In 1723, the Dutch chaplain Canter Visscher wrote about this story, with another twist. He agrees that Cheraman Perumal was a great king who distributed his kingdom and undertook a voyage. The journey was, “either to the Ganges in fulfillment of a vow or as the Moors say to visit Mahomet in Arabia for the purpose of embracing his religion” implying that there were multiple theories existing at that time. The Cheraman Perumal story continued in the accounts of Dutch Commander Van Adriaan Moens (1781 CE), Francis Buchanan (1801 CE), Keralolpathi (17th or 18th century) and Granthavari (19th century).
Though there are minor variations and the influence of local politics, the Portuguese and Muslim accounts agree on one thing: a king from Kerala set off to Mecca, but this Cheraman Perumal did not travel in the time period mentioned in the board outside the mosque. But, this should be a relatively simple problem to solve. If this incident did happen, then all you need is  figure out who was the last Cheraman Perumal and that is where temple inscriptions are helpful.
There is a inscription of Vikrama Chola dating to 1122 CE which mentions that while the Pandyas took to the Ghats, the Cheras took to the sea. There are other statements in that inscription which have been proven historically and hence there is some truth to the Cheras taking to the sea as well. Historians read this to mean that the last Chera Perumal, who was Rama Kulasekhara, left by sea.  There is a record from another temple which mentions that a garland was offered to the deity for the benefit of Cheramar Rama which meant that the Rama Kulasekhara lived till 1122 CE.
This points to a date much later than the ones mentioned by the Portuguese and Muslim sources. There is more evidence on this front. According to the tradition the Perumal who reached Arabia sent some messengers to preach Islam in Kerala who established ten mosques, of which one is at Matayi. According to an inscription found at that mosque, it was built in 1124 CE, two years after the disappearance of Cheraman Rama Kulasekhara. Since we know the name of the king, it is easy to find references to other kings who were contemporaries and that can help solve the mystery. Two kings mentioned in connection with the last Perumal are  Udaya Varman of Koluttunad and Kavivamsha of the Tulu kingdom. Based on a inscription, Udaya Varman has been dated to the early 12th century and the Alupa King Kavivamsha ruled in the first half of the 12th century.
This complicates the narrative. From the story taking place in the 8th century, we have moved to the 12th century. Now comes another story which throws a spanner into the works. It turns out that this story was known in Arabia as well.  In 1882, William Logan recorded an incident where 15 years back a man came from Arabia soliciting funds for the repair of a mosque and tomb. This tomb, located in Zapahar in the Arabian coast had an inscription which said that it belonged to Abdul Rahman Saimiri, a king of Malabar. The inscription mentions that this man reached in year 212 of the Hijera. The name in the tomb looks like it was a Samuthiri, but there is no such record of a Zamorin traveling abroad and getting converted.
There is one thing though: this was an important event in Kerala’s history with the disintegration of central rule and the formation of many small kingdoms. But was the disappearance of the king the reason for this change or was the change that happened tagged to the departure of the king?
Lake behind the mosque

The Cheras were under attack by the Chola and Pandya forces and the king would have been forced to make deals with Jews, Muslim and Christian traders for financial and military assistance displeasing the Nairs and Brahmins. The revenue would have been affected and with an ungovernable kingdom, an easy way out would have  been the abdication of the throne. With the Cholas and Pandyas attacking the north and south, many areas would have become independent of the central power and the partition of the land may have been just a formal recognition of the ground reality. The Perumal’s Mecca voyage was a symbolic tale which captured all of this.
The Brahminical narrative, Keralolpathi, has another reason for this departure. First, the Perumal was upset having reigned for a long period the land which was the gift of Parasurama and wanted to make amends. The Perumals were supposed to rule for 12 years and make way for the next one; this one ruled for 36 years. Second, he had the supreme commander of the armed forces killed on the basis of a woman’s words which he regretted later and so conversion to Islam was probably a way out.
As we go through written records, temple inscriptions and legends, this story gets murky. At this point we have two possible dates for this event: the 9th century and 12th century. It is not a difference of a few decades, but a few centuries. Some people thought he took a trip to the Ganges and another thought he was converted to Christianity and not Islam. There is even a suggestion that it was not a Perumal, but a Zamorin. Sometimes, from these different versions you learn more about the writer and his politics than the truth, like a kind of Heisenberg’s uncertainty principle applied to historiography. Even though the mystery is not solved, it seems that a person some repute reached Mecca from Malabar, and it seems clear that the incident did not happen in the period mentioned in the board.
If you are interested in this topic, please read these blog posts as well.

  1. The Perumal and the Pickle
  2. A tale of two conversions
  3. The myth of Cheraman Perumal’s conversion


  1. Perumals of Kerala by Prof. M.G.S.Narayanan
  2. Survey of Kerala History by Prof. A Sreedhara Menon

In Pragati: Book Review of A Passage to Infinity by George Gheverghese Joseph

An important problem in historiography is the politics of recognition. Which theory gets recognized and which doesn’t sometimes depends on who is saying it rather than what is right. Take for example, the Aryan Invasion Theory. Historians like A L Basham wrote convincingly about it and it was the widely accepted fact. Over a period of time, the invasion theory fell apart; the skeletons, which were touted as evidence for the invasion, were found to belong to different cultural phases thus nullifying the theory of a major battle. Due to all this, historians like Upinder Singh categorically state that the Harappan civilization was not destroyed by an Indo-Aryan invasion. But  the Aryan Invasion Theory is still being taught in Western Universities and those who question it are ridiculed. In this atmosphere if any academic dares to support the Out of India Theory, that could be a career-limiting move.
Eurocentric historiography has affected not just Indian political history, but the history of sciences as well. Indigenous achievements have not got the recognition it deserved; when great achievements were discovered, there have been attempts to explain it using a Western influence. In 1873 Sedillot wrote that Indian science was indebted to Europe and Indian numbers were an abbreviated form of Roman numbers. Half a century before that Bentley rewrote the dates for various Indian mathematicians, pushing them to much later and blamed the Brahmins for fabricating false dates. Some of these historians were willing to acknowledge that there were some great mathematicians till the time of Bhaskara, but none after that and without the introduction of Western Civilisation, India would have stagnated mathematically.
George Gheverghese Joseph disputes that with facts and goes into the indigenous origins of the Kerala School of Mathematics which flourished from the 14th century starting with Madhava of Sangamagrama and ending with Sankar Varman around 1840s. Though there were few mathematicians in Kerala in the 9th, 12th and 13th centuries, what is today called the Kerala School started with Madhava who came from near modern day Irinjalakuda. His achievements were phenomenal; they included calculating the exact position of the moon and what is now known as the Gregory series for the arctangent, Leibniz series for the pi and Newton power series for sine and cosine with great accuracy.
Following Madhava,  the guru-sishya parampara bore fruit with a large number of students in that lineage achieving greatness. These include Vattasseri Paramesvara,  Nilakanta, Chitrabhanu,  Narayana, Jyeshtadeva and Achyuta. They wrote commentaries on Aryabhata (who was an influential figure for Kerala mathematicians), Bhaskara and Bhaskaracharya, recorded eclipses and dealt with spherical and planetary astronomy and produced many theorems and their proofs. Tantrasangraha by Nilakanta was a major output of this school. In this book, he carried out a major revision of the models for the interior planets created by Aryabhata and in the process arrived at a more precise equation than what existed in the world at that time. It was even superior to the one developed by Tycho Brahe later. These are the people we know about; Joseph writes that many more could be found from the uncatalogued manuscripts in Kerala and Tamil Nadu.
The book also goes into the social situation in Kerala which made these developments possible. By the 14th century the Namboothiri Brahmins, the major landholders were organized around the temple. They had a custom by which only the eldest son entered a normal marriage alliance and got his position in society by taking care of property and community affairs. The younger sons did not marry Namboothiri women, but entered into relations with Nair women — a practice called sambandham. They had to gain prestige by other means such as scholarship and the book makes the case that these younger sons formed one section of these mathematicians.
In an agrarian society which depended on monsoons, the precision of the calendar and astronomical computation of the position of celestial bodies was important. Astrology too was important for finding auspicious times for religious and personal rituals. All this knowledge was nourished, sustained and disseminated from the temple which served as the hub of this intellectual activity. The temple also employed a large number of people — priests, scholars, teachers, administrators — and there were a number of institutions attached to the temple where people were given free boarding and lodging.

After explaining the social situation in Kerala which facilitated the such progress, the final section of the book tackles an important problem. Two important mathematical developments of the 17th century are the discovery of calculus and the application of the infinite series techniques. While Europeans like Leibniz and Newton are credited with this work, the book argues that the origin of the analysis and derivations of certain infinite series originated in Kerala from the 14th to the 16th century and it preceded the work of Europeans by two centuries. The  mystery then is this: how did this information reach Europe?
The book presents multiple theories here. It considers the option that Jesuits were the channel through which this knowledge reached Rome and from there spread elsewhere. There have been many such examples of transmission from the 6th century onwards with knowledge reaching Iraq and Spain and eastward to  China, Thailand and Indonesia. But extensive survey of Jesuit literature did not provide any data for this transmission. Understanding the cryptic verses in which the information was written required investment of time and excellent knowledge of Malayalam and Sanskrit. Though Shankar Varman spoke to Charles Whish in 1832, that level of sharing of information may not have happened in the 14th century. The book then presents an alternate theory that the information may have slipped out unintentionally; the computations of the Kerala school would have been interesting for navigators and map makers and it would have been transmitted through them and then reconstructed back in Europe. This topic is not closed yet and much more research has to be done.
The book is not written purely for the layman in the style of Michel Danino’s The Lost River or Sanjeev Sanyal’s The Land of Seven Rivers. There are large portions of the book which contain mathematical proofs by  these great mathematicians and can skipped for those who are not mathematically inclined. There was something a bit odd about an appendix appearing in the middle of the book. While dealing with the history of mathematics in India, the book starts with the ‘classical’ period and with Aryabhata (499 CE). Recently, there was a course Mathematics in India – from Vedic Period to Model Times taught by Prof M D Srinivas, M S Sriram and K Ramasubramanian, whose videos are available on YouTube. The course, very rightly starts with the ancient period, starting with the Sulvasutras (which is prior to 500 BCE) and such ancient knowledge should be acknowledged.
During these times when every development is attributed to Greece or Europe, the book dispels that notion completely and argues for an indigenous development of the Kerala School. Thanks to the work of various post-Independence historians, we have more information about the the Kerala School of Mathematics and that information is getting more popular. The Crest of the Peacock: Non-European Roots of Mathematics by the same author and Mathematics in India by Kim Plofker, all talk about the history of Indian math and Kerala School in particular. But in more popular books, these developments are rarely mentioned because Indian mathematicians followed the computational model of Aryabhata which is different from the Greek model. In this context, books like A Passage to Infinity  are important for us to understand these marginalized mathematicians.

What happened in 825 CE in Kerala?

This is the photo of the Malayalam calendar hanging in my house and as per that calendar, the year is 1189 which means that something important happened in 825 CE. Wikipedia mentions that the important event was the establishment of a Nestorian colony. Maddy has written about various other events and that is covered in A Survey of Kerala History by A Sreedhara Menon as well.  The book Perumals of Kerala by Prof. M.G.S. Narayanan deals with these issues and comes up with an answer while refuting few others.

But before getting to the origins of the Malayalam calendar, called the Kollam Era, it is important to understand how events were recorded in India. The date on which the event occurred was mostly tied to a seminal event such as the establishment of a temple or an important marker like the beginning of the Kaliyuga or the Hijra. The position of Jupiter, the position of sun, the date, the week day and the nakshatra were noted while recording events.  Another popular way of recording events was to base it on reginal years of the king. Thus, if you were writing about the recent Indian elections, you would write, “In the 1st year of Rahul Gandhi being the Vice-President of Indian National Congress, it had just enough MPs under the Whatsapp group limit” or “In the 9th year of Prakash Karat’s tenure as CPI(M) general secretary, the party won seats which could be counted using both hands.”

The problem with reginal years or the establishment of a temple is that the events were local and that makes it hard for people outside the region to make sense of the date. But sometimes a local event can achieve such significance that it can live on for a thousand years and one such event happened in the southern part of Kerala.

Quilon - Dutch drawing from 1682 CE
Quilon – Dutch drawing from 1682 CE

Around the 8th century, there existed the region between Tiruvalla and Nagercoil was known as Vēṇāṭ with its capital at Vizhinjam.  In the 8th century, the Pandyans made an expansionist move and to counter that the Cēra forces moved to the south. They took over Vēṇāṭ, absorbed it into the Cēra kingdom and established Kollam as the capital. This was an important victory for the Cēra’s with political and economic consequences. Kollam was a harbor city and remained important from the 9th to the 12th centuries and it was from here that the Chinese trade really took off. Eventually that trade would move up to Cochin and then Calicut. Marco Polo visited Kollam in 1294, Jordan Catalani in 1330 and  Ibn Batuta in 1343 an all of them mentioned the Chinese presence there. As Kollam bought in prosperity, its establishment became significant and what started out as a local era, was used in Vēṇāṭ and eventually the whole of Kerala, though the port of Kollam became less important to Calicut eventually.

There are two inscriptions from this period, found in Kollam, which mention the phrase “Kollam tonri” implying that the event happened after the inauguration of Kollam.  Some historians have suggested — based on letters by the Nestorian Patriarch of Babylon — that the city of Kollam existed before 825 CE. Narayanan writes that this is based on an arbitrary and erroneous reading of Latin. Another suggestion is that “Koulam Male” was mentioned in Cosmas Indicopleustes by a 6th century Alexandrian merchant. Narayanan thinks that this refers to Kolam or Kolapattanam in North Kerala. Ma Huan wrote that the Tang dynasty knew about Kollam, but it may be about knowledge closer to the 9th century.

The Nestorian date is related to the settlement of Christian traders under the leadership of Mar Sapir Iso and that has been advanced by historians. According to them, if modern India could adopt Christian era, then it was possible a millennium back as well. Narayanan dismisses that argument; according to him, the establishment of Kollam as an important city came first followed by the establishment of the Nestorian colony. Narayanan writes that this incident would not have been universally acceptable compared to the founding of the city. He also dismisses the theories that it was associated with the departure of Cheraman Perumal to Mecca (a myth) or with Shankaracharya.


  1. Perumals of Kerala by Prof. M G S Narayanan