During its formative period, the term madrasah referred to a higher education institution, whose curriculum initially included only the "religious sciences", whilst philosophy and the secular sciences were often excluded. The curriculum slowly began to diversify, with many later madaris teaching both the religious and the "secular sciences", such as logic, mathematics and philosophy. Some madaris further extended their curriculum to history, politics, ethics, music, metaphysics, medicine, astronomy and chemistry. The curriculum of a madrasah was usually set by its founder, but most generally taught both the religious sciences and the physical sciences. Madaris were established throughout the Islamic world, examples being the 9th century University of al-Qarawiyyin, the 10th century al-Azhar University (the most famous), the 11th century Niẓāmīyah, as well as 75 madaris in Cairo, 51 in Damascus and up to 44 in Aleppo between 1155 and 1260. Many more were also established in the Andalusian cities of Córdoba, Seville, Toledo, Granada (Madrasah of Granada), Murcia, Almería, Valencia and Cádiz during the Caliphate of Córdoba.

What discipline was studied in traditional madrasah?