The al-Qarawiyyin university, library, and mosque were founded by Fatima El-Fihriya in 859 — around the time early forms of algebra were being invented.