Medieval theorists organized the Gregorian repertoire into eight modes, paired into four authentic and four plagal categories that share the same final note but differ in range, the authentic mode extending upward from the final and the plagal counterpart centered a fourth below it. Each mode is defined chiefly by two things, its final, the note on which a chant in that mode characteristically ends, and its reciting tone, the pitch around which psalm verses and other formulaic material cluster, so that a trained singer could identify a chant's mode from its melodic behavior well before reaching its last note.
The names attached to the modes, Dorian, Phrygian, Lydian, Mixolydian and their plagal hypo forms, were borrowed from ancient Greek music theory by medieval writers, but the borrowing was imprecise: the medieval system these names describe does not correspond cleanly to the scales the same names denoted in antiquity, a mismatch modern scholars have had to untangle rather than one medieval theorists themselves fully resolved.
Guido of Arezzo, working in the eleventh century, is credited with major advances in notating this modal repertoire clearly, including an early four line staff and a system for teaching singers to read pitch relationships, innovations that made the modes and the chants built on them far easier to transmit accurately than the oral and partially notated practice that preceded them.