Few Indian towns are so completely ruled by a single rock. At the centre of Namakkal, in western Tamil Nadu, a sheer granite outcrop rises straight out of the streets, its summit ringed by an old hill fort and its base hollowed into some of the oldest cave temples in the Kongu country. The rock is called Namagiri, and it gave the town both its name and its guardian goddess — Namagiri Thayar, a form of Mahalakshmi whose fame reaches far beyond pilgrims, all the way to the desk of the self-taught mathematical genius Srinivasa Ramanujan.

Know before you go
  • Where: Namakkal town, Namakkal district, western Tamil Nadu
  • The rock: a single granite outcrop crowned by an old hill fort
  • Three sights: the Narasimhaswamy and Ranganatha cave temples, the Namagiri Thayar shrine, and the open-air Anjaneyar
  • Best time: the cooler, drier months of November to February
  • Respect: a living temple town — dress modestly and remove footwear in the shrines

The rock that gave the town its name

The two cave temples cut into the western foot of the rock are the town’s oldest monuments. Hewn directly from the living granite, they are usually credited to the Adiyaman rulers of the Kongu region, who were tied by marriage to the Pallavas, and their pillared halls carry the crisp, restrained lines of Pallava rock-cut work of roughly the seventh to eighth centuries. One shrine houses Ranganatha, the reclining Vishnu; the other, the Narasimhaswamy cave temple, enshrines Lakshmi Narasimha, the man-lion avatar of Vishnu, in a sanctum flanked by large relief panels. The Ugra, or fierce, Narasimha carving here is prized as a masterpiece of early Tamil sculpture.

Namagiri Thayar, goddess of the town

For most who come to Namakkal, the heart of the pilgrimage is the goddess. Namagiri Thayar — Namagiri being simply the name of the rock — is worshipped as Mahalakshmi and as the consort of Narasimha, and devotees hold that no darshan of the man-lion is complete without first paying respects to her. The Namagiri Thayar temple sits within the same sacred landscape at the foot of the rock, and it is her name that mathematicians the world over now quietly associate with this small Tamil town.

A garlanded sanctum inside the temple complex at the foot of the Namakkal rock, with pilgrims gathered before it
A garlanded shrine within the temple complex at the foot of the rock, where pilgrims gather for darshan.Photo: Booradleyp / CC BY-SA 3.0 / Wikimedia Commons

The Hanuman who faces the man-lion

Across the court from the Narasimha shrine stands one of Namakkal’s most striking sights: a colossal Anjaneyar, or Hanuman, carved from a single block of stone and standing about 18 feet (5.5 m) tall — among the tallest Hanuman images in South India. He is deliberately aligned to face the Narasimha temple, roughly 130 m away, fixed for ever in worship of the deity. Unusually, the Namakkal Anjaneyar temple has no roof over the image: local belief holds that the god is still slowly growing, so the sky is left open above his head. He carries a sword at his waist and a garland of saligrama stones, and the shrine is counted among the most important Hanuman sites in the south.

The mathematician and his goddess

Namagiri Thayar was the family deity of Srinivasa Ramanujan (1887–1920), one of the most original mathematicians in history. Largely self-taught, Ramanujan produced thousands of results — infinite series, continued fractions and identities — many of which scholars are still unpacking a century later. He was also a devout Hindu, and he repeatedly said that his insights were not his own invention but gifts from the goddess of Namakkal. By his own account, Namagiri would reveal formulae to him in dreams and visions, sometimes as writing unrolling on a scroll before his eyes, which he would set down on waking. He is remembered for the remark that an equation had no meaning for him unless it expressed a thought of God. Historians treat these as Ramanujan’s own sincere beliefs rather than as an explanation of where the mathematics came from — but the association has made Namakkal a place of quiet pilgrimage for those who love numbers as much as for those who love the goddess.

Visiting

Namakkal sits on the Salem–Karur–Tiruchirappalli road network and is easy to reach by bus or car; Salem and Tiruchirappalli have the nearest railway and air links. Allow a couple of hours to take in the cave temples, the Namagiri Thayar shrine and the giant Anjaneyar, and add more if you climb to the hill fort for the view over the plains. Mornings are cooler and less crowded, and the early light on the granite is best. If you are pairing Namakkal with the wider region, the hill country to the north makes a natural next stop — see /india/tamil-nadu/guides/kolli-hills-guide — and for planning around the weather, read /india/tamil-nadu/guides/best-time-to-visit-tamil-nadu before you set your dates.

Frequently asked questions

Why is Namakkal linked to the mathematician Ramanujan?

Namagiri Thayar, the goddess of Namakkal, was Srinivasa Ramanujan’s family deity. He said she revealed mathematical formulae to him in dreams and visions, and that connection has made the town a quiet pilgrimage for mathematicians as well as devotees.

How old are the Namakkal cave temples?

The rock-cut Narasimha and Ranganatha shrines are generally dated to about the seventh to eighth centuries and attributed to the Adiyaman rulers, who built them in the Pallava architectural style.

How tall is the Namakkal Anjaneyar statue?

The open-air Hanuman is carved from a single stone and stands roughly 18 feet (5.5 m) tall, making it one of the tallest Hanuman images in South India.

Why is there no roof over the Anjaneyar?

By local tradition the deity is believed to be growing a little each day, so the sanctum is deliberately left open to the sky.

Who is Namagiri Thayar?

She is the goddess of Namakkal, worshipped as a form of Mahalakshmi and as the consort of Lakshmi Narasimha. Her name comes from Namagiri, the rock at the centre of the town.

What is the best time to visit Namakkal?

The cooler, drier months from November to February are the most comfortable, and early morning is the quietest time to see the shrines.