Metonymy is a figure of speech where an associated thing or concept is referred to by the name of something else closely related to it. It is commonly used in both literature and everyday speech. For example, "pen" can stand in for "written word" and "sword" for "military aggression." Metonymy is based on an understood association between the thing referenced and the thing used for reference, unlike metaphor which relies on analogy. Examples of common metonymic references include "Hollywood" for the American film industry. Its main purpose is to add variety and interest to writing rather than repetitive phrasing.