What are examples of metaphors and personification in Hamlet and how do they operate?
Personification appears in this line in Act IV, scene 1:
“Mad as the sea and the wind, when both contend/Which is the mightier."
The sea and the wind are here being personified as two angry men fighting to see which is stronger. This is an example of personification because the sea and wind are given human attributes of anger.
Here is one metaphor from Act I, scene ii:
"This world...tis an unweeded garden, that grows to seed; things rank and gross in nature possess it merely."
This metaphor compares the world, the court of Denmark, to an unweeded garden, thus characterizing it as a corrupt place, overgrown with 'weeds' (courtiers and possibly murdering uncles) that contribute nothing and choke out what is good and fruitful.
In Act I, scene ii we meet another metaphor: Here Hamlet uses the metaphor of his flesh melting into a dew to describe death. This expresses his wish at that death would be a form of disappearing, of nothingness, that would take away his pain. Later, thoughts of an afterlife in hell will disturb this pleasant image of dissolving:
O, that this too too solid flesh wouldmeltThaw and resolve itself into a dew
In act 1, scene 2, when Hamlet rebukes his mother, Gertrude, regarding her description of his behavior, he uses a metaphor in which he compares his tears over the death of his father to a river. He calls it "the fruitful river in the eye" (1.2.83). The river is fruitful, presumably, because Hamlet has cried a lot over the loss of his father. Comparing those tears to a river draws attention to how many he feels he has shed. He is arguing that he does not "seem" grief-stricken but that he truly is so.
In his famous "To be or not to be" speech in act 3, scene 1, Hamlet uses several metaphors. First, he asks,
Whether 'tis nobler in the mind to suffer
The slings and arrows of outrageous fortune,
Or to take arms against a sea of troubles,
And, by opposing, end them? (3.1.58-61).
Here, he compares bad luck to "slings and arrows" to show how much of a negative effect luck seems to have on some people's lives. He further compares the multitude of troubles that plague us during life to a "sea," emphasizing how numerous and great they seem to be. He uses another metaphor to compare death to sleep (lines 61-62), moving on to compare whatever it is that awaits us in the afterlife to a dream (lines 66-69). It is the impossibility of knowing what these dreams will be like—good or bad—that makes us hesitate when we begin to consider death as a relief from "outrageous fortune" and our "sea of troubles."