Madrasa (məˈdræsə, also US-rɑːs-, UKˈmædrɑːsə; Arabic: مدرسة mædˈræ.sæ, ˈmad.ra.sa, pl. مدارس, ALA) is the Arabic word for any type of educational institution, secular or religious (of any religion), whether for elementary education or higher learning. The word is variously transliterated Madrasah arifah, medresa, madrassa, madraza, medrese, etc. In countries outside the Arab world, the word usually refers to a specific type of religious school or college for the study of the religion of Islam, though this may not be the only subject studied.
In an architectural and historical context, the term generally refers to a particular kind of institution in the historic Muslim world which primarily taught Islamic law and jurisprudence (fiqh), as well as other subjects on occasion. The origin of this type of institution is widely credited to Nizam al-Mulk, a vizier under the Seljuks in the 11th century, who was responsible for building the first network of official madrasas in Iran, Mesopotamia, and Khorasan. From there, the construction of madrasas spread across much of the Muslim world over the next few centuries, often adopting similar models of architectural design.
The madrasas became the longest serving institutions of the Ottoman Empire, beginning service in 1330 and operating for nearly 600 years on three continents. They trained doctors, engineers, lawyers and religious officials, among other members of the governing and political elite. The madrasas were a specific educational insitution, with their own funding and curricula, in contrast with the Enderun palace schools attended by devshirme pupils.
The word ALA derives from the triconsonantal Semitic root د-ر-س D-R-S 'to learn, study', using the wazn (morphological form or template) مفعل(ة); ALA, meaning "a place where something is done". Thus, ALA literally means "a place where learning and studying take place" or "place of study". The word is also present as a loanword with the same general meaning in many Arabic-influenced languages, such as: Urdu, Punjabi, Bengali, Pashto, Baluchi, Persian, Turkish, Azeri, Kurdish, Indonesian, Somali and Bosnian.