From the time of Plato through the Middle Ages, the quadrivium (plural: quadrivia, Latin for "four ways") was a grouping of four subjects or arts—arithmetic, geometry, music, and astronomy—that formed a second curricular stage following preparatory work in the trivium, consisting of grammar, logic, and rhetoric. Together, the trivium and the quadrivium comprised the seven liberal arts, and formed the basis of a liberal arts education in Western society until gradually displaced as a curricular structure by the studia humanitatis and its later offshoots, beginning with Petrarch in the 14th century. The seven classical arts were considered "thinking skills" and were distinguished from practical arts, such as medicine and architecture.
The four mathematical arts were recognized by Pythagoreans such as Nicomachus of Gerasa, but the use of quadrivium as a term for these four subjects has been attributed to Boethius, when he affirmed that the height of philosophy can be attained only following "a sort of fourfold path" (quodam quasi quadruvio). It was considered the foundation for the study of philosophy (sometimes called the "liberal art par excellence") and theology. The quadrivium was the upper division of medieval educational provision in the liberal arts, which comprised arithmetic (absolute number), music (relative number), geometry (magnitude at rest), and astronomy (magnitude in motion).