Question: What subject was studied earlier in the city where Shuhda attended school?

full_context: Document 1: Mesopotamia: Mesopotamia is a historical region in West Asia situated within the Tigris -- Euphrates river system, in modern days roughly corresponding to most of Iraq plus Kuwait, the eastern parts of Syria, Southeastern Turkey, and regions along the Turkish -- Syrian and Iran -- Iraq borders.
Document 2: Muslim world: The Islamic Golden Age coincided with the Middle Ages in the Muslim world, starting with the rise of Islam and establishment of the first Islamic state in 622. The end of the age is variously given as 1258 with the Mongolian Sack of Baghdad, or 1492 with the completion of the Christian Reconquista of the Emirate of Granada in Al-Andalus, Iberian Peninsula. During the reign of the Abbasid caliph Harun ar-Rashid (786 to 809), the legendary House of Wisdom was inaugurated in Baghdad where scholars from various parts of the world sought to translate and gather all the known world's knowledge into Arabic. The Abbasids were influenced by the Quranic injunctions and hadiths, such as "the ink of a scholar is more holy than the blood of a martyr," that stressed the value of knowledge. The major Islamic capital cities of Baghdad, Cairo, and Córdoba became the main intellectual centers for science, philosophy, medicine, and education. During this period, the Muslim world was a collection of cultures; they drew together and advanced the knowledge gained from the ancient Greek, Roman, Persian, Chinese, Indian, Egyptian, and Phoenician civilizations.
Document 3: History of science: From their beginnings in Sumer (now Iraq) around 3500 BC, the Mesopotamian people began to attempt to record some observations of the world with numerical data. But their observations and measurements were seemingly taken for purposes other than for elucidating scientific laws. A concrete instance of Pythagoras' law was recorded, as early as the 18th century BC: the Mesopotamian cuneiform tablet Plimpton 322 records a number of Pythagorean triplets (3,4,5) (5,12,13). ..., dated 1900 BC, possibly millennia before Pythagoras,  but an abstract formulation of the Pythagorean theorem was not.
Document 4: Ancient Near East: The ancient Near East was the home of early civilizations within a region roughly corresponding to the modern Middle East: Mesopotamia (modern Iraq, southeast Turkey, southwest Iran, northeastern Syria and Kuwait), ancient Egypt, ancient Iran (Elam, Media, Parthia and Persia), Anatolia / Asia Minor and Armenian Highlands (Turkey's Eastern Anatolia Region, Armenia, northwestern Iran, southern Georgia, and western Azerbaijan), the Levant (modern Syria, Lebanon, Palestine, Israel, and Jordan), Cyprus and the Arabian Peninsula. The ancient Near East is studied in the fields of Near Eastern archaeology and ancient history.
Document 5: Madrasa: People of all ages attend, and many often move on to becoming imams.[citation needed] The certificate of an ʻālim, for example, requires approximately twelve years of study.[citation needed] A good number of the ḥuffāẓ (plural of ḥāfiẓ) are the product of the madaris. The madaris also resemble colleges, where people take evening classes and reside in dormitories. An important function of the madaris is to admit orphans and poor children in order to provide them with education and training. Madaris may enroll female students; however, they study separately from the men.[citation needed]
Document 6: Madrasa: The first institute of madrasa education was at the estate of Zaid bin Arkam near a hill called Safa, where Muhammad was the teacher and the students were some of his followers. After Hijrah (migration) the madrasa of ``Suffa ''was established in Madina on the east side of the Al - Masjid an - Nabawi mosque. Ubada ibn as - Samit was appointed there by Muhammad as teacher and among the students. In the curriculum of the madrasa, there were teachings of The Qur'an, The Hadith, fara'iz, tajweed, genealogy, treatises of first aid, etc. There were also trainings of horse - riding, art of war, handwriting and calligraphy, athletics and martial arts. The first part of madrasa based education is estimated from the first day of`` nabuwwat'' to the first portion of the ``Umaiya ''caliphate.
Document 7: History of science: In Babylonian astronomy, records of the motions of the stars, planets, and the moon are left on thousands of clay tablets created by scribes. Even today, astronomical periods identified by Mesopotamian proto-scientists are still widely used in Western calendars such as the solar year and the lunar month. Using these data they developed arithmetical methods to compute the changing length of daylight in the course of the year and to predict the appearances and disappearances of the Moon and planets and eclipses of the Sun and Moon. Only a few astronomers' names are known, such as that of Kidinnu, a Chaldean astronomer and mathematician. Kiddinu's value for the solar year is in use for today's calendars. Babylonian astronomy was "the first and highly successful attempt at giving a refined mathematical description of astronomical phenomena." According to the historian A. Aaboe, "all subsequent varieties of scientific astronomy, in the Hellenistic world, in India, in Islam, and in the West—if not indeed all subsequent endeavour in the exact sciences—depend upon Babylonian astronomy in decisive and fundamental ways."
Document 8: History of science: In mathematics, the Persian mathematician Muhammad ibn Musa al-Khwarizmi gave his name to the concept of the algorithm, while the term algebra is derived from al-jabr, the beginning of the title of one of his publications. What is now known as Arabic numerals originally came from India, but Muslim mathematicians did make several refinements to the number system, such as the introduction of decimal point notation. Sabian mathematician Al-Battani (850-929) contributed to astronomy and mathematics, while Persian scholar Al-Razi contributed to chemistry and medicine.
Document 9: History of mathematics: Babylonian mathematics refers to any mathematics of the peoples of Mesopotamia (modern Iraq) from the days of the early Sumerians through the Hellenistic period almost to the dawn of Christianity. The majority of Babylonian mathematical work comes from two widely separated periods: The first few hundred years of the second millennium BC (Old Babylonian period), and the last few centuries of the first millennium BC (Seleucid period). It is named Babylonian mathematics due to the central role of Babylon as a place of study. Later under the Arab Empire, Mesopotamia, especially Baghdad, once again became an important center of study for Islamic mathematics.
Document 10: Madrasa: Al-Azhar University, founded in Cairo, Egypt in 975 by the Ismaʻīlī Shīʻī Fatimid dynasty as a jāmiʻah, had individual faculties for a theological seminary, Islamic law and jurisprudence, Arabic grammar, Islamic astronomy, early Islamic philosophy and logic in Islamic philosophy. The postgraduate doctorate in law was only obtained after "an oral examination to determine the originality of the candidate's theses", and to test the student's "ability to defend them against all objections, in disputations set up for the purpose." ‘Abd al-Laṭīf al-Baghdādī also delivered lectures on Islamic medicine at al-Azhar, while Maimonides delivered lectures on medicine and astronomy there during the time of Saladin. Another early jāmiʻah was the Niẓāmīyah of Baghdād (founded 1091), which has been called the "largest university of the Medieval world." Mustansiriya University, established by the ʻAbbāsid caliph al-Mustanṣir in 1233, in addition to teaching the religious subjects, offered courses dealing with philosophy, mathematics and the natural sciences.
Document 11: Madrasa: At the beginning of the Caliphate or Islamic Empire, the reliance on courts initially confined sponsorship and scholarly activities to major centres. Within several centuries, the development of Muslim educational institutions such as the madrasah and masjid eventually introduced such activities to provincial towns and dispersed them across the Islamic legal schools and Sufi orders. In addition to religious subjects, they also taught the "rational sciences," as varied as mathematics, astronomy, astrology, geography, alchemy, philosophy, magic, and occultism, depending on the curriculum of the specific institution in question. The madaris, however, were not centres of advanced scientific study; scientific advances in Islam were usually carried out by scholars working under the patronage of royal courts. During this time,[when?] the Caliphate experienced a growth in literacy, having the highest literacy rate of the Middle Ages, comparable to classical Athens' literacy in antiquity but on a much larger scale. The emergence of the maktab and madrasa institutions played a fundamental role in the relatively high literacy rates of the medieval Islamic world.
Document 12: Middle Ages: The Islamic conquests reached their peak in the mid-8th century. The defeat of Muslim forces at the Battle of Poitiers in 732 led to the reconquest of southern France by the Franks, but the main reason for the halt of Islamic growth in Europe was the overthrow of the Umayyad dynasty and its replacement by the Abbasid dynasty. The Abbasids moved their capital to Baghdad and were more concerned with the Middle East than Europe, losing control of sections of the Muslim lands. Umayyad descendants took over the Iberian Peninsula, the Aghlabids controlled North Africa, and the Tulunids became rulers of Egypt. By the middle of the 8th century, new trading patterns were emerging in the Mediterranean; trade between the Franks and the Arabs replaced the old Roman patterns of trade. Franks traded timber, furs, swords and slaves in return for silks and other fabrics, spices, and precious metals from the Arabs.
Document 13: Madrasa: In the medieval Islamic world, an elementary school was known as a maktab, which dates back to at least the 10th century. Like madaris (which referred to higher education), a maktab was often attached to an endowed mosque. In the 11th century, the famous Persian Islamic philosopher and teacher Ibn Sīnā (known as Avicenna in the West), in one of his books, wrote a chapter about the maktab entitled "The Role of the Teacher in the Training and Upbringing of Children," as a guide to teachers working at maktab schools. He wrote that children can learn better if taught in classes instead of individual tuition from private tutors, and he gave a number of reasons for why this is the case, citing the value of competition and emulation among pupils, as well as the usefulness of group discussions and debates. Ibn Sīnā described the curriculum of a maktab school in some detail, describing the curricula for two stages of education in a maktab school.
Document 14: Madrasa: From around 750, during the Abbasid Caliphate, women “became renowned for their brains as well as their beauty”. In particular, many well known women of the time were trained from childhood in music, dancing and poetry. Mahbuba was one of these. Another feminine figure to be remembered for her achievements was Tawaddud, "a slave girl who was said to have been bought at great cost by Hārūn al-Rashīd because she had passed her examinations by the most eminent scholars in astronomy, medicine, law, philosophy, music, history, Arabic grammar, literature, theology and chess". Moreover, among the most prominent feminine figures was Shuhda who was known as "the Scholar" or "the Pride of Women" during the 12th century in Baghdad. Despite the recognition of women's aptitudes during the Abbasid dynasty, all these came to an end in Iraq with the sack of Baghdad in 1258.
Document 15: Black people: Historians estimate that between the advent of Islam in 650CE and the abolition of slavery in the Arabian Peninsula in the mid-20th century, 10 to 18 million sub-Saharan Black Africans were enslaved by Arab slave traders and transported to the Arabian Peninsula and neighboring countries. This number far exceeded the number of slaves who were taken to the Americas. Several factors affected the visibility of descendants of this diaspora in 21st-century Arab societies: The traders shipped more female slaves than males, as there was a demand for them to serve as concubines in harems in the Arabian Peninsula and neighboring countries. Male slaves were castrated in order to serve as harem guards. The death toll of Black African slaves from forced labor was high. The mixed-race children of female slaves and Arab owners were assimilated into the Arab owners' families under the patrilineal kinship system. As a result, few distinctive Afro-Arab black communities have survived in the Arabian Peninsula and neighboring countries.
ground_truth: Islamic mathematics
sub_queries: Where did Shuhda attend school? Answer: Baghdad
What subject was studied in Baghdad ? Answer: Islamic mathematics