On March 24, 1005, a man reputed for madness came to his senses long enough to establish one of the most progressive and influential academic institutions of the Middle Ages.

“On this Saturday ... the so-called House of Knowledge in Cairo was inaugurated,” wrote the chronicler al-Musabbihi, a friend of the new institution’s founder, Caliph al-Hakim, who had assumed his title nine years before. Though al-Musabbihi’s original manuscript is lost, copied sections survive in the writings of 14th-century Egyptian historian al-Maqrizi.

As al-Musabbihi and others at court well knew, staying on al-Hakim’s good side could be tricky. The “Mad Caliph,” as he was later called, could be mingling jovially with his subjects in the streets at one moment and ordering the summary execution of an esteemed courtier the next—or the extermination of the city’s dogs because their barking annoyed him. 

Loaka1 Creative Commons
Al-Hakim ruled as caliph in Cairo from 996 to 1021 ce. Although he vanished without a trace, he left a cultural and scientific legacy in Dar al-‘Ilm, which furthered astronomy, mathematics, medicine, law and other fields of knowledge.

So al-Hakim—the name means “the Wise”—must have been having an especially even-keeled day when, as al-Musabbihi reported, he commanded that books and “manuscripts in all the domains of science and culture, to an extent to which they had never been brought together for a prince” fill the shelves of his new Dar al-‘Ilm, or House of Knowledge.

For more than 100 years, Dar al-‘Ilm distinguished itself as a center of learning where astronomers, mathematicians, grammarians, logicians, physicians, philologists, jurists and others conducted research, gave lectures and collaborated. All were welcomed, and it remained unfettered by political pressures or partisan influences. 

“There is no evidence that it ever served as a propaganda institution. It was created simply as a public academy,” says historian Paul Walker of the University of Chicago, who has written on the Fatimid dynasty of which al-Hakim was a member. 

Among the breakthroughs that emerged from Dar al-‘Ilm were discoveries in optics by polymath astronomer, mathematician and philosopher Ibn al-Haytham and in astronomy by Ibn Yunus, an astronomer who lived during the late 10th and early 11th centuries. Their charts, tables, experiments and empirical research would inform the work of later scientists and thinkers in Europe. (See “Legacy of Knowledge,” sidebar.)

It was sectarian infighting and philosophical clashes that ultimately ran roughshod over the founding aims of Dar al-‘Ilm 114 years after its opening. Its doors closed in 1119, and attempts to revive it veered from its founding, nonsectarian principles.

Yet during its heyday in the first half of the 11th century, Dar al-‘Ilm, as its name implied, advanced the knowledge of its era, the pursuit of which, according to a famed hadith, or saying, of the Prophet Muhammad, “is an obligation upon every Muslim.”

The History Collection / Alamy
Dar al-’Ilm drew scholars from across the Muslim world. It was established in 1005 with books donated by Caliph al-Hakim, whose own palace library was said to hold some 400,000 volumes.

Egypt was a real center of learning during this whole classical period, and Cairo in particular. People came there to learn from all over the Islamic world.

—Paula Sanders, author of Ritual, Politics, and the City in Fatimid Cairo


While unique in some ways, Dar al-‘Ilm was not the first of its kind. Baghdad’s Bayt al-Hikma (House of Wisdom), established early in the ninth century by the Abbasid Caliphate, is the most famous of its predecessors. 

Jundaysabur Academy, founded around 555 ce in the province of Khuzestan, near the current Iran-Iraq border, was perhaps closer in spirit to the Cairo academy. It was devoted mostly to the study of medicine and philosophy and attracted scholars from many corners of the Middle East.

Other models included an early ninth-century palace library, Khizanat al-Hikma (Library of Wisdom)—maintained by Yahya ibn Abi Mansur, chief astronomer to Abbasid Caliph al-Ma’mun, patron also of the Bayt al-Hikma. Scholars from throughout the caliphate, especially those keen on astronomy, traveled there to learn. In 10th-century Mosul, in modern Iraq, a wealthy patron named Ja‘far ibn Muhammad al-Mawsili founded a library where he lectured on poetry, while students studied a variety of topics—and were supplied with free paper. In Basra and Ramhormoz, in southern Persia, a certain Ibn Sawwar established libraries where research scholars were offered stipends. To the north, in Rayy—“the finest city of the whole east,” barring Baghdad, as 10th-century geographer Ibn Hawqal wrote—more than 400 camel-loads of books lined the shelves of its Bayt al-Kutub (House of Books). And around 993 in the Baghdad suburb of al-Karkh, a vizier named Abu Nasr Sabur ibn Ardashir founded the Abode of Knowledge, whose library was said to keep more than 10,000 volumes.

 This last institution, founded just 12 years before Dar al-‘Ilm, was likely al-Hakim’s most direct inspiration, according to Heinz Halm, professor of Islamic studies at the University of Tübingen. It was through al-Hakim’s contacts in Baghdad that the caliph learned of Sabur’s institution, and he was thus “encouraged to promote the sciences in his own empire in a similar and even more generous manner and to raise the cultural level of his followers,” Halm wrote in his 1997 study, The Fatimids and their Traditions of Learning. Yet al-Hakim did not merely copy: He incorporated elements of the other earlier institutions, including stipends for scholars, support staff and free writing supplies.

The time and place were just right.

“Egypt was a real center of learning during this whole classical period, and Cairo in particular. People came there to learn from all over the Islamic world,” says historian Paula Sanders of Rice University, author of Ritual, Politics, and the City in Fatimid Cairo.

Perhaps not surprisingly, Dar al-‘Ilm’s founding coincided with the rise of Fatimid regional power. Expanding west from Syria in the 10th century, the Fatimids seized Egypt and North Africa from local client rulers of the Iraq-based Abbasids. In 969, Caliph al-Mu‘izz li-Din Allah founded Cairo—al-Qahira (the Victorious) in Arabic—which became the dynasty’s political and economic capital.

Down Muizz Street, the intricately decorated facade of the mosque, together with the rest of the street’s surviving medieval architecture, now all rub shoulders with storefronts advertising cell phones, sweets and bric-a-brac. 

One of Dar al-’Ilm’s best-known scholars was Ibn al-Haytham, whose discoveries in optics included the correct hypothesis that human sight involved light rays entering the eye—rather than emanating from the eye, as previously believed.

By the time al-Mu‘izz’s grandson al-Hakim took the throne 30 years later, Fatimid governing authority was located in Cairo’s Eastern and Western Palaces. These royal administrative and residential quarters—now gone—stood facing one another in the heart of the city, separated by a 2.5-hectare parade ground called Bayn al-Qasrayn (literally meaning “between the two palaces”) along all that now remains: Muizz Street, one of Cairo’s oldest, most atmospherically historic thoroughfares.

Al-Maqrizi (quoting al-Musabbihi) pointed out that Dar al-‘Ilm was located in a house that formally belonged to a slave-steward of al-Hakim’s father, Caliph al-Aziz. That house, explains Egyptian Ministry of Antiquities for Legal Affairs Archeologist Ahmed Maher, was lost long ago. But it was once appended to the northern wing of the four-and-a-half hectare, staple-shaped western palace, opposite the Mosque of al-Aqmar, which still stands and dates from about a century and a quarter later.

Down Muizz Street, the intricately decorated facade of the mosque, together with the rest of the street’s surviving medieval architecture, now all rub shoulders with storefronts advertising cell phones, Arab sweets and touristy bric-a-brac. Maher, who specializes in the medieval Islamic period, peers through the modernity and hazards an educated guess as to what Dar al-‘Ilm’s interior may have been like when it opened its doors some 10 centuries ago.

“I think there would have been a great hall,” for lectures, in addition to cubicles for individual study and shelves for books, Maher says. Al-Musabbihi’s eyewitness description all but confirms Maher’s speculation:

After the building was furnished and decorated, and after all the doors and passages were provided with curtains, lectures were held there by the Qur’an readers, astronomers, grammarians and philologists, as well as physicians.

This scholarly staff was supported, al-Musabbihi wrote, by “[g]uardians, servants, domestics and others.” In addition to these “blessings, the like of which had been unheard of,” al-Hakim “granted substantial salaries to all those who were appointed by him there to do service.”

Salaries and other financial support flowed from a waqf (endowment) established by al-Hakim, the terms of which have survived in fragments of Dar al-‘Ilm’s original deed, quoted by al-Maqrizi. While records of the scholar salaries are absent, tallies of Dar al-‘Ilm’s annual budget for support staff and upkeep have survived:

For the purchase of mats and other household effects, 10 dinars; for paper for the scribe, i.e. the copyist, 90 dinars—that is the greatest single item—‘for the librarian 48 dinars; for the purchase of water 12, for the servant 15, for paper, ink and writing reeds for the scholars studying there 12; for repairing the curtains 1 dinar; for the repair of possibly torn books or loose leaves 12; for the purchase of felt for blankets in the winter 5; for the purchase of carpets in the winter 4 dinars.

Here the deed fragment breaks off, and the distribution of the remaining 48 dinars of Dar al-‘Ilm’s annual 257-dinar budget remains a mystery. (One dinar averaged 4.25 grams of gold.) 

Leonardo da Vinci addressed “the problem of Alhazen” (as Ibn al-Haytham was known in the West) in the early 16th century in his encyclopedic Codex Atlanticus. The problem posed by Ibn al-Haytham concerned calculating the angle at which a ray of light is reflected by a concave mirror.

Al-Maqrizi also makes clear that the largest expense was the cost of paper. Per al-Hakim’s edict, people “of all walks of life, whether they wanted to read books or dip into them” were not only permitted to browse Dar al-‘Ilm’s collection of around 1,500 books but were also provided with free “ink, writing reeds, paper and inkstands” should they wish to walk in and copy any book they pleased.

“That’s astonishing. People didn’t know what to make of it,” says Walker, though Sanders stipulates that given its setting in the royal palace, Dar al-‘Ilm would have been frequented by a literate and sophisticated clientele, as opposed to the general public.

The books were gifts from al-Hakim, whose own personal library was said to  house no fewer than 400,000 volumes on history, jurisprudence, grammar, philology, biography, astronomy, alchemy and other sciences.” This included 2,400 boxed Qur’ans, each illuminated in gold, silver and lapis lazuli. By the fall of the Fatimid dynasty in 1171, al-Maqrizi reported that the royal library housed an estimated 1.6 million books, and not long after him, poet Ibn Abi Tayyi of Aleppo praised the palace library as “one of the wonders of the world.”

Such anecdotal reckonings were likely inflated. But even if the shelves of al-Hakim’s library contained but one-tenth of its reputed inventory, it “would have been larger, by a factor of fifty or more, than any contemporary library in Christendom,” observed scholar Jonathan Bloom, author of Paper Before Print: The History and Impact of Paper in the Islamic World.

But Dar al-‘Ilm’s greatest asset was its brain trust. Among the most notable drawn to it was Ibn al-Haytham, who today is regarded as the father of modern optics.

Born in Basra, Iraq, in 965 ce, little is known of Ibn al-Haytham’s early years, beyond that he served there as a vizier. Preferring science to politics, he spent most of his time studying Aristotle, Euclid and other Greeks while developing his own passions for mathematics, physics and astronomy.

Exactly when Ibn al-Haytham traveled to Cairo to join the faculty at Dar al-‘Ilm is unknown, but by the time he got there, his opinion of himself seems to have grown as inflated as some of the estimates of the caliph’s book collection. Standing before al-Hakim, he bragged that he could accomplish something the Egyptians never had achieved: control the annual flooding of the Nile. Al-Hakim enthusiastically funded the project, and Ibn al-Haytham set off on an expedition upriver.

After examining the Nile’s powerful flow at Egypt’s southern border, Ibn al-Haytham realized the task was beyond his capabilities. He further rationalized that any civilization capable of such engineering wonders as the Great Pyramids would surely have regulated the flow of the Nile long ago, were it possible. He quietly tiptoed back to Cairo, where in order to avoid al-Hakim’s anticipated wrath, he feigned madness. He spent the rest of his days, before passing away around 1040, earning a modest living copying manuscripts in his quarters at Dar al-‘Ilm. 

He also continued to study mathematics, physics and astronomy, as well as optics, which he helped pioneer as a physical science. In his greatest surviving work, Kitab al-Manazir (Book of Optics), he became the first to correctly postulate that the “act of vision is not accomplished by means of rays” that emanate from the eyes to fall upon objects, as some of his classical predecessors, notably Euclid and Ptolemy, believed. Rather, he surmised, “vision is accomplished by rays coming from external objects and entering the visual organ.”

He arrived at his conclusion via experimentation using lenses, mirrors and what he called his al-bait al-muzlim, or in Latin, camera obscura, which translates simply as “dark room.” Noting that light entering a darkened room through a pinhole cast an inverted image of the outside world onto the opposite wall, he concluded from this and other observations and experiments that light itself traveled in rays, a fundamental principle of optics. In doing so, he anticipated the modern scientific method by refusing to take at face value the writings of those who had come before him, relying instead on his own experiments and accumulated data—and even then he reserved judgment:

“A person studying science with a view to knowing the truth ought to turn himself into a hostile critic of everything that he studies,” he observed in Al-Shukuk ‘ala Batlamyus (Doubts Concerning Ptolemy). “He should criticize it from every point of view and in all its aspects. And while thus engaged in criticism he should also be suspicious of himself.”

Research at Dar al-’Ilm laid foundations for later studies by scientists, philosophers and artists from other parts of the world. Ibn al-Haytham’s work in optics influenced the use of perspective in Renaissance art, and in the early 15th century, Italian artist Lorenzo Ghiberti quoted him in his commentaries.

Another of Dar al-‘Ilm’s most famous scholars, and also a champion of empiricism, was astronomer-poet Abd al-Rahman ibn Yunus. Born between 950 and 952 in Fustat, the first Muslim capital in Egypt, he was an almost stereotypically absent-minded professor, known to be careless and even comical in his attire and appearance, according to al-Musabbihi. Yet while he may have come across as sartorially slap-happy, he was keenly observing, recording and calculating the movements of the heavens.

His most famous work is the monumental al-Zij al-Hakimi al-kabir, an astronomical handbook (zij) with records of observations and tables. The title also reflects its dedication to al-Hakim, his patron, as well as its ponderous length (kabir means “large”). At 81 chapters, it was indeed twice the length, and contained twice as many tables, as earlier works of its genre. 

He not only recorded astronomical observations he made between 977 and 1003, but he also compared them to those of earlier astronomers. This comparative, empirical approach was previously unknown in Islamic astronomy. The text reveals other insights: For instance, where applicable, his calculations took into account the atmospheric refraction of the sun’s rays at the horizon. His tables of solar, lunar and planetary longitudes and latitudes are considered the most accurate of the medieval Islamic period.

 He also provided instructions for the conversion of dates among the Muslim, Coptic and Syrian calendars, as well as finding the meridian and determining the position of the qibla (the direction of Makkah) and the phases of the moon. Such knowledge was critical, explains Doris Behrens-Abouseif, professor emerita of Islamic Art and Archaeology at the University of London’s School of Oriental and African Studies.

“Astronomers were always very important in Islamic culture, to calculate prayer time, to calculate when Ramadan begins, when you begin fasting, when you have to stop. All of this is not possible without looking at the moon,” she says.

Ibn Yunus’s calculations were uncannily precise, even to the point of his own life. One day in 1009, even though he appeared to be in good health, the astronomer announced that he would die in seven days. He locked himself in his house and began to recite from the Qur’an while washing ink off his manuscripts. A week later, he was dead.

The death of Dar al-‘Ilm was not quite so neatly planned. Nor was that of its founder.

Pictorial Press Ltd / Alamy
A page from Polish astronomer Johannes Hevelius’s Selenographia (A Description of the Moon), published in 1647, recognizes the influence of Alhasen, or Ibn al-Haytham, left, and Galileo, right, on his pioneering description of the lunar surface.

University of Oklahoma History of Science Collections
Polymath Ibn al-Haytham wrote his seven-volume study of optics, Kitab al-Manizir (Book of Optics), at Dar al-’Ilm. Printed in Latin in 1572 as part of German scholar Friedrich Risner’s Optical Thesaurus, it enhanced the study of optics in the West.

By 1020 the caliph had taken to donning a rough cloak and riding alone at night on a donkey into the hills east of Cairo, ostensibly for purposes of meditation. In February 1021, during one such outing, al-Hakim disappeared. Foul play was suspected after a search produced nothing but his riderless mount and bloodied cloak. 

The caliphate began to gradually unwind. Under al-Hakim’s grandson al-Mustansir, who ruled from 1036 to 1094, clashes among the army’s Berber, Turkic, Persian, Arab and Sudanese troops intensified. A famine contributed to political instability and weakened the economy. Soldiers went unpaid, and though al-Mustansir sold off personal treasure to compensate them, they wanted more. In 1068 they looted the palace, including the royal library and Dar al-‘Ilm. According to al-Maqrizi, some of the books fell into the hands of Berber tribesmen who reputedly used some of the covers to make sandals. As for the pages, they were burned for fuel, and their ashes “formed great hills” that in al-Maqrizi’s day were called tilal al-kutub—hills of books. Others, al-Maqrizi noted, “reached the great metropolises” of other countries.

When religious zealots took over Dar al-‘Ilm in 1119, the government shut it down. It reopened, briefly, in 1121 but was shut down once more for the same reasons. In 1123 Caliph al-Amir ordered its reopening but, to keep a closer eye on its proceedings, had it relocated to the Eastern Palace, where he resided. Although it appears to have survived another 48 years, until the end of the Fatimid caliphate in 1171, there are no records of research conducted there at any time after 1119. 

Despite political tides and storms, this period of Egyptian history was one of economic success, and Cairo remains a preeminent capital to this day. Historians further credit that success also to the era’s intellectual legacies, when Dar al-‘Ilm shone brightest of all.