Philosophy and Science
Shops, a caravanserai, a bathhouse and farms were endowed to this madrasa, called the "Nizamiyya," which is said to have been built in Baghdad for 60,000 dinars (gold pieces). The Baghdad Nizamiyya, which in religious matters taught Hanafi and Shafii jurisprudence, played an important role in scholarly and intellectual life and trained highly qualified scholars; the young men who graduated from it occupied high offices as the authoritative personalities of the country. The subjects and curricula of the Baghdad Nizamiyya, counterparts of which were founded at that time in centers such as Isfahan, Nishapur, Merv, Balkh, Herat, Tus, Basra and Amul, were essentially followed and applied for centuries in all Islamic countries and in the Islamic-Turkish states, including the Ottomans.
Because in the Nizamiyya madrasas, besides the religious sciences, subjects such as philosophy (kalam), philology (Arabic language and grammar) and mathematics (arithmetic, astronomy) and so on were also taught, and because similar institutions were founded in Europe only at later dates, the Baghdad Nizamiyya is regarded as the first university in the world. The madrasas founded afterwards on the same principles by sultans, statesmen and royal ladies in the Seljuk states, among the Khwarazmshahs, the Atabegates, the Turkmen beyliks, in India and in Egypt are too numerous to count. The madrasas were also of great importance in that they trained officials for the civil administrative cadres of the state.
In the Seljuk period physicians and rhetoricians were trained, and the science of mathematics also reached a high level and found powerful representatives such as the famous Omar Khayyam (d. 1131), known rather for his literary identity, and Muhammad Bayhaqi. In addition, an observatory was established in 1074–1075 and investigations were carried out there; eminent astronomers such as Omar Khayyam, Abu'l-Muzaffar Isfizari and Ibn Najib al-Wasiti compiled a calendar called the "Tarikh-i Maliki," the "Tarikh-i Jalali" or the "Taqwim-i Malikshahi," and this calendar rested on more accurate calculations than the Gregorian calendar in use today.
Like all Turkish rulers, the Seljuk sultans encouraged the development of historical knowledge. Thus the works that speak of the origins of the Seljuks are all products of this age.
In the Turkmen beyliks there is the famous Danishmendname, epic in character, which recounts the life and wars of Danishmend Gazi Ahmed Bey.
At the same time, books were also being written in the Oghuz dialect in the land of Egypt.