The word paean is Greek and originally referred to a hymn or chant addressed to the god Apollo, who was invoked under the name Paean. It especially referred to songs of thanks for deliverance, or of triumph after victory. In time the song itself came to be called a paean.
The term was then extended to war songs, sung to the god Ares on advancing into battle, and eventually came to mean any solemn hymn or chant.
In modern use paean means a song of praise or thanksgiving or a shout of triumph, joy or exultation.
Music and singing were central parts of the education of a gentleman in Classical Greece. Any cavalry general leading his troops into battle would expect to sound the note and lead the paean to encourage them.
The sound of the battle song had two purposes - to raise morale amongst one's own men and to destroy that of the enemy. The historian Plutarch gives a description of Alexander the Great's preparations for the battle at Gaugemela in July 331 BC, in which he routed the vastly superior forces of the Persian king Darius. Specific instructions were issued to make the paean particularly terrifying. Then, on the only recorded occasion in his military career, Alexander offered a rich sacrifice to the god, Fear.