Alfiya is a rhymed book of Arabic grammar written by Ibn Malik in the 13th century. The long title is al-Khulāsa al-alfiyya. At least 43 commentaries have been written on this work, which was one of two major foundations of a beginner's education in Arab societies until the 20th century. In the 20th century, religious educational systems began to be replaced by colonial ones (such as the French schools in Morocco).
Along with the Ajārūmīya, the Alfiya was one of the first books to be memorized by students in religious schools after the Qur'an.