Skip to content
← Back to finds

Thirty-Three Syllables

2026-05-01 · paper

There are moments when you stumble onto something that makes you sit back and just feel the weight of where you come from.

I was reading about numerical algorithms — the kind of thing you encounter when you're optimizing computation at scale — and I ended up on a tangent about square root methods. Specifically, how the "long division" technique for computing square roots actually works under the hood. I'd learned it mechanically in school. Never questioned where it came from.

Turns out, it came from home.


The Man

Aryabhata was born in 476 CE in Kusumapura — what we now call Patna, in Bihar, India. By the age of 23, he had written the Āryabhaṭīya, a 121-verse treatise that would become one of the most influential mathematical texts in human history.

This is the same person who:

  • Gave us the concept of zero as a placeholder in positional notation
  • Calculated pi (π) to four decimal places as 3.1416
  • Proposed that the Earth rotates on its axis (a millennium before Copernicus)
  • Developed trigonometric tables that were the most accurate of the ancient world

And buried in verse 4 of the Gaṇitapāda (mathematics chapter), he described an algorithm for computing square roots that is essentially identical to what we use today.


The Verse

The original Sanskrit, from Āryabhaṭīya 2.4:

भागं हरेदवर्गान्नित्यं द्विगुणेन वर्गमूलेन । वर्गाद्वर्गे शुद्धे लब्धं स्थानान्तरे मूलम् ॥

Transliteration:

bhāgaṃ hared avargān nityaṃ dviguṇena vargamūlena | vargād varge śuddhe labdhaṃ sthānāntare mūlam ||

Let me break this down word by word:

  • bhāgam haret — "one should divide"
  • avargāt — "from the non-square place" (the even-positioned digit from the right)
  • nityam — "always/constantly"
  • dviguṇena vargamūlena — "by twice the square root already obtained"
  • vargāt varge śuddhe — "having subtracted the square from the square place" (the odd-positioned digit)
  • labdham sthānāntare mūlam — "the quotient placed in the next position is the root"

In 33 syllables of Sanskrit verse, Aryabhata encoded a complete computational algorithm.


The Algorithm

Here's what those 33 syllables actually describe, step by step:

Step 1: Mark the digits of your number alternately as "square places" (odd positions from right: 1st, 3rd, 5th...) and "non-square places" (even positions: 2nd, 4th, 6th...).

Step 2: Starting from the leftmost square place, find the largest integer whose square is less than or equal to that digit. This is your first root digit. Subtract its square.

Step 3: Bring down the next digit (the non-square place). Divide by twice the current root. The quotient becomes the next digit of your root.

Step 4: Subtract the square of this new digit from the next square place.

Step 5: Repeat until all digits are exhausted.

Worked Example: √1444

Step 1: Group as 14 | 44
        14 is the first square place

Step 2: Largest square ≤ 14 is 9 (3²)
        Root so far: 3
        Remainder: 14 - 9 = 5

Step 3: Bring down 4 → 54
        Divide by 2×3 = 6
        54 ÷ 6 = 8 (with remainder)
        Root so far: 38

Step 4: Verify: 38² = 1444 ✓

√1444 = 38

This is exactly the long-division method taught in schools worldwide. The same algorithm implemented in early computing hardware. The same logic that runs inside Math.sqrt() in your programming language of choice.

Written in India. In Sanskrit. In 499 CE.


The Transmission

Here's what happened next — and why most people don't know this story.

The Āryabhaṭīya was translated into Arabic during the Islamic Golden Age. Al-Khwarizmi (yes, the man whose name gave us the word "algorithm") studied Indian mathematical texts extensively. The methods traveled through Baghdad to North Africa to Spain, and eventually into European mathematical tradition.

By the time these techniques appeared in European textbooks centuries later, the attribution had been lost. The algorithm was simply "the method for extracting roots." No mention of Aryabhata. No mention of India. No mention of the Sanskrit verse that encoded it all.

Brahmagupta, writing a century after Aryabhata in his Brāhmasphuṭasiddhānta (628 CE), extended these methods to cube roots and developed rules for arithmetic with zero and negative numbers — concepts that wouldn't appear in European mathematics for another 800 years.


The Context

To appreciate what Aryabhata accomplished, consider the state of mathematics elsewhere in 500 CE:

  • Europe was in the early Dark Ages. Roman numerals were still the standard. Long division didn't exist yet.
  • China had advanced arithmetic but hadn't formalized algorithmic methods for root extraction in this way.
  • The Middle East was pre-Islamic Golden Age — that flourishing would come partly because of translations of Indian texts.

Meanwhile, in India, Aryabhata was writing algorithms in metrical Sanskrit verse — a format designed for memorization and oral transmission. The constraints of the verse form (specific syllable counts, meter) meant every word had to carry maximum information density. It's compression in the most literal sense.


Why This Matters to Me

I write code for a living. I design algorithms that process millions of requests. I think about computational efficiency every day.

And the foundational algorithm for one of the most basic numerical operations — square root extraction — was invented by a mathematician from my country, writing in my ancestral language, fifteen centuries before I was born.

There's a narrative in tech that innovation is a Western invention. That the history of computing starts with Babbage, or Turing, or Silicon Valley. And those contributions are real and important. But the foundations — place-value arithmetic, zero, algorithmic thinking, the very concept of step-by-step computation — those came from the Indian subcontinent.

From scholars writing on palm leaves in a language that encoded mathematical precision into poetry.


What I Carry Forward

I don't share this as nostalgia. I share it because it reframes something.

When I sit down to design a system, or optimize an algorithm, or think about how to make something work at scale — I'm not just drawing on my CS degree or my years at Amazon. I'm drawing on a tradition that's been running for fifteen centuries. A tradition that valued elegance, precision, and the compression of complex ideas into their simplest possible form.

भागं हरेदवर्गान्नित्यं द्विगुणेन वर्गमूलेन — "divide the non-square place by twice the root."

Thirty-three syllables. A complete algorithm. Written in 499 CE.

I'm just continuing the work.


Further Reading: