Trairāśika

Trairāśika is the Sanskrit term used by Indian astronomers and mathematicians of the pre-modern era to denote what is known as the "rule of three" in elementary mathematics and algebra. In the contemporary mathematical literature, the term "rule of three" refers to the principle of cross-multiplication which states that if $$\tfrac{a}{b}=\tfrac{c}{d}$$ then $$ad=bc$$ or $$a=\tfrac{bc}{d}$$. The antiquity of the term trairāśika is attested by its presence in the Bakhshali manuscript, a document believed to have been composed in the early centuries of the Common Era.

The trairāśika rule
Basically trairāśika is a rule which helps to solve the following problem:
 * "If $$ p $$ produces $$ h $$ what would $$i $$ produce?"

Here $$p $$ is referred to as pramāṇa ("argument"), $$h $$ as phala ("fruit") and $$ i $$ as ichcā ("requisition"). The pramāṇa and icchā must be of the same denomination, that is, of the same kind or type like weights, money, time, or numbers of the same objects. Phala can be a of a different denomination. It is also assumed that phala increases in proportion to pramāṇa. The unknown quantity is called icchā-phala, that is, the phala corresponding to the icchā. Āryabhaṭa gives the following solution to the problem:
 * "In trairāśika, the phala is multiplied by ichcā and then divided by pramāṇa. The result is icchā-phala."

In modern mathematical notations, $$\text{icchā-phala }=\tfrac{\text{phala}\times\text{icchā}}{\text{pramāṇa}}.$$

The four quantities can be presented in a row like this:
 * pramāṇa | phala | ichcā | icchā-phala (unknown)

Then the rule to get icchā-phala can be stated thus: "Multiply the middle two and divide by the first."

Illustrative examples
1. This example is taken from Bījagaṇita, a treatise on algebra by the Indian mathematician Bhāskara II (c. 1114–1185).


 * Problem: "If two and a half pala-s (a unit of weight) of saffron be obtained for three-sevenths of a nishca (a unit of money); say instantly, best of merchants, how much is got for nine nishca-s?"
 * Solution: pramāṇa = $$\tfrac{3}{7}$$ nishca, phala = $$2\tfrac{1}{2}$$ pala-s of saffron, icchā = $$9$$ nishca-s and we have to find the icchā-phala. $$\text{icchā-phala }=\tfrac{\text{phala}\times\text{icchā}}{\text{pramāṇa}}=\tfrac{(2\tfrac{1}{2})\times 9}{\tfrac{3}{7}} = 52\tfrac{1}{2}$$ pala-s of safron.

2. This example is taken from Yuktibhāṣā, a work on mathematics and astronomy, composed by Jyesthadeva of the Kerala school of astronomy and mathematics around 1530.


 * Problem: "When 5 measures of paddy is known to yield 2 measures of rice how many measures of rice will be obtained from 12 measures of paddy?"
 * Solution: pramāṇa = 5 measures of paddy, phala = 2 measures of rice, icchā = 12 measures of rice and we have to find the icchā-phala. $$\text{icchā-phala }=\tfrac{\text{phala}\times\text{icchā}}{\text{pramāṇa}}=\tfrac{2\times 12}{5} = \tfrac{24}{5}$$ measures of rice.

Vyasta-trairāśika: Inverse rule of three
The four quantities associated with trairāśika are presented in a row as follows:
 * pramāṇa | phala | ichcā | icchā-phala (unknown)

In trairāśika it was assumed that the phala increases with pramāṇa. If it is assumed that phala decreases with increases in pramāṇa, the rule for finding icchā-phala is called vyasta-trairāśika (or, viloma-trairāśika) or "inverse rule of three". In vyasta-trairāśika the rule for finding the icchā-phala may be stated as follows assuming that the relevant quantities are written in a row as indicated above.
 * "In the three known quantities, multiply the middle term by the first and divide by the last."

In modern mathematical notations we have, $$\text{icchā-phala } = \tfrac{\text{phala}\times \text{pramāṇa}}{\text{icchā}}.$$

Illustrative example
This example is from Bījagaṇita:


 * Problem: "If a female slave sixteen years of age, bring thirty-two nishca-s, what will one aged twenty cost?"
 * Solution: pramāṇa = 16 years, phala 32 = nishca-s, ichcā = 20 years. It is assumed that phala decreases with pramāṇa. Hence $$\text{icchā-phala } = \tfrac{\text{phala}\times \text{pramāṇa}}{\text{icchā}} =\tfrac{32\times 16}{20}=25\tfrac{3}{5}$$ nishca-s.

Compound proportion
In trairāśika there is only one pramāṇa and the corresponding phala. We are required to find the phala corresponding to a given value of ichcā for the  pramāṇa. The relevant quantities may also be represented in the following form:
 * {| class="wikitable"

Indian mathematicians have generalized this problem to the case where there are more than one pramāṇa. Let there be n pramāṇa-s pramāṇa-1, pramāṇa-2,. . ., pramāṇa-n and the corresponding phala. Let the iccha-s corresponding to the pramāṇa-s be iccha-1, iccha-2,. . ., iccha-n. The problem is to find the phala corresponding to these iccha-s. This may be represented in the following tabular form:
 * pramāṇa || ichcā
 * phala|| ichcā-phala
 * }
 * phala|| ichcā-phala
 * }
 * {| class="wikitable"

|- This is the problem of compound proportion. The ichcā-phala is given by $$\text{ ichcā-phala } = \tfrac{  ( \text{ ichcā-1 } \times \text{ ichcā-2 } \times \cdots \times \text{ ichcā-n }) \times\text{ phala }}{ \text{ pramāṇa-1 }\times \text{ pramāṇa-2 }\times\cdots \times  \text{ pramāṇa-n }}. $$
 * pramāṇa-1 || ichcā-1
 * pramāṇa-2|| ichcā-2
 * pramāṇa-n|| ichcāa-n
 * pramāṇa-2|| ichcā-2
 * pramāṇa-n|| ichcāa-n
 * pramāṇa-n|| ichcāa-n
 * pramāṇa-n|| ichcāa-n
 * pramāṇa-n|| ichcāa-n
 * phala|| ichcā-phala
 * }

Since there are $$2n+1$$ quantities, the method for solving the problem may be called the "rule of $$2n+1$$". In his Bǐjagaṇita Bhāskara II has discussed some special cases of this general principle, like, "rule of five" (pañjarāśika), "rule of seven" (saptarāśika), "rule of nine" ("navarāśika") and "rule of eleven" (ekādaśarāśika).

Illustrative example
This example for rule of nine is taken from Bǐjagaṇita:
 * Problem: If thirty benches, twelve fingers thick, square of four wide, and fourteen cubits long, cost a hundred [nishcas]; tell me, my friend, what price will fourteen benches fetch, which are four less in every dimension?
 * Solution: The data is presented in the following tabular form:
 * {| class="wikitable"


 * 30 || 14
 * 12 || 8
 * 16 || 12
 * 14 || 10
 * 100 || iccha-phala
 * }
 * ''iccha-phala = $$\tfrac{(14\times 8 \times 12 \times 10)\times 100}{30\times 12\times 16 \times 14}=\tfrac{100}{6}=16\tfrac{2}{3}$$.
 * 14 || 10
 * 100 || iccha-phala
 * }
 * ''iccha-phala = $$\tfrac{(14\times 8 \times 12 \times 10)\times 100}{30\times 12\times 16 \times 14}=\tfrac{100}{6}=16\tfrac{2}{3}$$.
 * ''iccha-phala = $$\tfrac{(14\times 8 \times 12 \times 10)\times 100}{30\times 12\times 16 \times 14}=\tfrac{100}{6}=16\tfrac{2}{3}$$.

Importance of the trairāśika
All Indian astronomers and mathematicians have placed the trairāśika principle on a high pedestal. For example, Bhaskara II in his Līlāvatī even compares the trairāśika to God himself!
 * "As the being, who relieves the minds of his worshipers from suffering, and who is the sole cause of the production of this universe, pervades the whole, and does so with his various manifestations, as worlds, paradises, mountains, rivers, gods, demons, men, trees," and cities; so is all this collection of instructions for computations pervaded by the rule of three terms."

Additional reading

 * For advanced applications of trairāśika in astronomy, see:.
 * For a complete discussion on trairāśika, see:
 * For applications of trairāśika in Indian architecture, see: (Chapter V Trairāśika (Rule of Three) in Traditional Architecture)