University of Alexandria
Not very many kids in ancient Egypt went to school, and even fewer kids got to go to college when they grew up. In the time of the Pharaohs, there wasn't any university in Egypt (or anywhere else in the world), and advanced students worked with professional scribes, learning their business as apprentices.
But after Alexander conquered Egypt, during the Hellenistic period (about 300 BC), the Greek rulers of Egypt built a university where experts and students could work, together with a big library. They may have gotten the idea from the Indian university at Taxila, which opened about 200 years earlier.
To get books for the library of the University of Alexandria, according to one story, the Greek ruler Ptolemy made a law that his guards should search every ship that came to Alexandria, and if there were any books they should take them and copy them (in those days the only way to get a copy of a book was to copy it by hand). Scholars came from Italy, Greece, West Asia, North Africa and East Africa to use the famous library.
A classroom at the University of Alexandria (al-Ahram 2004)
The great University of Alexandria had at least thirteen lecture halls, and could have held as many as 5000 students at one time. All of the classrooms have rows of benches running around three sides of the room, stepping up higher towards the back so everybody could see. In the middle of the room there is a high seat, probably for the teacher. These classrooms were near a big theater and an open square that were probably also part of the university; maybe the theater was used for bigger classes.
Among the scholars who worked at the University of Alexandria while the Greeks ruled Egypt were Euclid, who wrote a book about geometry, Archimedes, Aristarchus, who figured out that the earth went around the sun, and Eratosthenes, who calculated the diameter of the earth.
Euclid may have known about the work of Indian Jain mathematicians at Taxila, who were working on induction proofs in much the same way that he was, at about the same time. It seems likely that scholars working in Alexandria even heard about the work on infinity and combinations that was going on in India, at the University of Nalanda, at the same time. Archimedes did some work on infinity, getting close to developing calculus, that may be building on Indian work. Archimedes used combinatorics in his book Stomachion about 220 BC, and after him other Greek mathematicians like Hipparchus did, too.
After the Romans conquered Egypt from the Greek queen Cleopatra in 30 BC, the University of Alexandria kept right on going. The geographer Ptolemy worked there on his map of the world. In the 400s AD, the University of Alexandria was still open. The mathematician Hypatia was working there then; she developed formulas for describing what happens when a cone intersects a plane.
Nobody knows exactly what happened to the University of Alexandria and its library. Probably it gradually got less money from the government and was less well taken care of all through the Roman period, and even more so once people converted to Christianity about 400 AD and lost interest in reading the old Greek and Roman books. Some, or all, of the library may have been burned up in a fire, or maybe several different fires. People had to travel east as far as the Indian university at Nalanda to find expert researchers.
But not too long afterwards, when the Umayyads conquered Egypt in 642 AD, they established a new university in their new city of Cairo, near Alexandria. Islamic scholars like Ibn al-Haytham al Basri continued the Greek and Roman work on astronomy there with some investigations into the reflection and refraction of light. Jewish scholars like Maimonides also studied in Cairo.