Crucial to the further development of Greek mathematics and science was Alexander the Great's founding of Alexandria in 332 BC. Alexander stayed only for a few months in the city, after which he never saw it again. The city's development was undertaken by Alexander's viceroy who also arranged that Alexander's body be entombed there.
Situated on the Mediterranean, 12 miles west of the Canopic mouth of the Nile, the city was laid out in the shape of a T, the top of which was a former island made into a peninsular and the trunk of which formed a bridge between the peninsular and another stretch of land that separated the sea from a lake. The former island was known as Pharos, and the city's two large harbors made it the most important port on the Mediterranean. On Pharos stood the largest and most famous lighthouse of antiquity. (Whence the term for lighthouse or beam of light in certain languages.) However, Alexandria's most important feature was its library system, a center for Greek learning that would quickly eclipse Athens. Alexandria's intellectual hegemony lasted well into the Roman era, during which it was the most important Western city after Rome. Whereas Athens became utterly eclipsed by the Rome, Alexandria thrived as a fountainhead of Greek civilization. Its beacon would shine for over six hundred years. 45
Alexandria's first king, Ptolemy Soter, started the city's book collections. His successor, Ptolemy Philadelphia, an avid bibliophile, is thought by some to have acquired what remained of Aristotle's vast collection. Under Philadelphus, two libraries were established in separate buildings. The larger was located in the Bruchium quarter, which with the Museum formed an academy. The smaller was in another quarter called the Serapeum. Philadephus sought out valuable works in every part of the known world and copied them at great expense. The successor, Ptolemy Euergetes, was a ruthless sort who systematically seized all books brought into Egypt, returning only copies of originals to the unfortunate owners. According to the mathematician Erastothanes, who was the head librarian at one point, the Searpeum housed 42,800 papyrus rolls, and there were 490,000 rolls in the Bruchium. Of Alexandria's first five librarians, Zenodotus, Caliimachus, Erastophanes, Appolonius and Aristophanes; Erastophanes and Appolonius were preeminent mathematicians of the age.
The libraries were gradually despoiled as a result of a number of major fires. The first occurred in 46 BC, when Julius Caesar torched the Egyptian fleet in the harbor. The flames swept through the Bruchium, destroying the larger library and other facilities. In the mean time, a rival library had been founded at Pergamon, on the Turkish coast, which flourished despite the monopoly that the Egyptian kings held over the production and distribution of papyrus used in manuscript production. To placate Cleopatra, a few years later, Mark Anthony seized all 200,000 volumes from Pergamon and put them in a new building in the Bruchium. In 273, the main library was again destroyed by fire, on orders from the Emperor Aurelian, after which the Serapeum became the principal library. This, too, was set on fire on an edict of Theodosius in 398 or 390, after which, its remains were pillaged by the Christians. The Serapeum's final destruction is believed to have occurred about 640, when the city fell, following a 14 month siege to the Arab general Amu. On the capture of the great city, Amu reported to the Caliph Omar that the city contained 4000 palaces, 4000 baths and 400 theaters or places of amusement. Amu begged the Caliph to be awarded the Royal Library as a prize. The Caliph replied that if library's books contained Koranic teachings, they were superfluous, and if they did not, they violated the Koran and should be destroyed. This pronouncement resulted in the distribution of all the books to Alexandria's 4,000 public baths, where for the next six months they served to fuel the fires that warmed the waters.