Malayalam is a Dravidian language spoken in the Indian state of Kerala and the union territories of Lakshadweep and Puducherry (Mahé district) by the Malayali people. It is one of 22 scheduled languages of India. Malayalam was designated a "Classical Language of India" in 2013. Malayalam has official language status in Kerala, Lakshadweep and Puducherry (Mahé), and is also the primary spoken language of Lakshadweep. Malayalam is spoken by 35 million people in India. Malayalam is also spoken by linguistic minorities in the neighbouring states; with a significant number of speakers in the Kodagu and Dakshina Kannada districts of Karnataka, and Kanyakumari, Coimbatore and Nilgiris district of Tamil Nadu. It is also spoken by the Malayali Diaspora worldwide, especially in the Persian Gulf countries, due to the large populations of Malayali expatriates there. They are a significant population in each city in India including Mumbai, Bengaluru, Chennai, Delhi, Hyderabad etc.
The origin of Malayalam remains a matter of dispute among scholars. The mainstream view holds that Malayalam descends from a western coastal dialect of early Middle Tamil and separated from it sometime between the 9th and 13th centuries. This western dialect also preserved some archaisms suggesting an earlier divergence of the spoken dialects in the prehistoric period. A second view argues for the development of the two languages out of "Proto-Dravidian" or "Proto-Tamil-Malayalam" either in the prehistoric period or in the middle of the first millennium A.D., although this is generally rejected by historical linguists. The Quilon Syrian copper plates of 849/850 CE are considered by some to be the oldest available inscription written in Old Malayalam. However, the existence of Old Malayalam is sometimes disputed by scholars. They regard the Chera Perumal inscriptional language as a diverging dialect or variety of contemporary Tamil. The oldest extant literary work in Malayalam distinct from the Tamil tradition is Ramacharitam (late 12th or early 13th century).
The earliest script used to write Malayalam was the Vatteluttu script. The current Malayalam script is based on the Vatteluttu script, which was extended with Grantha script letters to adopt Indo-Aryan loanwords. It bears high similarity with the Tigalari script, a historical script that was used to write the Tulu language in South Canara, and Sanskrit in the adjacent Malabar region. The modern Malayalam grammar is based on the book Kerala Panineeyam written by A. R. Raja Raja Varma in late 19th century CE. The first travelogue in any Indian language is the Malayalam Varthamanappusthakam, written by Paremmakkal Thoma Kathanar in 1785.
Robert Caldwell describes the extent of Malayalam in the 19th century as extending from the vicinity of Kumbla in the north where it supersedes with Tulu to Kanyakumari in the south, where it begins to be superseded by Tamil, beside the inhabited islands of Lakshadweep in the Arabian Sea.