On the way of Cholavandan from Madurai at a distance of 19 km there is a place called Thiruvedagam. Here the temple of Edakanatha Swamy is situated on the banks of the river Vaigai. The Pandia king Harikesari Maravarman ruled, with Madurai as capital city. Due to his conversion from saivite to the vaishnavite faction he suffered from an acute disease. In order to get cured he and his wife Mangayarkarasi and his minister Kulasirai invited Thirugnana Sambandar.

Sambandar is said to have won over the famous jains at Madurai in the competition of Fire Argument (Sambandars palm leaf manuscript did not burn, whereas the leaf of the Jains got burnt in fire). He is said to have engaged next in the competition of Water Argument. The palm leaf manuscupts of the Jains were carried away by the flood of the river whereas the palm leaf manuscripts of Sambandar came up against the water current and reached the banks of the river at Eadayapathi (Now called Thiruvedagam).

In the place to which the palm leaf manuscripts reached, Thirugnana Sambandar installed one Shiva Linga and worshipped. The deity in this temple is called Eadaganathar. The goddess is Ealavar Kulali Ammai. The sanctum sanctorums were built up of granite stones. The divine bed chamber also was built with granite stones with good workmanship with chisel. In the stone pillars in front of the Amman Sannidhi the statues of Thirugnana Sambandar and of one Jain are seen.

The temple tower called Mottai gopuram belongs to the period of King of Vijaya Nagaram.