# Śaṅkaranārāyaṇa

Sankaranarayana (c. 840 – c. 900 AD) was an Indian astronomer-mathematician in the court of Sthanu Ravi Kulasekhara (c. 844 – c. 870 AD) of the early medieval Chera kingdom in Kerala. He is celebrated as the author of Laghubhaskariyavivarana or Laghubhaskariyavyakha, a detailed commentary on astronomical treatise Laghubhaskariya by 7th century mathematician Bhaskara I (which in turn was based on the works of the 5th century polymath Aryabhata).
Sankaranarayana is known to have established an astronomical observatory at the port of Mahodayapuram, present-day Kodungallur, in central Kerala. Laghubhaskariyavivarana (Chapter VII) explicitly states that it was composed in Saka Year 791 (corresponding to 869/70 AD). In the second verse of the commentary Sankaranarayana remembers five major predecessors in the field of mathematics (Aryabhata, Varahamihira, Bhaskara I, Govinda and Haridatta), including his possible master Govinda (c. 800 – c. 860 AD).
The commentary notably mentions an expert astronomer who had travelled to the mleccha country.

## Scientific contributions
### Astronomical Observatory

According to the commentary, Sankaranarayana installed an astronomical observatory at the Chera capital Mahodayapuram (on the Malabar Coast).
* There are references to an instrument called "Rasichakra" marked by a "Yantravalaya" in the vivarana. This instrument might be the same as the Golayantra/Chakrayantra mentioned by polymath Aryabhata. The Chakrayantra was developed further and called Phalakayantra by Bhaskara I.
   "Oh [king] Ravivarmadeva, now deign to tell us quickly, reading off from the armillary sphere installed [at the observatory] in Mahodayapura, duly fitted with all the relevant circles and with the sign (degree-minute) markings, the time of the rising point of the ecliptic (lagna) when the Sun is at 10° in the sign of Capricorn, and also when the Sun is at the end of the sign Libra, which I have noted."
   "Oh, Ravi, deign to tell us immediately, reading off from the armillary sphere, by means of the reverse vilagna method, the time for offering the daily oblations, when the Sun, shrouded under thick clouds, is 10° in the Sign Leo and also when it is the middle (i.e. 15°) in the Sign Sagittarius.
* At the expiry of every ghatika (= 24 minutes), drums were sounded by the soldiers (at different corners of the city of Mahodayapuram, such as certain "Balakridesvara") to announce time.

### Mathematical contributions

* Laghubhaskariyavivarana covers several the standard mathematical methods of Aryabhata I such as the solution of the indeterminate equation [by = ax ± c] (where a, b, and c are integers) in integers (which is then applied to astronomical problems by the author). The standard Indian method involves the use of Euclidean algorithm called kuttakara ("pulveriser").
* The most unusual features of the Laghubhaskariyavivarana are the uses of katapayadi system of numeration and the place-value Sanskrit numerals.
* Sankaranarayana is the earliest author known to use katapayadi numeration with the specific name.

## Historiographical significance

Laghubhaskariyavivarana describes "great mansions" in the city of the Mahodayapuram. He marks out the city of Mahodayapuram as a "senamukha". King Ravi Varma had planned to construct an assembly hall in his capital (he had asked the astronomers to fix the purvapararekha and enjoined craftsmen for the construction). A number of specific locations in the capital were also mentioned (such as "Gotramallesvara" — where the royal residence was located — and the "Balakridesvara Ganapati Temple" near to it). Gotramallesvara is identifiable with present-day Lokamallesvaram in Kodungallur.

### Identification of king Ravi Kulasekhara with Sthanu

Sankaranarayana says that he was patronized by king Ravi, who had the title Kulasekhara (and thus helps in the identification of Chera ruler Sthanu Ravi with Kulasekhara). The opening verse of the commentary gives an indirect invocation or praise to the lord called "Sthanu" (carefully composed to be applicable to god Siva and the ruling king).
   "Sa Sthanurjayati trirupasahito lingepi lokarcitah."
Laghubhaskariyavivarana, according to the commentary itself, was composed in the 25th regnal year of king Ravi Kulasekhara.

### Date of Laghubhaskariyavivarana

Laghubhaskariyavivarana is dated by the author in three methods.

#### As a Kali Date (when the ruler made enquiries regarding solar eclipse)

   "Angartvambara nanda devamanubhir yate dinanam gane Graste tigma mayukhamalinitamobhute parahne divi Prsta praggrahanad dvitiyaghatika grasa pramanam raver Bharta sri Kulasekharena vilasad velavrtaya bhuva."
* "Angartvambara nanda devamanubhir yate dinanam gane"
** Anga = 6, Rtu = 6, Ambara = 0, Nanda = 9, Veda = 4, and Manu = 14
** Order - 6609414
** Reverse Order - 1449066
* Kali Date - 3967 years and 86 days = 25 Mithuna, Kollam Era 41 = 866 AD

#### In the Saka Era

   "Evam Sakabdah punariha candra randhramuni sankhyaya asambhiravagatah."
* "Sakabdah punariha candra randhramuni sankhyaya"
** Candra = 1, Randhra = 9, and Muni = 7
** Order - 197
** Reverse Order - 791 (Saka Year) = 870 AD

#### In regnal years

   "Capapravista guru sauri samatva kalam Yamyottaram gamanamantaratah pramanam Acaksvya sarvamavagamya bhatoktamargad Ityuktavan ravirasena nrpabhivandya." "Tada pancavimsati Varsanyatitani devasya."
* Meeting of Guru (=Jupiter) and Sauri (=Saturn) in Capa (Dhanu) = 25th regnal year of the king. In the 9th century, these two planets came to Dhanu Rasi simultaneously only in 869 AD.