Massachusetts was the first state to require municipalities to appoint a teacher or establish a grammar school with the passage of the Massachusetts Education Law of 1647, and 19th century reforms pushed by Horace Mann, founder of Westfield State University, laid much of the groundwork for contemporary universal public education. Massachusetts is home to the country's oldest public elementary school (The Mather School, founded in 1639), oldest high school (Boston Latin School, founded in 1635), oldest boarding school (The Governor's Academy, founded in 1763), oldest college (Harvard University, founded in 1636) and oldest women's college (Mount Holyoke College, founded in 1837). In 1852, Massachusetts became the first state to pass compulsory school attendance laws. The per-student public expenditure for elementary and secondary schools (kindergarten through grade 12) was fifth in the nation in 2004, at $11,681. In 2007, Massachusetts scored highest of all the states in math on the National Assessments of Educational Progress.
Massachusetts is home to 121 institutions of higher education. Harvard University and the Massachusetts Institute of Technology, both located in Cambridge, consistently rank among the world's best universities. The University of Massachusetts (nicknamed UMass) features five campuses in the state, with its flagship campus in Amherst that enrolls over 25,000 students.