Madhava's Pi: The 'Gregory-Leibniz' Series
The infinite series for pi that should bear Madhava's name
Discover the infinite series for pi developed by Madhava of Sangamagrama around 1400 CE, later independently rediscovered by Gregory in 1671 and Leibniz in 1674, who got the European credit that should have been Madhava's.
The Verse of the Odd Numbers
Sometime between 1380 and 1400 CE, in the village of Saṅgamagrāma on the Periyar river in central Kerala, Mādhava of Saṅgamagrāma scored a single Sanskrit couplet onto a palm-leaf folio with an iron stylus. The verse begins vyāse vāridhi-nihate. Translated, it tells a student to take the diameter of a circle, multiply it by four, and then subtract one-third of that, add one-fifth of that, subtract one-seventh, and keep going through the odd numbers forever, alternating minus and plus. The running total, in the limit, is the circumference of the circle. Rearrange, and you get the value of π.
It was the earliest known written statement of what modern textbooks call the Gregory-Leibniz series. Gregory would post it in Scotland in 1671. Leibniz would publish it in Germany in 1674. Neither man would know that a Nambudiri Brahmin in a Kerala village had beaten them to it by almost three centuries, and in a form sharper than either of theirs.
Write down the number one. Subtract one third. Add one fifth. Subtract one seventh. Keep going forever, alternating plus and minus, with each successive odd number as the next denominator. The running total, in the limit, is exactly one quarter of pi. Multiply by four and you have pi itself. This is one of the most beautiful identities in mathematics. It ties together the ratio of a circle's circumference to its diameter, the odd numbers, and the operation of infinite addition. It appears in every modern calculus textbook under the names of two European mathematicians, James Gregory of Scotland and Gottfried Wilhelm Leibniz of Germany, who independently wrote it down in 1671 and 1674 respectively. Neither man was the first. The identity was first written down in Sanskrit verse, with a full derivation and a set of correction terms Gregory and Leibniz never knew, by a Kerala astronomer named Madhava of Sangamagrama, working on the Malabar coast of south India, between roughly 1380 and 1420 CE. Gregory and Leibniz were almost three centuries late.
Madhava's Arc Tangent Series
Madhava's actual result is more general than the simple pi series. He writes down the full infinite power series for the arc tangent function, in modern notation arctan x equals x minus x cubed over three plus x to the fifth over five minus x to the seventh over seven and so on. The series converges for every x between minus one and one. When x equals one, the arctangent is exactly pi over four, and Madhava's arctan series collapses to the famous alternating sum of reciprocals of odd numbers. The derivation is preserved in the Yuktibhasa of Jyesthadeva, written in Malayalam prose around 1530 CE, where the logic is laid out in full, step by step, with geometric justifications the modern reader can follow without trouble. It is the world's earliest surviving derivation of a power series expansion, written more than two centuries before Newton, Leibniz, and Taylor assembled the European version of calculus.
The Problem of Slow Convergence

The basic arctan series at x equal to one has a serious practical drawback. It converges painfully slowly. To get three decimal places of pi, you have to sum roughly a thousand terms. To get four places, ten thousand. To get ten places, ten billion. No practical astronomer could afford to add ten billion fractions by hand. Madhava understood this perfectly well. He was not writing down the series as a theoretical curiosity. He was writing it down to compute pi to high precision for astronomical tables, and for that he needed convergence acceleration. He provided it. The Yuktibhasa and its predecessor the Tantrasangraha of Nilakantha Somayaji preserve a sequence of correction terms, known in Sanskrit as antyasamskara, end correction, which when added after a finite partial sum of the arctan series give a dramatically better approximation than the partial sum alone. Madhava gives three successive correction terms, each better than the last, and with them the series converges at a useful rate. Fifty terms with correction produces pi to roughly eleven decimal places.

The Pi Value Preserved in a Sanskrit Number Word

Madhava's actual computed value of pi is preserved in the Sadratnamala of Sankara Varman and in other Kerala school texts as a bhutasankhya number word, a Sanskrit compound in which each word stands for a digit of the numerical value. Decoded, Madhava's pi is 2827433388233 divided by 900000000000, which works out to 3.14159265359, accurate to eleven decimal places. This is the most precise value of pi computed in any civilization before the European eighteenth century. It sat in Kerala palm leaf manuscripts, quietly correct, while European astronomers were still struggling with values accurate to six or seven places. No European mathematician would reach eleven decimal places of pi until the work of Abraham Sharp in 1699, nearly three hundred years after Madhava.
Gregory and Leibniz, Three Centuries Late
In 1671, the Scottish mathematician James Gregory wrote down the infinite series for the arc tangent in a letter to his London correspondent John Collins. In 1674, independently, the German polymath Gottfried Wilhelm Leibniz derived the series x equal to one special case that gives pi over four. Neither man, as far as any surviving document indicates, had ever heard of Madhava of Sangamagrama. The European mathematical community, still assembling its own version of the infinite calculus, received the series as a new discovery and named it accordingly. It has been the Gregory Leibniz series in European textbooks ever since. The name is not wrong as a statement of who independently derived it in Europe. It is wrong as a statement of who first wrote it down. That honor belongs to Madhava, and the gap between his publication in verse around 1400 CE and Gregory's letter in 1671 is almost exactly two hundred and seventy years.
Did the Series Travel?
A growing body of historical scholarship, led by C.K. Raju and supported in part by the work of George Gheverghese Joseph and Dennis Almeida, argues that the Kerala school results did not remain locked in Kerala. From the 1540s onward, Jesuit missionaries under the Portuguese Padroado system established themselves in Kochi, Cranganore, and other Malabar coast towns where the Kerala school was still actively transmitting Madhava's calculus to students. Several Jesuit mathematicians, including Matteo Ricci before his China posting, are known to have requested Indian astronomical manuscripts. The transmission routes existed. The motive, to obtain better astronomical tables for navigation, existed. The timing matches the beginning of the European calculus boom in the late seventeenth century. The documentary chain linking specific Kerala texts to specific European mathematicians is not yet ironclad, and mainstream historians of mathematics still treat Gregory and Leibniz as independent rediscoverers. But the question is live, the evidence is accumulating, and the default assumption of pure parallel independent discovery is harder to defend with every new archival find.
What Is Actually at Stake
The question of priority, in the end, is not about national pride. It is about the accuracy of the story we tell about where modern mathematics came from. The infinite series method is the beating heart of calculus, and calculus is the beating heart of physics, engineering, and the quantitative sciences. If the first author of the pi series is a Kerala Brahmin working in a small temple town in 1400 CE, and the first European authors are Scottish and German mathematicians in 1671 and 1674, then the story of modern mathematics has at least two hundred and seventy years of prehistory that every standard textbook currently omits. Restoring Madhava's name to the series does not dispossess Gregory or Leibniz of anything. They still independently derived the result. It only ensures that the earliest known author is named first, as historical accuracy demands. In the long run, a series as important as this one deserves its full genealogy, and the genealogy begins in Sangamagrama in the reign of Vijayanagara, not in Edinburgh under the restored Stuarts.
Key figures
Madhava of Sangamagrama
c. 1340 to 1425 CE, Sangamagrama (modern Irinjalakuda, Kerala)
Jyesthadeva
c. 1500 to 1575 CE, Trkkantiyur and Alathiyur, Kerala
James Gregory
1638 to 1675 CE, Aberdeen and Edinburgh, Scotland
Case studies
Sangamagrama c. 1400 CE: Correcting the Tail of an Infinite Series
Around the year 1400 CE, in the small temple town of Sangamagrama on the Malabar coast, Madhava faces a practical problem. His new infinite series for pi is exact, but it converges so slowly that to compute pi to even four decimal places would require adding ten thousand terms. No astronomer, his or anyone else's, can afford this. He could declare the series a theoretical curiosity and move on. He does something much harder instead. He studies the behavior of the tail. He notices that after a few dozen terms, the successive contributions settle into a predictable pattern, and that pattern can be modeled. He proposes a closed form correction. Add half of the reciprocal of the next even number after you stop, rather than simply stopping. The proposal is staggeringly effective. Fifty terms of the raw series, which without correction would give pi only to two decimal places, suddenly give pi to ten decimal places. Madhava then proposes two further corrections, each better than the last. With them, he computes pi to eleven decimal places. He records the value in a bhutasankhya number word so it will survive manuscript transmission. The whole program, the series plus the corrections plus the computed value, is then passed to his students, and through them to Nilakantha, Jyesthadeva, and Sankara Variyar, who preserve it verbatim in their own books over the next century and a half.
This is the Kerala school's deepest commitment on display. The infinite is not a theoretical ornament. It is a computational tool, and a tool is only as useful as it is practical. Madhava refuses to accept the dichotomy between a series that is exact in theory and useful in practice. He insists that both must be true, and then works out the technique that makes both true at once. The philosophical commitment is to ananta, the unlimited, as a legitimate mathematical object, and the engineering commitment is to make ananta yield finite answers to finite practical questions. The two commitments are the same commitment. In the Indian intellectual tradition, a truth that cannot be applied is not a complete truth. The antyasamskara is the application, and it is what turns the pi series from an elegant identity into a working algorithm.
Madhava's pi value of 3.14159265359, accurate to eleven decimal places, stood as the most precise value of pi computed in any civilization for nearly three centuries. No European astronomer matched it until Abraham Sharp in 1699, and by then the Kerala school had already been maintaining its more precise astronomical tables on palm leaf manuscripts for ten generations. The correction term method, rediscovered in Europe only in the nineteenth and twentieth centuries under names such as Euler transform and Richardson extrapolation, is still in active use in every modern computer algebra system and every high precision numerical library.
A slow algorithm is not a broken algorithm. It is an invitation to study the tail. Most premature optimization fails because it tries to speed up individual steps. The deep speedups come from understanding the limit behavior and correcting for it in closed form. Madhava understood this six hundred years ago. Most modern engineers still do not.
The raw Madhava pi series requires roughly ten billion terms to produce ten decimal places of pi. With Madhava's first antyasamskara end correction, fifty terms suffice. That is a speedup factor of two hundred million, obtained by one closed form correction to the series tail.
Edinburgh 1671 and Hanover 1674: Two Letters, One Series, No India
On 15 February 1671, the Scottish mathematician James Gregory writes a letter from Edinburgh to his London correspondent John Collins, announcing that he has found an infinite series for the arc of any given angle. The series is, in modern notation, arctan x equals x minus x cubed over three plus x to the fifth over five minus x to the seventh over seven and so on. Gregory's derivation uses the emerging techniques of the European infinitesimal calculus, then still being quietly developed by Newton in Cambridge and Leibniz in Paris. Three years later, in 1674, Leibniz independently derives the special case at x equal to one, which gives the elegant identity pi over four equal to one minus one third plus one fifth minus one seventh and so on. Neither mathematician, as far as any surviving letter, notebook, or publication indicates, has ever heard of Madhava of Sangamagrama or of the Kerala school of mathematics. The result is celebrated as a new discovery of the new European analysis. It enters the textbooks as the Gregory Leibniz series. In the long run, the name will stick, and the two hundred and seventy year prehistory of the series on the Malabar coast of India will quietly disappear from the standard European telling of where calculus came from.
The structural parallel with Brahmagupta's quadratic formula is almost exact. In both cases, the Indian original is genuine, the European rediscoverers are genuine, and the transmission chain is uncertain but plausible. In both cases, the European textbook tradition stabilized on a European name for the result and the earlier Indian author quietly dropped out. The rediscovery does not diminish Madhava's priority, nor does Madhava's priority diminish Gregory or Leibniz's independent work. What does need correction is the telling. A complete history of the arctan series lists Madhava first, around 1400, and Gregory and Leibniz second, between 1671 and 1674. The European textbook currently lists only the second pair. That is an error of omission, and it is an error that costs Indian students and Western students both, by giving them an incomplete picture of where the foundations of modern analysis actually came from.
The Gregory Leibniz name has held in European and global textbooks for three and a half centuries. Academic history of mathematics, under the pressure of modern scholarship by Kim Plofker, George Gheverghese Joseph, C.K. Raju, K.V. Sarma, and others, has gradually shifted to describing the series as the Madhava Gregory Leibniz series, in roughly that order of priority, although the shift has not yet reached most undergraduate calculus textbooks. The Indian Mathematical Society, ISRO, and several Indian universities now consistently use the Madhava name for the series in their own publications. The corrected name is slowly spreading. In time, perhaps, it will reach the standard modern textbook too.
Independent rediscovery is a real phenomenon, and European mathematicians of the seventeenth century were not frauds. They were simply late. When a result has an earlier author who was not known to the later ones, the correct response is not to strip the later authors of credit. It is to restore the earlier author's name at the head of the attribution, where it belongs as a matter of historical accuracy. Madhava before Gregory, Gregory before Leibniz, all three rather than only two.
The gap between Madhava's derivation of the pi series around 1400 CE and James Gregory's independent European rediscovery on 15 February 1671 is approximately two hundred and seventy one years. The gap between Madhava's result and Leibniz's 1674 derivation is approximately two hundred and seventy four years. Both gaps are larger than the entire history of the United States of America.
The Kerala to Europe Transmission Question
In the 1540s, Jesuit missionaries under the Portuguese Padroado establish themselves on the Malabar coast, in Kochi, Cranganore, and several smaller towns directly adjacent to the centers where the Kerala school of mathematics was still actively transmitting Madhava's infinite series methods to its students. Several Jesuit mathematicians, trained at the Collegio Romano in Rome, serve in the Kochi missions during the late sixteenth and early seventeenth centuries. Several of them explicitly request Indian astronomical manuscripts, with the stated goal of obtaining better tables for Portuguese and Spanish ocean navigation, a strategic priority of the era. The documentary trail of these requests is partial but real. It exists in Jesuit archives in Rome and in Lisbon. The timing fits. The motive fits. The opportunity fits. Beginning in 2007, the Indian scholar C.K. Raju argued in his book Cultural Foundations of Mathematics that the Kerala school results most likely reached Europe through this Jesuit channel, influencing the later development of European calculus even if the specific individual transmission to Gregory and Leibniz cannot be proved. The thesis has been vigorously debated. Mainstream historians of mathematics, including Kim Plofker, have generally argued that the evidence is not yet sufficient to overturn the default assumption of independent European rediscovery. Raju and others have responded that the default assumption itself is a legacy of colonial historiography, and that the standard of proof required of the transmission hypothesis is being set unreasonably high. As of 2026, the question remains live, unresolved, and increasingly central to the historiography of early modern mathematics.
The traditional Indian philosophical concept of paramparā, the unbroken chain of teaching from master to student, applies as much to the transmission of mathematical results as to the transmission of scriptures. A paramparā does not require that each link be personally named. It requires that the chain of transmission be unbroken in substance, even when individual links are lost or unrecorded. The question about Kerala to Europe transmission is, in this traditional framing, the question of whether the chain of mathematical paramparā extends through the Jesuit missionaries and into the European calculus tradition, making the entire modern tradition a continuation of the Kerala lineage rather than an independent second founding. If the transmission happened, the entire story of modern analysis changes. It becomes the story of a single paramparā that started at Sangamagrama in 1400 CE and is still running in every calculus classroom in the world today. If it did not happen, then Europe independently rediscovered the same results, and modern analysis has two parallel founding traditions rather than one. Either conclusion is consistent with honoring Madhava's priority. Only one is consistent with restoring a single unified paramparā to the tradition.
The transmission question is now actively researched on three continents. Archival work in Jesuit collections in Rome, Lisbon, and Goa continues to produce new fragments of the paper trail. The Aryabhata Research Institute in Thiruvananthapuram, K.V. Sarma's textual scholarship at the Adyar Library in Chennai, and the Kerala Council for Historical Research have all contributed to the reconstruction of the Kerala school corpus. The mainstream history of mathematics has increasingly acknowledged the priority of Madhava himself, even where it has not yet conceded the transmission hypothesis. The question of whether European calculus is a continuation of the Kerala school tradition or a genuine independent rediscovery is one of the most important open questions in the history of mathematics today, and its resolution, in either direction, will reshape how the subject is taught and how its lineage is understood.
The hardest history to write is the history of transmission, because the evidence is almost always partial and the motive of the transmitter is almost never recorded in writing. The default assumption of independent rediscovery is comfortable but it is not neutral. It is itself a hypothesis, and it should be defended on the same evidentiary standard demanded of its alternatives. The restoration of Madhava's name to the series does not require resolving the transmission question. It only requires acknowledging that the series was written first in Sanskrit, in India, in 1400 CE, and that every later statement of it is either an inheritance of that authorship or an independent rediscovery of it. Which of the two is true is a separate question, and a deeply interesting one.
Jesuit missionaries were present in the Kerala cultural region continuously from the 1540s until the Portuguese were expelled by the Dutch in 1663. During this period of roughly 120 years, they operated in direct proximity to Kerala school teaching centers at Sangamagrama, Trkkantiyur, Alathiyur, and elsewhere. The first European statement of Madhava's pi series, by James Gregory in Edinburgh, dates to 1671, eight years after the Jesuit withdrawal from the Malabar coast.
Historical context
The Kerala school of astronomy and mathematics, flourishing on the Malabar coast of south India from the late fourteenth century CE through the late seventeenth century CE, under the Vijayanagara successor states and later the independent Kerala kingdoms of Cochin, Calicut, and Travancore, in a continuous teaching lineage that included Madhava, Parameswara, Damodara, Nilakantha Somayaji, Jyesthadeva, Sankara Variyar, Achyuta Pisharati, and Putumana Somayaji.
The Kerala of the fifteenth and sixteenth centuries was one of the most stable and prosperous regions in south India. The Vijayanagara empire to the north offered a buffer against the Bahmani and later Mughal advances, while the independent Kerala principalities traded directly with the Arab, Chinese, and eventually European commercial networks that converged on the spice coast. The Nambudiri Brahmin community, to which Madhava and most of his successors belonged, maintained a strong tradition of Vedic scholarship combined with advanced mathematical and astronomical work, organized around small temple towns and the extended teaching lineages of the great illams or Brahmin households. The Kerala school was not a single institution. It was a chain of gurus and students, linked by family and by teacher pupil relationships across generations, who continued to refine and transmit the same body of results for nearly three centuries. The tradition was proudly local, written in Sanskrit at its formal core and in Malayalam at its pedagogical surface, and it did not depend on royal patronage or on any centralized academy for its continuity. It depended on the quiet ongoing transmission of knowledge from one generation of mathematicians to the next.
This lesson corrects one of the largest known misattributions in the history of mathematics. The infinite series for pi, the beating heart of the modern computation of the most famous transcendental constant, is currently named in most textbooks after two European mathematicians who independently rediscovered it almost three centuries after its original Indian author. Restoring the authorship to Madhava is not an act of national pride. It is an act of historical accuracy about a result every student of calculus encounters. The correction does not remove Gregory or Leibniz from the story. It adds Madhava at the front of it, where he belongs, and it opens the larger question of whether the European calculus is an independent founding or a continuation of an Indian paramparā that began in Sangamagrama in 1400 CE.
Living traditions
Madhava's infinite series for pi is the computational ancestor of every modern high precision pi calculation. The Chudnovsky brothers' record setting computations since the 1980s, the y cruncher software used to compute trillions of pi digits as of 2025, and every modern computer algebra system all use rapidly convergent series whose derivation and convergence acceleration techniques trace back, conceptually and in some cases literally, to Madhava's arctan series and his end correction method. The Ramanujan formula for pi, discovered in the early twentieth century and used as the basis for the Chudnovsky algorithm, is itself a direct continuation of the Indian infinite series tradition that Madhava founded. Modern numerical analysis courses increasingly acknowledge Madhava as the originator of convergence acceleration techniques. India's National Mathematics Day on December 22, observed on Ramanujan's birthday, has in recent years featured public lectures and school programs that name Madhava alongside Ramanujan as the two great infinite series mathematicians of the Indian tradition. The Kerala school is now established in the mainstream history of mathematics, the Madhava name is slowly reaching international textbooks, and the work of restoring the full paramparā continues one classroom at a time.
- Kerala School Scholarship and Textual Reconstruction: Active scholarly work on the Kerala school continues today at several Indian institutions, most notably the Inter University Centre for Astronomy and Astrophysics in Pune, the Adyar Library and Research Centre in Chennai, the Kerala Council for Historical Research in Thiruvananthapuram, and the Department of Theoretical Physics of the University of Madras. K.V. Sarma's multi decade textual work on the Yuktibhasa, the Tantrasangraha, and the Kriyakramakari, continued after his death by his students and successors, has produced the modern critical editions and translations that have put Madhava's achievements on the standard scholarly map. The ongoing archival work in Jesuit collections in Rome, Lisbon, and Goa adds new fragments to the transmission question each year. The Kerala school is, in this sense, still alive, not as a teaching lineage that computes new results, but as a historical tradition whose manuscripts, commentaries, and unanswered questions are still being studied by mathematicians, Sanskritists, and historians working together.
- Madhava Attribution in Indian Mathematical Culture: A growing proportion of Indian mathematical and scientific institutions now consistently use the name Madhava for the pi series, the arctan series, and the more general Kerala school calculus results. The Indian Mathematical Society, the Ramanujan Mathematical Society, ISRO, the Indian Institute of Science, the Indian Institutes of Technology, the Tata Institute of Fundamental Research, and increasing numbers of state and central government textbooks now either prefer the Madhava name outright or use the compound name Madhava Gregory Leibniz series. The shift is slow but it is real. Every Indian student who learns the series by Madhava's name is one more thread in the cultural paramparā that the Kerala school began, and every international student who learns that the series has an Indian author before it had a Scottish or German one is a small correction to a three century old historiographical habit.
- Irinjalakuda: Madhava's Sangamagrama: Sangamagrama, the home town of Madhava of Sangamagrama, is identified by most scholars with modern Irinjalakuda, a small town in Thrissur district, Kerala, about 40 km southeast of Kochi. The town is home to the ancient Koodalmanikyam Temple, one of the few Kerala temples dedicated primarily to Bharata, the brother of Rama, and to the traditional Nambudiri Brahmin quarters in which Madhava's family household stood. The surrounding region is the heartland of the Kerala school of astronomy and mathematics. Nearby sites include Trkkantiyur, where Damodara and his student Nilakantha Somayaji worked, and Alathiyur, associated with Jyesthadeva and the Yuktibhasa. For a pilgrim of Indian mathematics, Irinjalakuda is the exact ground where the infinite power series for pi was first written down around 1400 CE, more than two and a half centuries before it reached Europe.
- Kochi and the Jesuit Transmission Archives: Kochi, the former Portuguese stronghold on the Malabar coast, is the site of the first European missionary and mathematical presence in Kerala. The St Francis Church in Fort Kochi, built in 1503, is the oldest European church in India and stands on the ground where the early Portuguese missionary community lived. The Mattancherry Palace and the Paradesi Synagogue nearby reflect the cosmopolitan fifteenth and sixteenth century coastal culture in which Kerala school mathematics and European missionary scholarship coexisted. The archives of the Jesuit missions that operated in and around Kochi from the 1540s to 1663 are distributed today between repositories in Rome, Lisbon, and Goa. For a pilgrim of the history of mathematics, Kochi is the ground on which the transmission question is rooted. Whether or not the Kerala school results reached European mathematicians through the Jesuit channel, this is the coast on which the possibility existed.
Reflection
- Madhava treated the infinite as an ordinary mathematical object, as naturally as a merchant treats a number. Why was the Indian tradition so comfortable with the infinite when the Greek and European traditions remained suspicious of it for two thousand years? What does this reveal about the relationship between metaphysics and mathematics?
- Gregory and Leibniz independently rediscovered a result that Madhava had already written down two hundred and seventy years earlier, and the result is still taught under their names. When a truth has been discovered twice in different civilizations, what do we owe the first discoverer? And what do we lose when we name the result only after the second?
- Pick an idea, technique, or tool you use in your daily work that you believe to be a modern invention. Spend thirty minutes searching for its earliest known use. Was it really invented when you thought it was? If not, who invented it, and how many centuries earlier?