A flag is a piece of cloth, often flown from a pole or mast, generally used symbolically for signalling or identification. The term flag is also used to refer to the graphic design employed by a flag, or to its depiction in another medium.
The first flags were used to assist military coordination on battlefields and flags have evolved into a general tool for rudimentary signalling and identification, especially in environments where communication is similarly challenging (such as the maritime environment where semaphore is used). National flags are potent patriotic symbols with varied wide-ranging interpretations, often including strong military associations due to their original and ongoing military uses. Flags are used in messaging, advertising, or for other decorative purposes, though at this less formal end the distinction between a flag and a simple cloth banner is blurred. The study of flags is known as vexillology, from the Latin vexillum meaning flag or banner.