Everyday equations

Ancient Indian mathematicians revelled in discovering efficacious algorithms for diverse problems

Everyday equations
The word algorithm, which is commonly used for any systematic procedure of computation, has an interesting history. It derives from the medieval word “algorism”, which referred to the process of doing arithmetic by means of Indian numerals (the so called “Hindu-Arabic numerals”) following the Indian methods of calculation based on the decimal place value system. The word algorism itself is a corruption of the name of the Central Asian mathematician al Khwarizmi (c 825) whose book on the Indian method of reckoning (Hisab al Hind) was the source from which the Indian methods of calculation reached the western world. The “algorists” in medieval Europe, who computed by algorism were at a great advantage compared to those who used the abacus or any other system of numeration such as the Roman system. The situation has been aptly described by the renowned 18th century French mathematician Pierre Simon de Laplace as follows:

“It is India that gave us the ingenious method of expressing all numbers by means of 10 symbols, each symbol receiving a value of position as well as an absolute value; a profound and important idea which appears so simple to us now that we ignore its true merit. But its very simplicity and the great ease which it has lent to all computations put our arithmetic in the first rank of useful inventions; and we shall appreciate the grandeur of this achievement the more when we remember that it escaped the genius of Archimedes and Apollonius, two of the greatest men produced by antiquity.”

The term “mathematics” is derived from the Greek word “mathema” which means knowledge or learning. The Indian term for this discipline is “ganita” which means calculation or computation. Indian mathematics, ganita, is quintessentially a science of computation. Indian mathematical texts are not just a collection of propositions or theorems about mathematical entities, they are more in the nature of a compendia of systematic and efficient procedures for computation (with numbers, geometrical figures and algebraic symbols standing for a class of mathematical objects and so on) as applicable to diverse problems. Thus, a majority of the sutras or verses of a classical Indian mathematical text are in the form of prescriptions or rules — they are referred to by the traditional commentators as vidhi, prakriya or karana-sutras — rules that characterise systematic procedures.

This approach is not special to mathematics alone, but common to most Indian knowledge systems — the sastras. The canonical texts of different disciplines in Indian tradition present rules which are generally called sutras or lakshanas. Most of these rules serve to characterise systematic procedures (referred to variously as vidhi, kriya or prakriya, sadhana, karma or parikarma, karana etc.) which are designed to accomplish specific ends. In this way, the Indian sastras are always rooted in vyavahara or practical applications.

This approach of Indian sastras allows them to have a great degree of flexibility in devising multiple approaches to the solutions of problems and not get bogged down by any dogma of inviolability of the fundamental truths posited or derived in any specific theoretical formulation employed in the discipline concerned. While the canonical texts of Indian sastras clearly assert the validity and the efficacy of the various procedures enunciated in them, they also simultaneously emphasise that these procedures are only upaya, or means for accomplishing specific ends, and there are no other restrictions which need to be imposed on them. The texts also declare that one is free to take recourse to any other set of systematic procedures, if they are equally efficacious in accomplishing the given ends.

It is the algorithmic approach that distinguishes the ancient Indian texts of geometry, the Sulvasutras (prior to 800 BCE), which deal with the construction of yajna-vedis (altars). While Sulvasutras do contain the earliest available statement of the so-called Pythagoras theorem — they state it in the form “the square made by the diagonal of a rectangle is equal to the sum of the squares made by its sides” — the main purpose of the Sulvasutras is to describe systematic procedures for constructing and transforming geometrical figures using a rajju (rope) and sanku (pole).

It has been remarked that the Indian scientific tradition has been profoundly influenced by the methodology of the Ashtadhyayi of Panini (prior to 500 BCE), in the same way the Greco-European tradition is said to have been influenced by the methodology of the Elements of Euclid. The Ashtadhyayi of Panini is a truly generative grammar in the modern sense that it is a collection of some 4,000 rules using which it is possible to derive every valid utterance of the Sanskrit language starting from a collection of primitive elements such as dhatus (verb-roots) and pratyayas (suffixes). Panini does not present any set of propositions or truths about language, but gives us an expert system so to say, which enables us to derive (and also analyse) all the valid utterances of Sanskrit language, an achievement which is as yet unparalleled in the grammatical tradition of any of the world languages. Many of the techniques used in Panini’s grammar — his abstract symbolism, use of the zero-morpheme (lopa), ideas of rule ordering and recursion — seem to have had significant impact on the development of Indian mathematics. They have also influenced developments in modern linguistics and computer science.

The ancient text of Sanskrit prosody, the Chandahsastra of Pingala (c 300 BCE) presents algorithms for converting a number to its binary form and vice versa. In Sanskrit prosody, any pada (line or foot) of a verse is analysed as a sequence of guru (long) and laghu (short) syllables, so that Pingala could essentially characterise it as a binary sequence. Pingala also gives an efficient algorithm for finding the n-th power of a number, which involves only around log2 (n) operations of squaring and multiplications (in contrast to the standard method which involves n multiplications), and was, therefore, adopted by all the later Indian mathematicians.

Pingala’s work also contains a cryptic sutra, which has been explained by later commentators, such as Halayudha (c 900 CE), as a rule for the computation of binomial coefficients using a tabular form, Meru, which is a version of the famous Pascal triangle. Pingala’s work set the stage for subsequent developments in combinatorics, which were initiated in texts of prosody and music and were formulated in a general mathematical setting by later mathematicians, Mahaviracharya (c 850), Bhas­karacharya II (b 1114) and especially Narayana Pandita (c 1356).

In ancient times, ganita formed an important part of the science of astronomy (jyotisha). The Ary­abhatiya (c 499 CE) of Aryabhata is a great classical work which summarised the entire subject of mathematical astronomy in 121 aphoristic verses, of which the section on mathematics, Gani­tapada, comprised just 32 verses. We can see that, by that time, Indian mathematicians had systematised most of the basic procedures of arithmetic (such as place value system, the standard algorithms for square-roots and cube-roots), algebra (solution of linear and quadratic equations), geometry (standard properties of planar and solid figures), commercial mathematics (rule of three, calculation of interest) and trigonometry, that are generally taught in schools today — and many more that are more advanced (such as the kuttaka method of solving linear indeterminate equations and computation of sine-tables) which are of importance in astronomy.

Several detailed commentaries (bhashyas) were written on the cryptic verses of Aryabhatiya, of which the most important ones are those of Bhaskara I (c 629 CE) and the great Kerala astronomer Nilakantha Somayaji (c 1444-1544). The commentary of Bhaskara I provides detailed explanations (along with examples) for the various results and procedures given in Aryabhatiya. The Aryabhatiya-bhashya of Nila­kantha presents detailed demonstrations (upapatti, yukti). Occasionally, Nilakantha also discusses some important refinements or modifications.

We may cite, for instance, Nilakantha’s discussion of the more accurate table of sines (due to Madhava), and more importantly, his famous dictum based on the latitudinal motion of the planets Mercury and Venus, that: “The earth is not circumscribed by their orbits (the orbits of Mercury and Venus), the earth is always outside of them.” This led Nilakantha to formulate a modified planetary model according to which the five planets Mercury, Venus, Mars, Jupiter and Saturn go around the mean sun, which in turn goes around the earth. This was nearly a hundred years prior to a similar model being proposed by Tycho Brahe in Europe.

We shall not go into the contributions of the long tradition of illustrious astronomers and mathematicians who followed Aryabhata — and the tradition continued to flourish till the 19th century. We instead present some illustrations to show how the algorithmic approach of the Indian mathematicians led them to discover optimal and efficacious algorithms for diverse problems. The most famous example is, of course, the Chakravala algorithm for the solution of the quadratic indeterminate equation (the so called Pell’s equation): X² – DY² = 1.

Here, D is a given positive integer which is not a square and the problem is to solve for X, Y in integers. This problem (called vargaprakriti) was first explicitly posed by Brahmagupta in his Brahma­sph­utasiddhanta (c 628 CE), though the ancient Sul­vasutras seem to have used the solution X=577, Y=408 for the case D=2, to get the rational approximation 577/408 for the square-root of 2. Brahmagupta also gave a rule of composition (called bhavana) which allows one to obtain an infinite number of solutions once a particular solution is found.

The Chakravala method for solving the above equation has been presented in the famous textbook of algebra, Bijaganita, of Bhaskaracharya (b 1114), though it is now known that the algorithm also appears in an earlier work by Acharya Jayadeva (prior to c 1050).

Bhaskara used this method to solve the equation: X² – 61Y² = 1, and showed that the smallest solution is given by X=1766319049 and Y=226153980. What is intriguing is that the same example was posed as a challenge by the famous French mathematician, Pierre de Fermat, in February 1657 to his colleagues in France.

He later posed this and other vargaprakriti equations (with different values of D) as a challenge to British mathematicians. To cut the story short, British mathematicians Wallace and Brouncker did come up with a method of solution, which was later systematised as an algorithm, based on the so-called regular continued fraction development of the square-root of D, by Euler and Lagrange in the 1770s.

In 1929, AA Krishnaswamy Ayyangar showed that the Cha­kravala algorithm corresponds to a so-called semi-regular continued fraction expansion and is also optimal in the sense that it takes much fewer steps to arrive at the solution than the Euler-Lagrange method. It is now known that on the average the Euler-Lagrange method takes about 40 per cent more number of steps than the Chakravala.

Finally, we make a brief mention of the infinite series for Pi (the ratio of the circumference to the diameter of a circle) discovered by Sangamagrama Madhava (c 1380-1460), founder of the Kerala School of Astronomy. For instance, Madhava presents the following series (the so-called Gregory-Leibniz series rediscovered in the 1670s): Pi/4 = 1 – 1/3 + 1/5 – 1/7 +...

However, Madhava is not content with merely enunciating this elegant result, as it is not of any use in actually calculating the value of Pi. Summing say 50 terms in this series does not give a value of Pi accurate even to two decimal places. The famous verses of Madhava which present the above series also go on to give a set of end-correction terms which can be used to obtain better approximations. Using only 50 terms of the above series, with the accurate end-correction term of Madhava, leads to a value of Pi accurate to 11 decimal places. Madhava also used these correction terms to transform the above series into more rapidly convergent versions. Systematic proofs of all the infinite series discovered by Madhava and their transformations may be found in the famous Malayalam work Ganitayuktibhasha (c 1530) of Jyeshthadeva.

The great astronomer Nila­kantha was a third generation disciple of Madhava and the tradition of Kerala School continued (albeit at a modest level due to the greatly disturbed political situation of Kerala after the 1550s) till early 19th century. However, a century later, the algorithmic approach of Indian mathematics was in evidence again in the work of another great mathematician, Srinivasa Ramanujan (1888-1920), who seems to have been a worthy successor of Madhava in his extraordinary felicity to work with infinite series and their transformations.

(MD Srinivas is the chairman of Centre for Policy Studies, Chennai)



For Printed Version : 26know1, 26know2

the ease with which we have

the ease with which we have churned out world class intellectual capital in the past few decades despite lack of development is an indicator of this scientific temper and mathematical culture being deep-rooted in our collective conscious. lots of people credit the english education for india's success in software which is such a superficial analysis for the british ruled another 100 countries: why is it that none of them have their IITs and IIMs and IISCs? this work is of yeomen importance for a large number of indians are growing up thinking their forefathers were only good at spiritual pursuits and had nothing to show in the name of more secular achievements. that is a dangerous and self-defeating conclusion and the sooner it is corrected, the better. a BIG THANK YOU.

You have done an emormous

You have done an emormous service to all lovers of Math and Indian culture and I revere both. to think that our forefathers were are the forefront of mathematical rigour till so recently is indeed inspiring. I would urge you to flesh this out more and convert this material into a book. But a BIG THANK YOU! i will share this with my daughters and it will encourage them to work harder at their math!

Excellent article !!

Excellent article !!

Excellent article !!

Excellent article !!

Thanks for the sending. My

Thanks for the sending. My experience with presenting such facts just ends with momentous appreciation followed by forgetfulness of the information thereafter! Now there are Indians who say that such things do not give any pride to the country! Rangachari


  • Presdential election may have become a battle field, but the final call rests with Modi

    Forging a national consensus on the presidential candidate should be the best option for both ruling National Democratic Alliance (NDA) led by prime m


Stay informed on our latest news!


Sandeep Bamzai

Freedom Files : Creating a communal cleave

The Nawab of Bhopal Sir Hafiz Hamidullah Khan, saboteur ...

Susan Visvanathan

Landed in trouble

The British always required get away places. Shimla is the ...

Kuruvilla Pandikattu

How to understand each other better

How do we understand and encounter people? But how can ...