An idiom (Latin: idiomī, "special property", from Greek: ἰδίωμα – idíōma, "special feature, special phrasing, a peculiarity", f. Greek: ἴδιος – ídios, "one’s own") is a phrase or a fixed expression that has a figurative, or sometimes literal, meaning. Categorized as formulaic language, an idiom's figurative meaning is different from the literal meaning. There are thousands of idioms, occurring frequently in all languages. It is estimated that there are at least twenty-five thousand idiomatic expressions in the English language.
Many idiomatic expressions, in their original use, were not figurative but had literal meaning. For instance, spill the beans (meaning to reveal a secret) originates from an ancient method of democratic voting, wherein a voter would put a bean into one of several cups to indicate which candidate he wanted to cast his vote for. If the jars were spilled before the counting of votes was complete, anyone would be able to see which jar had more beans, and therefore which candidate was the winner. Over time, the practice was discontinued and the idiom became figurative.
Other idioms are deliberately figurative. Break a leg, used as an ironic way of wishing good luck in a performance or presentation, may have arisen from the belief that one ought not to utter the words "good luck" to an actor. By wishing someone bad luck, it is supposed that the opposite will occur.
In linguistics, idioms are usually presumed to be figures of speech contradicting the principle of compositionality. That compositionality is the key notion for the analysis of idioms is emphasized in most accounts of idioms. This principle states that the meaning of a whole should be constructed from the meanings of the parts that make up the whole. In other words, one should be in a position to understand the whole if one understands the meanings of each of the parts that make up the whole. The following example is widely employed to illustrate the point: