Someone Sorted the Rigveda
A Staircase in the Fifth Book
Take the hymns to Agni that open the fifth book of the Rigveda, ignore every word in them, and write down only how many verses each one has. You get this:
12, 12, 12, 11, 11, 10, 10, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4.
Twenty-four hymns, composed by poets of the Atri clan, addressed to a fire that had been burning in their households for generations, and they descend in a clean staircase from twelve verses to four. Not one step goes up. Then, at RV 5.25, the staircase abruptly jumps back to nine, and the next four hymns run 9, 6, 6, 15 before the Agni sequence ends and Indra takes over.
No poet writes like that. Inspiration does not arrive in order of decreasing length. Somebody, at some point after the hymns existed and before the text was locked, sat with this material and filed it, and the filing system was: by god, then by size, biggest first. What you are looking at in that list of numbers is not poetry. It is an index.
That is the first surprise. The second is better. The staircase is not decorative, and it is not quite perfect, and the imperfections are not noise. Where the descending order breaks, it breaks in a specific place: at the bottom of a group, where a shelf has room. Hymns that violate the sort are overwhelmingly hymns that were added to a list already sorted, which makes the arrangement of the Rigveda something no other feature of the text can be. It is a record of the collection’s own growth, written into the order of the contents rather than into the contents themselves. The redactors left us a changelog and then said nothing about it for three thousand years.
This piece does three things: sets out the ordering rules and the two nineteenth-century scholars who found them, tests the rules against the text verse by verse (89.7 per cent of adjacent hymn pairs obey), and then looks at what sits in the broken places, which turns out to include several of the strangest and most-loved hymns in the collection.
The Rules, and the Two Men Who Found Them
The six books numbered 2 to 7 are the family books, each associated with one poetic lineage: Gṛtsamada, Viśvāmitra, Vāmadeva, Atri, Bharadvāja, Vasiṣṭha. They hold 429 hymns, about 42 per cent of the collection, and they are the oldest stratum of it by every measure philology has. The companion essay on who actually wrote the Rigveda covers the clans; what concerns us here is the shelving.
Abel Bergaigne got there first, in a study of the history of the Saṃhitā published in the Journal Asiatique in 1886 and reissued as a monograph the following year. [1] Hermann Oldenberg stated the principles in their canonical form two years later in the Prolegomena, the book that still sets the terms for every argument about the Rigveda’s textual history. [2] Neither man had a concordance, a database or an index card system worth the name. They had the text, read many times over, and an eye for the shape of a list.
The rules are four, and they nest:
| Level | Rule | Status in the text |
|---|---|---|
| Between books | Family books ordered by increasing size | Broadly true, two clear exceptions |
| Within a book | Agni group first, then Indra, then the other gods | Holds in all six books |
| Among the other gods | Deity groups ordered by decreasing number of hymns | Roughly true, weakest of the four |
| Within a group | Hymns in decreasing number of verses | Very strong, and the subject of this piece |
To which Jamison and Brereton add a fifth, a tiebreak: where two hymns have the same number of verses, the one in the longer metre goes first. [3]
graph TD
A[Hymn to be filed] --> B{Addressed to whom?}
B -->|Agni| C[First block]
B -->|Indra| D[Second block]
B -->|Other god| E[Later blocks, largest group first]
C --> F[Sort by verse count, longest first]
D --> F
E --> F
F --> G{Tie on verse count?}
G -->|Yes| H[Longer metre goes first]
G -->|No| I[Slot fixed]
Say the rules out loud and they sound like an ancient curiosity. Look at what they imply and they stop being curious. A sorting rule is a decision procedure. It tells you where a hymn goes without anyone having to remember where it went, which is precisely the property you need when the archive lives in human memory and is transmitted by voice, as described in the essay on the oral machinery of transmission. A reciter who knows the rule knows that the next Agni hymn is shorter than the one he has just finished. The sort is a mnemonic with a filing system’s shape.
Testing It
Claims of this kind are easy to repeat and rarely checked, so I checked.
Methods note. I took the romanised Saṃhitā text and Griffith’s hymn headings for all ten maṇḍalas, counted the verses in each of the 1,028 hymns, and grouped hymns into blocks by the deity named in the heading, merging the Āprī hymns into the Agni blocks they sit inside. Within each block of two or more hymns I counted adjacent pairs and asked whether the second hymn is no longer than the first. Three cautions. The digitisation is not perfect: RV 5.24, a four-verse hymn in the short dvipadā lines, arrives as a single run-on verse, and the whole-text total comes to about 10,510 verses against the standard figure of roughly 10,550, so a handful of verse divisions are being lost somewhere. Neither error touches the results below, which depend on relative lengths within a block rather than on exact totals. Second, the deity headings descend from the traditional Anukramaṇī index, not from the hymns themselves; they are evidence about how the tradition classified a hymn, which is exactly the classification the redactors were sorting by, but they are not independent of it. Third, my metre figures are syllable counts taken from the romanised text, accurate enough to separate gāyatrī from triṣṭubh but not a substitute for proper metrical analysis.
In books 2 through 7 there are 302 adjacent hymn pairs inside deity groups. In 271 of them, 89.7 per cent, the second hymn is no longer than the first.
Nine in ten sounds impressive and means nothing until you know what chance would give. Because verse counts repeat heavily (a block can contain six consecutive five-verse hymns, and ties count as obeying the rule) the baseline is well above half. So I shuffled: keeping each block’s multiset of lengths fixed, I permuted the order within blocks 20,000 times and recounted.
$$D_{\text{observed}} = 271 \qquad \mathbb{E}[D_{\text{shuffled}}] = 180.3 \qquad \sigma = 5.24$$
The best of 20,000 random shufflings reached 203. The real text reaches 271, about seventeen standard deviations out, and no shuffle came within sixty of it:
$$z \approx 17.3, \qquad \Pr\left(D_{\text{shuffled}} \ge 271\right) < 5 \times 10^{-5}$$
Per book, the picture is consistent, and one book is spotless:
| Book | Family | Hymns | In-group pairs | Breaks | Obeyed |
|---|---|---|---|---|---|
| 2 | Gṛtsamada | 43 | 25 | 0 | 100% |
| 3 | Viśvāmitra | 62 | 49 | 5 | 90% |
| 4 | Vāmadeva | 58 | 35 | 4 | 89% |
| 5 | Atri | 87 | 73 | 6 | 92% |
| 6 | Bharadvāja | 75 | 49 | 7 | 86% |
| 7 | Vasiṣṭha | 104 | 71 | 9 | 87% |
The smallest family book does not break the rule once. Its Agni hymns run 16, 13, 11, 9, 8, 8, 6, 6, 6, 6 and its Indra hymns run 21, 15, 13, 12, 10, 9, 9, 9, 9, 9, 6, 4, and then the other gods follow in their blocks. Whatever happened to the rest of the collection after the sort was imposed, book 2 was left alone.
The metre tiebreak is real but softer. Among 138 adjacent pairs of equal length, 102 differ in measured metre, and in 64 of those the shorter metre comes second, which is 63 per cent in the predicted direction. That is a tendency, not a law, and given how crude a syllable count is as a metre detector I would not push it further than Jamison and Brereton do.
Where the Staircase Breaks
Thirty-one breaks in 302 pairs. If the breaks were scattered at random through the blocks, they would tell us the redactors were sloppy. They are not scattered. Of the 31, eighteen occur at the very last slot of a group, 23 within the last two slots, and 27, which is 87 per cent, within the last three.
That distribution has one obvious reading. A list sorted longest-first can absorb a new item at the end without disturbing anything already in it. Insert in the middle and every following hymn shifts; append at the bottom and nothing moves. A tradition that had memorised the sequence would append. So the ascending tail of a block is not a mistake in the sort; it is what growth looks like after the sort.
| Group | Sorted run ends | Then | Verses in the outliers |
|---|---|---|---|
| Book 6, Agni | RV 6.14 | 6.15, 6.16 | 19, then 48 |
| Book 7, Indra | RV 7.30 | 7.31, 7.32 | 12, then 27 |
| Book 5, Agni | RV 5.24 | 5.25 to 5.29 | 9, 9, 6, 6, 15 |
| Book 3, Agni | RV 3.23 | 3.24 to 3.29 | 6, 5, 9, 16, 6, 16 |
| Book 6, Indra | RV 6.43 | 6.44 to 6.47 | 24, 34, 14, 31 |
Book 6 is the cleanest demonstration. Its Agni block descends 13, 11, 8, 8, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, and then RV 6.15 has nineteen verses and RV 6.16 has forty-eight. Forty-eight is tied for the third longest hymn in the entire Rigveda. It is sitting at the bottom of a list sorted with the longest at the top. There is no reading of that arrangement on which 6.16 was in the block when the block was ordered.
tvám agne yajñā́nāṃ hótā víśveṣāṃ hitáḥ
“You, Agni, are the Hotar of all the sacrifices, appointed by the gods among the race of men.”
Rigveda 6.16, verse 1, in gāyatrī. My rendering, following Griffith (1896).
Nothing in those words announces lateness. That is the point of the method. The hymn’s position, not its diction, is the evidence, and position is a kind of evidence the poets could not have faked and the reciters had no motive to tidy.
Aside. The clearest insertion in the Rigveda is not a sort violation at all but a block of eleven hymns, the Vālakhilya, physically dropped into the middle of maṇḍala 8 at 8.49 to 8.59, counted separately in some traditions and omitted from others. It is the control case. When the tradition added a group rather than a hymn, it left a join so visible that nobody has ever needed a statistic to see it. The khila collection sits one step further out again, material the Śākala recension never absorbed at all.
What Lives at the Bottom of the Pile
Here is where the filing system stops being a technical matter. Look at what the sort flags as the last thing added to each family book, and specifically at the final hymn of each of the six:
| Book | Last hymn | Verses | Subject |
|---|---|---|---|
| 2 | RV 2.43 | 3 | The kapiñjala bird, whose call is an omen |
| 3 | RV 3.62 | 18 | Mixed deities, and the Gāyatrī verse to Savitṛ |
| 4 | RV 4.58 | 11 | Clarified butter, in surreal riddling images |
| 5 | RV 5.87 | 9 | The Maruts |
| 6 | RV 6.75 | 19 | Weapons: bow, bowstring, quiver, armour, whip |
| 7 | RV 7.104 | 25 | Sorcerers, and curses against them |
One place further in sits RV 7.103, the ten verses on frogs croaking at the first rains, who are compared, with a straight face or without one, to brahmins chanting around the soma bowl.
Set that column of subjects beside the ordinary business of a family book, which is Agni kindled at dawn and Indra killing Vṛtra, and something becomes visible. The hymns at the bottom of the pile are the ones that do not sound like the Rigveda. Bird omens. A hymn to ghee. An inventory of military equipment. Frogs. Charms against witchcraft. Nearly everything a modern reader finds delightful and unexpected in the family books is material the arrangement identifies, on purely formal grounds, as having arrived after the shelf was built.
Two observations follow, and they pull in opposite directions.
The first is that this cuts against a comfortable story. It is tempting to read the odd hymns as glimpses of an older, wilder, pre-priestly religion surviving in the corners of a liturgical text. The arrangement says the opposite about how they got into the book: they came in last, through a door the redactors left open at the end of each group, often with closer relatives in the Atharvaveda than in the hymns around them.
The second is a caution, and it matters more. Position records incorporation, not composition. A hymn appended in the eleventh generation may have been sung in the third. Households recited charms about bad dreams and bird calls long before anyone decided such things belonged in a collection of sacrificial poetry; what changed late was the collection’s willingness to hold them. The sort dates the shelving. It does not date the song.
A Different Key: The Soma Book
Maṇḍala 9 is the anomaly that proves the rule, because it is sorted by a different key. All 114 of its hymns address Soma Pavamāna, the drink being pressed and filtered, so deity is useless as a sort field. The redactors used metre instead, and within each metre, length.
| Metre block | Hymns | Verse counts as they stand |
|---|---|---|
| Gāyatrī, main run | 9.1 to 9.60 | 10, 10, 10, 10, 11, 9 … 5, 5, 4, 4, 4, 4 |
| Gāyatrī, appended | 9.61 to 9.67 | 30, 30, 30, 30, 30, 30, 32 |
| Jagatī | 9.68 to 9.86 | 10, 10, 10, 9, 9, 9, 9, 5 … 5, 12, 48 |
| Triṣṭubh | 9.87 to 9.97 | 9, 8, 7, 6, 6, 6, 5, 5, 5, 24, 58 |
| Anuṣṭubh, uṣṇih, pragātha, mixed | 9.98 to 9.114 | irregular |
The gāyatrī run is the most extreme sorted sequence in the Rigveda: sixty consecutive hymns, fifty-nine adjacent steps, and fifty-eight of them descend or stay level. The single exception is 9.4 at ten verses followed by 9.5 at eleven, which is an eleven-verse hymn one slot too low, the smallest possible violation of the rule. Then the run ends and six thirty-verse hymns and a thirty-two follow it, a block of long gāyatrī material appended in one piece.
Watch the ends of the other two blocks. The jagatī sequence descends to a long plateau of five-verse hymns and then produces a twelve and a forty-eight. The triṣṭubh sequence descends from nine to five and then produces a twenty-four and a fifty-eight. That fifty-eight is RV 9.97, the longest hymn in the Rigveda, and it sits at the bottom of a list ordered longest-first, two slots from the end of its metre block.
tváyā vayám pávamānena soma bháre kṛtáṃ ví cinuyāma śáśvat
“With you as the purifying one, Soma, may we always gather up the winning throw in the contest.”
Rigveda 9.97, verse 58, the final verse of the longest hymn in the collection. My rendering.
The gambling image in that last line is not incidental to the book: the winning cast of the dice and the successful pressing of the soma share a vocabulary, as the essay on the gambler’s hymn sets out. What matters here is where the verse sits. The longest hymn in the Rigveda was not there when the soma book was sorted, and no amount of reverence for its contents changes the arithmetic. The wider argument about maṇḍala 9 as a liturgical anthology assembled out of the family books is developed in the piece on the filtered god; the metre blocks are its skeleton.
The Long Tail of the Tenth
The tenth maṇḍala is where the late material concentrates, and its second half is sorted too, this time with no deity key and no metre key at all. From RV 10.85 to the end at 10.191 there are 107 hymns, 106 adjacent steps, and 91 of them run downhill. Shuffling those same lengths 20,000 times gives a mean of 57 descending steps with a standard deviation of 3. The observed 91 is eleven standard deviations out.
The sequence opens at forty-seven verses, which is the wedding hymn, and closes with hymns of three and four. Read as a shelf rather than as scripture, the tail of the tenth book is a run of material sorted by size, from the longest ceremonial poem in the group down to short household verses.
satyénóttabhitā bhū́miḥ sū́ryeṇóttabhitā dyaúḥ
“By truth is the earth propped up; by the sun is heaven propped up.”
Rigveda 10.85, verse 1, the opening of the wedding hymn and the top of the sorted tail. My rendering, following Griffith (1896).
Sitting inside that sorted tail, at seven verses, is RV 10.129, the Nāsadīya, which asks whether the overseer in the highest heaven knows how creation happened, or whether he does not know. The most philosophically radical seven verses in the corpus were placed where they are because seven is what comes after eight.
And the collection ends, as a list sorted by decreasing length must end, small:
sáṃ gachadhvaṃ sáṃ vadadhvaṃ sáṃ vo mánāṃsi jānatām
“Assemble, speak together: let your minds be all of one accord.”
(RV 10.191.2, trans. Griffith 1896)
Four verses about agreement in the assembly, closing the Rigveda not because a redactor chose a resonant finale but because it was short. The politics of that hymn, and the samiti it invokes, are the subject of the essay on the assembly and the last hymn. The accident is a good one. It is also an accident.
What the Sort Cannot Do
Three limits, stated plainly, because a method this clean invites overuse.
It does not rescue the book-order rule. Oldenberg’s first principle says the family books run from smallest to largest. They do not, quite: the hymn counts go 43, 62, 58, 87, 75, 104, with book 4 smaller than book 3 and book 6 smaller than book 5. The standard explanation is that those books grew after the order was fixed. I tested it directly by stripping from each book every hymn that falls in a terminal ascending tail, the material the sort itself flags as appended, and recounting. The result is 43, 59, 56, 82, 70, 94. Both inversions survive. Whatever unbalanced the books was not the same appending process the group sorts record, so either the growth was larger and messier than the tails suggest, or the size rule was never as tight as its statement implies. Bergaigne and Oldenberg were reconstructing a “primitive Saṃhitā” behind the received one, and this is a place where the reconstruction does more work than the evidence.
It cannot date anything by itself. Position gives relative order of incorporation within one group. It gives no absolute chronology, and it says nothing about the age of a hymn’s language, which is the domain of metrical and grammatical evidence covered in the essay on the syllable clock. The two methods are independent, which is what makes their broad agreement about the late strata worth something.
Aside. There is a circularity trap here worth naming. If you use arrangement to identify late hymns, then use those hymns to characterise what “late Vedic” looks like, then use that characterisation to date other hymns, you have gone round in a circle and come back with your own assumptions. The way out is to keep the evidence streams separate and see whether they converge: metre, grammar, vocabulary, ritual reference, geography, arrangement. When five of them point at the end of maṇḍala 10 and the tails of the family books, the conclusion is earned. When only one does, it is a hypothesis.
It tells us nothing about the poets. The sort is the work of redactors, and they are not the people who made the hymns. There is a genuine question, still open, about how far the arrangement reflects deliberate liturgical design rather than archival convenience. Maṇḍala 9’s metre blocks look designed for the pressing-day chanter who needs his verses by metre; the family books look like a librarian’s compromise. Nothing forces both to have the same explanation.
The Thing Itself
What a sorted archive tells you about the people who made it is that they were not free to edit.
Consider the alternative they did not take. Faced with a growing body of inherited poetry, most traditions smooth: they harmonise vocabularies, absorb variants, drop the embarrassing material, and make the seams disappear. The Rigveda’s redactors did something else. They left every hymn as they had received it, down to grammatical forms already archaic in their own speech and phrases whose meaning was lost by the time Yāska wrote the first commentary. Then they imposed order on the outside of the hymns, in the sequence, where it would not touch a syllable. The sort is what editorial intervention looks like when the text itself is untouchable.
The habit is not unique. The Qur’an’s suras after the opening run roughly longest to shortest; the letters of Paul in the New Testament canon are grouped and then ordered by falling length. Arranging by size is what you do when the contents are fixed and their order is not yet sacred. What is unusual in the Rigvedic case is how early the freeze came, how completely the tradition then preserved it, and therefore how much stratigraphy survives in a text with no manuscripts within a thousand years of its composition. The digital work now being done on the collection, clustering hymns by their semantic content rather than their length, is in a sense reopening a filing question the redactors closed. [4]
So here is the reading recommendation, and it takes ten minutes. Open maṇḍala 5 at hymn 20 and read through hymn 29, watching only the verse counts: 4, 4, 4, 4, 4, 9, 9, 6, 6, 15. You will feel the floor of the staircase, and then the five hymns that are standing on it, and then RV 5.29, fifteen verses on Indra drinking three lakes of soma and killing Vṛtra, parked at the end of an Agni sequence where by every rule it does not belong. Somebody put it there, on purpose, because it was the only place left. That is as close as the Rigveda comes to showing you its editor’s hands.
References
Bergaigne, Abel. Recherches sur l’histoire de la Saṃhitā du Rig-Véda. Paris: Imprimerie Nationale, 1887; originally published in the Journal Asiatique, 1886. gallica.bnf.fr.
Oldenberg, Hermann. Die Hymnen des Ṛgveda. Band I: Metrische und textgeschichtliche Prolegomena. Berlin: Wilhelm Hertz, 1888. archive.org.
Oldenberg, Hermann. Prolegomena on Metre and Textual History of the Ṛgveda. Translated by V. G. Paranjpe and M. A. Mehendale. Delhi: Motilal Banarsidass, 2005.
Jamison, Stephanie W., and Joel P. Brereton. The Rigveda: The Earliest Religious Poetry of India. 3 vols. New York: Oxford University Press, 2014. global.oup.com.
Jamison, Stephanie W., and Joel P. Brereton. The Rigveda: A Guide. New York: Oxford University Press, 2020. global.oup.com.
Witzel, Michael. ‘The Development of the Vedic Canon and its Schools: The Social and Political Milieu.’ In Inside the Texts, Beyond the Texts: New Approaches to the Study of the Vedas, ed. Michael Witzel. Harvard Oriental Series, Opera Minora 2. Cambridge, MA: Department of Sanskrit and Indian Studies, Harvard University, 1997, pp. 257-345.
Aufrecht, Theodor. Die Hymnen des Rigveda. 2nd ed. Bonn: Adolph Marcus, 1877. The standard critical text of the Saṃhitā.
Griffith, Ralph T. H. The Hymns of the Rigveda. 2nd ed. Benares: E. J. Lazarus, 1896. sacred-texts.com.
Müller, F. Max, ed. Rig-Veda-Sanhita: The Sacred Hymns of the Brāhmans, together with the Commentary of Sāyaṇācārya. 6 vols. London: W. H. Allen, 1849-1874.
Macdonell, Arthur A. A History of Sanskrit Literature. London: William Heinemann, 1900. archive.org.
Keith, Arthur Berriedale. The Religion and Philosophy of the Veda and Upanishads. Harvard Oriental Series 31-32. Cambridge, MA: Harvard University Press, 1925.
Gonda, Jan. Vedic Literature (Saṃhitās and Brāhmaṇas). A History of Indian Literature, vol. 1, fasc. 1. Wiesbaden: Otto Harrassowitz, 1975.
Arnold, E. Vernon. Vedic Metre in its Historical Development. Cambridge: Cambridge University Press, 1905. archive.org.
van Nooten, Barend A., and Gary B. Holland. Rig Veda: A Metrically Restored Text with an Introduction and Notes. Harvard Oriental Series 50. Cambridge, MA: Harvard University Press, 1994.
Renou, Louis. Études védiques et pāṇinéennes. 17 vols. Paris: Éditions de Boccard, 1955-1969.
Bollineni, Venkatesh, Igor Crk, and Eren Gultepe. ‘Mapping Hymns and Organizing Concepts in the Rigveda: Quantitatively Connecting the Vedic Suktas.’ arXiv preprint, 2025. arxiv.org/abs/2503.18226.
Comments (0)
No comments yet. Sign in to start the discussion.