A national anthem (also state anthem, national hymn, country song, national song, etc.) is generally a patriotic musical composition that evokes and eulogizes the history, traditions, and struggles of its people, recognized either by a state's government as the official national song, or by convention through use by the state's people.

Because of their special status, national anthems serve several important social functions within a nation. These symbols crystallize the national identity, announcing both to citizens and to a nation's neighbors who the nation is, where it has been, and where it is going. National anthems also create and maintain bonds between citizens; with every performance, anthems contribute the formation of a collective body. National anthems establish a rallying center for the national collective; in this way they motivate patriotic action. Often national anthems function to honor the efforts of citizens; linking citizen to symbol creates a symbiotic relationship between the living nation and the symbolic nation. National anthems also serve as a means for legitimizing authority; authority figures attempt to merge their goals and desires with these symbols' sacred aura.

For example, each nation is expected to have its own flag and national anthem... The universal code forbade the playing of two anthems for one nation: becoming a "proper" nation would mean selecting a single "official" anthem. A national anthem is a universal sign of particularity. The conventions of the oeuvre demand that the uniqueness of the nation be celebrated in a universally stylized manner. National anthems not only fit a common pattern, but it is part of their symbolism that they are seen to do so. They flag the nation as a nation among nations, as flags themselves do.

We are often left wondering: just what is and what is not national about national anthems? Close musical scrutiny of Europe's national anthems fails to turn up answers to that question but leaves us, instead, with the rather perplexing sense that the national anthems sound a graet deal alike (listen, for example, to the collection of European national anthems compiled on Swarovski Musik Wattens 1993). There are many reasons that national anthems are musically ambiguous, even if we imagine that their nationalist cultural work is potentially of great significance. First of all, national anthems do move around, and they often posses the generic characteristics that make melodies suitable for contrafacts, assigning new text to preexisting melodies (see Kurzke 1990). Second, external forms that together yield the subgenres that fit together as the genre of the national anthem itself are remarkably quite similar.

In my view national anthems are—politically read or societally understood— simultaneously apodictical and epideictic speeches. They are apodictical, unlike the meaning in classical rhetoric, not because conclusions are deduced from syllogisms of indisputable premises, but because social convention and the law protect their numinous quality. The apodictical, the indisputable, also refers to the concrete act of staging, in which objections to iconic and numinous qualities of the Gemeinschaft are not permitted. But national anthems are also epideictic in that they are supposed to persuade. They persuade in the concrete act of nation-building, and they celebrate the Gemeinschaft.

Every state must have its anthem, flag and coat of arms – or must it? This package, now taken for granted, became the worldwide standard only about a century ago, when the European habits and traditions began to spread across the globe – and not all countries have these symbols.

National anthems are of generally recent origin. being commissioned or elevated to the status of anthem through decree or popular demand (Snyder 1990). In Latin America, national anthems are frequently emotional paeans to the patria.

National anthems are the equivalent in music of a country's motto, crest or flag. Patriotic fervour is usually the keynote, though the forms and images used to express it vary a good deal and can reveal much about the character of a nation at the time the words were written. The text of an anthem may often have to be revised or modified in the light of political change within the country or in its relations with its neighbours.