Kaṭapayādi

कटपयादि: the code that turns words into numbers, and names the 72 parent rāgas.

Mathematics / Kaṭapayādi

Kaṭapayādi (“starting with ka, ṭa, pa, ya”) gives every Sanskrit consonant a digit from 0 to 9. Each digit has several letters to choose from, so a number can be written as an ordinary, meaningful word, and a long number as a verse that is easy to memorise. Astronomers used it for tables and dates. Carnatic music uses it to encode each Mēḷakarta rāga’s number in its name. Unlike Āryabhaṭa’s code (see Āryabhaṭa Numeration), vowels carry no value: only the consonant before each vowel counts.

The defining verse

नञावचश्च शून्यानि सङ्ख्याः कटपयादयः ।
मिश्रे तूपान्त्यहल् सङ्ख्या न च चिन्त्यो हलस्वरः ॥
nañāvacaśca śūnyāni saṅkhyāḥ kaṭapayādayaḥ |
miśre tūpāntyahal saṅkhyā na ca cintyo halasvaraḥ ||

“na, ña and the vowels (a, …) are zero; the numbers are [the consonant series] beginning with ka, ṭa, pa, ya. In a conjunct, the consonant next to the vowel counts; a consonant with no vowel of its own is not considered.” — quoted from Śaṅkaravarman’s Sadratnamālā.

Consonant values

Four series, each counting from 1. The first two run to ten (ending on 0); the third stops at 5, the fourth at 8:

 1234567890

Zero

न ञ, and a vowel standing alone
न (na) and ञ (ña) are the tenth letters of their series. A syllable that is only a vowel (अ, ई, ऋ …) also counts 0.

Conjuncts

only the consonant next to the vowel
In ग्य (gya) only य counts (1); in न्ध (ndha) only ध (9). A half-consonant without a vowel of its own is ignored, and so are anusvāra and visarga.

Direction

अङ्कानां वामतो गतिः
aṅkānāṃ vāmato gatiḥ, “numbers go to the left”. In dates and tables the first syllable is the units digit, so you read the digits in reverse. (The π verse below is read straight through, as a decimal fraction.)

Decode a word

Type a word in IAST (for example gopībhāgya or kharaharapriyā). Each syllable shows the consonant that counts and its digit:

π in a couplet

गोपीभाग्यमधुव्रात शृङ्गिशोदधिसन्धिग ।
खलजीवितखाताव गलहालारसन्धर ॥
gopībhāgyamadhuvrāta śṛṅgiśodadhisandhiga |
khalajīvitakhātāva galahālārasandhara ||

Decoded syllable by syllable: 3 1 4 1 5 9 2 6 5 3 5 8 9 7 9 3 2 3 8 4 6 2 6 4 3 3 8 3 2 7 9 2, that is, π/10 = 0.31415926535897932384626433832792. The first 31 digits are correct (π continues …327950…). The verse also reads as a hymn, which is the point of the code: the number hides inside meaningful words. Bhāratī Kṛṣṇa Tīrtha quotes it in Vedic Mathematics.

The 72 Mēḷakarta rāgas

The 72 parent scales of Carnatic music are numbered so that the first two syllables of each name, read as Kaṭapayādi digits and then reversed, give the rāga’s number. Hari-kāmbhojī: ह (ha) = 8, रि (ri) = 2 → 82 reversed → 28. The number then fixes the whole scale, by a rule simple enough to work out in your head.

1 · Ma from the half

1–36 → M1 (śuddha) · 37–72 → M2 (prati)
Sa and Pa are fixed in every Mēḷakarta. The first 36 use the natural fourth, the second 36 the sharp fourth.

2 · Chakra from groups of six

chakra = ⌈n ÷ 6⌉
Twelve chakras of six rāgas each. Within each half, the chakra fixes Ri and Ga, in the order R1G1, R1G2, R1G3, R2G2, R2G3, R3G3.

3 · Position within the chakra

position = n − 6(chakra − 1)
The position 1–6 fixes Dha and Ni, in the same order: D1N1, D1N2, D1N3, D2N2, D2N3, D3N3.

Why 72? Ri and Ga share pitches (R2 = G1, R3 = G2), so a valid pair needs Ri’s index ≤ Ga’s: six pairs, not nine. Dha and Ni are the same. Six Ri/Ga pairs × two Ma × six Dha/Ni pairs = 72. The chakra names are themselves number words: Indu (moon, 1), Netra (eyes, 2), Agni (fires, 3), Veda (4), Bāṇa (arrows, 5), Ṛtu (seasons, 6), Ṛṣi (sages, 7), Vasu (8), Brahma (9), Diśi (directions, 10), Rudra (11), Āditya (12).

All 72, decoded

Most names follow the rule exactly. The marked ones need one of the adjustments listed below the table.

#RāgaFirst two syllablesDigitsReversedChakraScale

† Subscript y, r, v

Six names count the consonant before a following ya, ra or va, not the last one: Cakravākam (क्र → k = 1 → 16), Divyamaṇi (व्य → v = 4 → 48), Viśvambarī (श्व → ś = 5 → 54), Śyāmaḷāṅgī (श्या → ś = 5 → 55), Citrāmbarī (त्रा → t = 6 → 66) and Jyotisvarūpiṇī (ज्यो → j = 8 → 68). This is an observation from the names, not a rule stated in the defining verse — other names (Ratnāṅgī, Sūryakāntam) follow the verse’s rule.

‡ Other adjustments

Siṃhendramadhyamam (57) works if spelt Sihmendra- so the second syllable carries m = 5. Ṛṣabhapriyā (62) counts the opening vowel ṛ as ra = 2. Naṭabhairavī (20) does not fit the standard table (na = 0, ṭa = 1 would give 10).

History

The oldest surviving use is Haridatta’s Grahacāranibandhana (683 CE), followed by Śaṅkaranārāyaṇa’s Laghubhāskarīyavivaraṇa (869 CE). Tradition credits the earlier Candravākyāni of Vararuci with the first use. Nearly all known uses come from South India: astronomical tables, dates hidden in verse, and values of π such as the Karaṇapaddhati’s caṇḍāṃśucandrādhamakuṃbhipālair = 31415926536. The Mēḷakarta names in their Kaṭapayādi form are associated with Govindācārya (18th century).

Sources: Wikipedia, Kaṭapayādi system and Melakarta. The rāga names follow the standard table used by Wikipedia and karnatik.com. Practise decoding in the Kaṭapayādi lesson of Vedic Mathematics.