The atmosphere of the first scene of Hamlet is tense and ominous. The characters assembled on battlements of Elsinore are spooked by their vision of a ghost, and their dialogue is reflective of their fear and their sense of alarm. In a conversation with Barnardo in Act 1, Scene 1, Horatio makes an allusion to the god Neptune:
The moist star,
Upon whose influence Neptune’s empire stands,
Was sick almost to doomsday with eclipse
In this passage, Horatio is trying to underline the seriousness of the ghostly vision. To do so, he describes a series of unnatural scenes: Rome on the verge of its downfall and the disappearance of the moon. His examples are intended to illustrate how Elsinore is in a similar state of disarray. When he references the moon, he makes an allusion to Neptune, the Roman god of the sea. This allusion makes sense after his story about the fall of Rome: Neptune’s influence as a Roman god makes him an important force in the chaos and unrest of Rome’s downfall. The way that Horatio references Neptune enhances the sense that he and the other men on the battlements are witnessing something larger than themselves. They are interacting with powerful, elemental forces of disruption. In turn, the atmosphere at the beginning of the play, which is built through the dialogue of the frightened characters, lends a sense of inevitability to the ghostly and horrendous acts that follow.
In Act 1, Scene 4, Hamlet is out on the battlements with Horatio and Marcellus when, at midnight, the ghost returns. The ghost is trying to communicate with Hamlet, but when Hamlet moves to follow it, his friends object. In response, Hamlet makes an allusion to Greek mythology:
My fate cries out
And makes each petty arture in this body
As hardy as the Nemean lion’s nerve.
Still I am called. Unhand me, gentlemen.
By heaven, I’ll make a ghost of him that lets me!
I say, away!—Go on. I’ll follow thee.
In this speech, Hamlet tries to convince his friends that he is ready to follow the ghost and hear whatever it has to say. In fact, he seems to feel a sense of compulsion. It is his "fate" to hear what his late father has to say, or so he tells his friends. He alludes to the Nemean lion, a legendary beast from Greek mythology that was immensely strong and impervious to attack but was eventually slain by Hercules. Hamlet suggests that his "fate cries out" in a way that makes him feel "as hardy as the Nemean lion's nerve," indicating that he feels called by duty to bravely embrace whatever is going to happen. But then he says, "Still I am called," hinting that he recognizes the implications of the allusion he has just made—after all, the Nemean lion was "hardy," but it did end up dying.
The word "still" is especially telling, since it implies a certain hesitancy; Hamlet has just said that he feels "as hardy as the Nemean lion's nerve," but then he says, "Still I am called," apparently acknowledging his unspoken misgivings but also "still" accepting his duty. He realizes that he, like the Nemean lion, will most likely meet a terrible fate, but he nonetheless feels compelled to go through with his plan to hear what the ghost has to say. This allusion therefore sheds light on the complicated interplay of thoughts and emotions coursing through Hamlet in the aftermath of his father's death.
In Act 1, Scene 5, the ghost reveals the story of his grisly death to Hamlet, providing, through his appearance, an ominous vision for the rest of the play. Immediately after, Hamlet’s friends find him on the battlements and ask what has transpired. Hamlet refuses to give them any information, and his speech is wild and confusing. When Horatio tries to pretend that Hamlet hasn’t offended him, Hamlet responds with an allusion to Saint Patrick, the saint of purgatory:
Yes, by Saint Patrick, but there is, Horatio, And much offense, too. Touching this vision here, It is an honest ghost—that let me tell you.
Hamlet's reference to Saint Patrick when asked to recount the story of the ghost is significant. The ghost he just interacted with had returned from purgatory, the very domain of Saint Patrick, in order to impart upon Hamlet the necessity of revenge. Hamlet’s reference is mostly to himself, as he seems to be invoking the unbelievable events he has just witnessed because he's currently finding it difficult to communicate with Horatio—that is, his mind is still preoccupied with his and the ghost's conversation. This reference to the saint of purgatory, then, is mostly a way for Hamlet to process the fact that his father has just returned in a ghostly form to talk to him after having traveled from purgatory.
In Act 2, Scene 2, during a conversation with Polonius, Hamlet alludes to Jephthah, an important biblical figure:
Hamlet: O Jephthah, judge of Israel, what a treasure hadst thou!
Polonius: What a treasure had he, my lord?
One fair daughter, and no more,
The which he loved passing well.
Polonius: (aside) Still on my daughter.
Hamlet: Am I not i’ th’ right, old Jephthah?
In The Book of Judges (which is in The Old Testament), Jephthah vows to God that he will sacrifice the first thing that comes out of his own home as a display of gratitude for having been given the strength to lead the Israelites to victory against the Ammonites. When his daughter then walks out of his home, Jephthah is aghast, but he ultimately keeps his word and sacrifices her.
To fully understand how this allusion relates to Hamlet, it's worth noting that Hamlet is in a relationship with Polonius's daughter, Ophelia. The implication, then, is that he thinks Polonius is being careless and taking Ophelia’s safety and wellbeing for granted—but instead of saying this outright, Hamlet invokes the biblical story of Jephthah. Rather humorously, Polonius doesn't seem to engage much with his remark, most likely because he doesn't fully pick up on Hamlet's meaning. Still, though, the allusion suggests that Hamlet is concerned for Ophelia and doesn't believe that her father is able to protect her.
In Act 3, Scene 2, most of the characters gather before the players put on their performance for the King and assembled crowd. It is a significant scene, a major contributor to the rising sense of tension, and as the characters mill about beforehand, their interactions give an indication of what is to come. Though the conversations appear casual, each character’s motivations drive them to engage with each other and ultimately have important repercussions. Hamlet and Polonius greet each other first, and Hamlet is purposefully inscrutable, confusing Polonius and Ophelia. Hamlet asks Polonius to confirm that he was an actor in his youth, and then he continues his line of questioning:
Hamlet: What did you enact?
Polonius: I did enact Julius Caesar. I was killed i’ th’ Capitol. Brutus killed me.
This is a moment of significant foreshadowing, as both men allude to the betrayal of the Roman general Julius Caesar by his fellow politician, Marcus Junius Brutus. This reference to Polonius’s role as Julius Caesar foreshadows his violent death by stabbing. That Caesar was killed by Brutus—finding his demise at the hand of a friend—further complicates the reference, since Hamlet ends up being the one to murder Polonius. There's a parallel, then, between the two deaths, both of which are bloody and enacted in the same way.
In Act 5, Scene 1, back in Denmark, Hamlet meets Horatio at a graveyard. They witness a conversation between gravediggers and then watch as one of them sings as he continues to dig. Horatio and Hamlet are affected by this scene, and by how carefree the digger appears to be. When the gravedigger throws a skull out of the grave, Hamlet says:
That skull had a tongue in it and could sing once. How the knave jowls it to the ground as if ‘twere Cain’s jawbone, that did the first muder! This might be the pate of a politician which this ass now o’erreaches, one that would circumvent God, might it not?
Hamlet’s speech, in which he compares the thrown skull to a jawbone from the Bible, comes as part of his reflection on the nature of life and death. In the story Hamlet alludes to, Cain kills his brother, Abel, with the jawbone of an ass. It is the first murder and is therefore significant as the origin of violence and death. Hamlet’s allusion to a story of murder between brothers is deeply connected to his internal struggle over the death of his father. Hamlet sees the violence of Cain and Abel reflected in the casual way that the gravedigger treats the skull. The human skull has been cast aside like the murder weapon itself, Hamlet seems to be saying. There is violence at the heart of death and in how human beings treat each other. The darkness of Hamlet’s perspective at this point in the play is representative of the death and violence to come.