Compulsory education refers to a period of education that is required of all people and is imposed by law. Depending on the country, this education may take place at a registered school (schooling) or at home (homeschooling).
Compulsory education was not unheard of in ancient times. However instances are generally tied to royal, religious or military organization—substantially different from modern notions of compulsory education.
Plato's The Republic (c. 424–c. 348 BCE) is credited with having popularized the concept of compulsory education in Western intellectual thought. Plato's rationale was straight-forward. The ideal city would require ideal individuals, and ideal individuals would require an ideal education. Popularization of Plato's ideas began with the wider Renaissance and the translation of Plato's works by Marsilio Ficino (1433–1499), culminating in the Enlightenment. The Enlightenment philosopher Jean-Jacques Rousseau, known for his own work on education, Emile, or On Education had said To get a good idea of public education, read Plato’s Republic. It is not a political treatise, as those who merely judge books by their title think, but it is the finest, most beautiful work on education ever written.
In Sparta boys between the age 6 and 7 left their homes and were sent to military school. School courses were harsh and have been described as a "brutal training period". Between the age of 18 and 20, Spartan males had to pass a test that consisted of fitness, military ability, and leadership skills. A student's failure meant a forfeiture of citizenship (perioidos) and political rights. Passing was a right of passage to manhood and citizenry, in which he would continue to serve in the military and train as a soldier until he age 60, when the soldier could retire to live with his family.
Every parent in Judea since ancient times was required to teach their children at least informally. Over the centuries, as cities, towns and villages developed, a class of teachers called Rabbis evolved. According to the Talmud (tractate Bava Bathra 21a), which praises the sage Joshua ben Gamla with the institution of formal Jewish education in the 1st century AD, Ben Gamla instituted schools in every town and made formal education compulsory from age 6-7.