Metonymy is the figure of speech in which a thing is referred to not by its own name but by the name of something closely associated with it. The word comes from the Greek meta, 'change', and onoma, 'name', and means literally a change of name. When Shirley writes that 'Sceptre and Crown / Must tumble down', the regalia stand for the kings who wear them; when Milton laments that his 'light is spent', the condition of seeing stands for sight itself. In every case the connection is one of association or contiguity, things that belong together in experience, and never one of resemblance.
That principle separates metonymy from metaphor. A metaphor understands one thing through another that it resembles: 'Delhi is a furnace in June' works because heat is shared. A metonymy understands one thing through another that accompanies it: 'Delhi has announced new rules' works because the government sits in the city. Roman Jakobson, in his 1956 essay on aphasia, made the contrast fundamental to language, describing a metaphoric way of proceeding by similarity and a metonymic way of proceeding by contiguity. For the student the practical test is whether the substituted word is like the thing meant or goes with it.
Synecdoche is closer and more troublesome. It substitutes a part for the whole or the whole for a part: 'fifty sail' for ships, 'hands' for workers. The working test is whether the substituted term is physically part of the thing meant. A crown is not part of a king, so 'the Crown' is metonymy; a sail is part of a ship, so 'sail' is synecdoche. Silva Rhetoricae keeps the two apart, while the Oregon State guide treats synecdoche as a kind of metonymy. Antony's 'lend me your ears' in Julius Caesar shows why the boundary is debated: ears are part of the listeners (synecdoche) and are also the organ associated with attention (metonymy).
The kinds of association are worth listing: symbol for thing symbolised (crown, sceptre); instrument for activity ('the pen is mightier than the sword'); place for institution (Delhi, Downing Street); container for contents (drinking the bottle); author for works (reading Milton); and cause or condition for effect (Milton's 'light').
Poets use metonymy for several ends. It makes abstractions concrete. Shirley's stanza sets 'Sceptre and Crown' beside 'the poor crookèd scythe and spade', so that royalty and labour become objects that can lie together in the dust; the levelling is seen, not merely stated. It generalises. Gray's 'Elegy' names the aristocracy as 'the boast of heraldry, the pomp of pow'r' and imagines the villagers' lost possibilities as 'the rod of empire' and 'the living lyre', emblems of rule and poetry; individuals disappear into their ranks and gifts, which is the elegy's subject. It also shapes tone, dignifying in Gray and deflating in Shirley. In Milton's sonnet the metonymy of 'light' for sight lets the poem move naturally to the parable of the talent, another resource that can be wasted, and so to its conclusion about patient service.
In an appreciation answer the student should locate the word that cannot be literal, state what it stands for, apply the metaphor and synecdoche tests, name the kind of association and explain the gain in concreteness, generality or attitude. Treated this way, metonymy reveals how a poem's objects carry its argument.