In Hamlet's soliloquy in Act 1, Scene 5, what literary devices are used, and what purpose do they serve (e.g. how do they shape Hamlet as a character)?

Expert Answers
salterdm eNotes educator| Certified Educator

Let us try for three distinct, substantial literary devices used in the soliloquy from act 1, scene 5, of Hamlet.

Irony: Irony is the most prominent literary device in Hamlet's soliloquy. Obviously "irony" is a common word, and, in common usage, it has taken on a more general and complex meaning than it does in strict literary analysis. To keep things rigorous, we will go with Merriam-Webster's definition: 3(a): "incongruity between the actual result of a sequence of events and the normal or expected result; an event or result marked by such incongruity."

Compared with the rest of the play, the whole of this soliloquy is true, textbook irony. Hamlet is fiery here, confronted with a terrible injustice and inspired to right it through revenge. He calls on all considerations of his past life to be swept aside:
Yea, from the table of my memory I'll wipe away all trivial fond records, all saws of books, all forms, all pressures past, that youth and observation copied there; and thy commandment all alone shall live within the book and volume of my brain (1.5.98-103).
This is the precise opposite of what actually happens. The remainder of the play results in Hamlet, the complex, vacillating human, suffering at the hands of the conflict between the "trivial fond records" of his past and "the saws of books" that constitute his philosophy, principles, and the ancient imperative of revenge. The story of Hamlet is the story of the title character's ironic failure to live up to the values he commits himself to in this soliloquy, which ultimately culminates in his ironic death at the hands of Laertes, who does precisely what Hamlet fails to do and kills his father's killer.
Imagery: Much of Hamlet's soliloquy turns on the single image of Hamlet's mind as a book. He has already been established as an educated, philosophical man recently returned from the great European university at Wittenberg. In the quote under Irony above, in which Hamlet speaks of "the table of my memory," he refers to a document: here "table" refers to a text, as in "tablet." He pictures his mind as a book full of academic abstraction and the memories of youth. He then calls on himself to erase every word, to wipe himself blank, in order to no longer function as a man but to function solely as a tool for revenge. "And thy commandment all alone shall live within the book and volume of my brain, unmixed with baser matter: yes, by Heaven!" (1.5.103-04). 
Apostrophe: Hamlet begins his soliloquy by discussing what he feels he will need to carry out the revenge called for by his father's ghost. He addresses both Heaven and Earth as if they are human allies he wants to rally to his cause: "O all you host of heaven! O earth! what else? And shall I couple hell? O, fie! Hold, hold, my heart; and you, my sinews, grow not instant old, but bear me stiffly up!" (1.5.92-95). 
favoritethings eNotes educator| Certified Educator

Hamlet begins, using apostrophe (addressing something that is absent or inhuman as though it could respond) when he speaks to his heart and his muscles.  He says, "Hold, hold, my heart, / And you, my sinews, grow not instant old, / But bear me stiffly up" (1.5.93-96).  Because he's essentially imploring his body to remain young and strong and capable of doing that with which he's been charged by his father, this is also an example of synecdoche (the substitution of a part for the whole).  He doesn't just want his heart and muscles to remain strong; he wants his entire body to bear up under this burden.

Further, Hamlet uses a metaphor to compare his brain to a table, a table from which he will "wipe away all trivial fond records." These "fond records" are any pieces of information Hamlet deems unimportant or that he retained from his education as a youth, which Hamlet wants to "wipe away" so he can focus solely on avenging his father's murder (1.5.100).  He goes on to use another metaphor to compare his mind to a book, saying "thy commandment all alone shall live / Within the book and volume of my brain" (1.5.103-104).  He means the only content of his mind will consist of his duty to exact revenge on his father's murderer, as his father's ghost commanded. 

One thing I notice about these devices is that they all apply to Hamlet's mind and body. Also, they all only focus on Hamlet's need to remember what his father has said.  He makes no mention of how he intends to plan or act or move forward.  He doesn't compare Claudius to an evil snake like his father did.  He doesn't describe his sword as an extension of his arm or anything that even sounds remotely like taking revenge.  He only describes his need to internalize and recall his duty, but says nothing about how he intends to fulfill it. This combination of overthinking and inaction will characterize his behavior for the remainder of the play.