# Kriyakramakari

Kriyakramakari (Kriyā-kramakarī) is an elaborate commentary in Sanskrit written by Sankara Variar and Narayana, two astronomer-mathematicians belonging to the Kerala school of astronomy and mathematics, on Bhaskara II's well-known textbook on mathematics Lilavati. Kriyakramakari ('Operational Techniques'), along with Yuktibhasa of Jyeshthadeva, is one of the main sources of information about the work and contributions of Sangamagrama Madhava, the founder of Kerala school of astronomy and mathematics. Also the quotations given in this treatise throw much light on the contributions of several mathematicians and astronomers who had flourished in an earlier era. There are several quotations ascribed to Govindasvami a 9th-century astronomer from Kerala.
Sankara Variar (c. 1500 - 1560), the first author of Kriyakramakari, was a pupil of Nilakantha Somayaji and a temple-assistant by profession. He was a prominent member of the Kerala school of astronomy and mathematics. His works include Yukti-dipika an extensive commentary on Tantrasangraha by Nilakantha Somayaji. Narayana (c. 1540–1610), the second author, was a Namputiri Brahmin belonging to the Mahishamangalam family in Puruvanagrama (Peruvanam in modern-day Thrissur District in Kerala).
Sankara Variar wrote his commentary of Lilavati up to stanza 199. Variar completed this by about 1540 when he stopped writing due to other preoccupations. Sometimes after his death, Narayana completed the commentary on the remaining stanzas in Lilavati.

## On the computation of π

As per K.V. Sarma's critical edition of Lilavati based on Kriyakramakari, stanza 199 of Lilavati reads as follows (Harvard-Kyoto convention is used for the transcription of the Indian characters):
    vyAse bha-nanda-agni-hate vibhakte kha-bANa-sUryais paridhis sas sUkSmas/
    dvAviMzati-ghne vihRte atha zailais sthUlas atha-vA syAt vyavahAra-yogyas//
This could be translated as follows;
    "Multiply the diameter by 3927 and divide the product by 1250; this gives the more precise circumference. Or, multiply the diameter by 22 and divide the product by 7; this gives the approximate circumference which answers for common operations."
Taking this verse as a starting point and commenting on it, Sanakara Variar in his Kriyakrakari explicated the full details of the contributions of Sangamagrama Madhava towards obtaining accurate values of π. Sankara Variar commented like this:
    "The teacher Madhava also mentioned a value of the circumference closer [to the true value] than that: "Gods [thirty-three], eyes [two], elephants [eight], serpents [eight], fires [three], three, qualities [three], Vedas [four], naksatras [twentyseven], elephants [eight], arms [two] (2,827,433,388,233)—the wise said that this is the measure of the circumference when the diameter of a circle is nine nikharva [10^11]." Sankara Variar says here that Madhava's value 2,827,433,388,233 / 900,000,000,000 is more accurate than "that", that is, more accurate than the traditional value for π."
Sankara Variar then cites a set of four verses by Madhava that prescribe a geometric method for computing the value of the circumference of a circle. This technique involves calculating the perimeters of successive regular circumscribed polygons, beginning with a square.

### An infinite series for π

Sankara Variar then describes an easier method due to Madhava to compute the value of π.
    "An easier way to get the circumference is mentioned by him (Madhava). That is to say:
       Add or subtract alternately the diameter multiplied by four and divided in order by the odd numbers like three, five, etc., to or from the diameter multiplied by four and divided by one.
       Assuming that division is completed by dividing by an odd number, whatever is the even number above [next to] that [odd number], half of that is the multiplier of the last [term].
       The square of that [even number] increased by 1 is the divisor of the diameter multiplied by 4 as before. The result from these two (the multiplier and the divisor) is added when [the previous term is] negative, when positive subtracted.
       The result is an accurate circumference. If division is repeated many times, it will become very accurate."
To translate these verses into modern mathematical notations, let C be the circumference and D the diameter of a circle. Then Madhava's easier method to find C reduces to the following expression for C:
    C = 4D/1 - 4D/3 + 4D/5 - 4D/7 + ...
This is essentially the series known as the Gregory-Leibniz series for π. After stating this series, Sankara Variar follows it up with a description of an elaborate geometrical rationale for the derivation of the series.

### An infinite series for arctangent

The theory is further developed in Kriyakramakari. It takes up the problem of deriving a similar series for the computation of an arbitrary arc of a circle. This yields the infinite series expansion of the arctangent function. This result is also ascribed to Madhava.
    "Now, by just the same argument, the determination of the arc of a desired Sine can be [made]. That is as [follows]:
       The first result is the product of the desired Sine and the radius divided by the Cosine. When one has made the square of the Sine the multiplier and the square of the Cosine the divisor,
       now a group of results is to be determined from the [previous] results beginning with the first. When these are divided in order by the odd numbers 1, 3, and so forth,
       and when one has subtracted the sum of the even[-numbered results] from the sum of the odd ones, [that] should be the arc. Here, the smaller of the Sine and Cosine is required to be considered as the desired [Sine].
       Otherwise there would be no termination of the results even if repeatedly [computed]."
The above formulas state that if for an arbitrary arc θ of a circle of radius R the sine and cosine are known and if we assume that sin θ < cos θ, then we have:
    θ = (R sin θ)/(1 cos θ) − (R sin$^3$ θ)/(3 cos$^3$ θ) + (R sin$^5$ θ)/(5 cos$^5$ θ) − (R sin$^7$ θ)/(7 cos$^7$ θ)+ . . .