In music theory, the terms "horizontal" and "vertical" describe two fundamental dimensions of sound. Melody is horizontal; harmony is vertical.
Melody unfolds sequentially—note after note, over time. Its contour (rising/falling pitch), rhythm, phrasing, and articulation create a linear narrative you follow from start to finish. Think of a single flute line: it's a thread stretching left to right on the staff.
Harmony occurs when multiple notes sound at the same moment, forming chords, intervals, and textures. On the staff, they stack top-to-bottom—vertical alignment.
Melody and harmony constantly interact: melody implies harmony; harmony supports melody. But melody's essence is temporal progression—the horizontal thread the listener rides.