What is the significance of the first line in Hamlet? In the beginning of the play, Barnardo asks, "Who's there?" Reading into it, what deeper meanings does it hold?
Shakespeare's audiences were typically noisy, restless and unruly, especially those standing in the pit. He liked to catch their attention quickly and quiet them down with a dramatic opening. By having Barnardo ask "Who's there?" he suggests that there is some imminent danger which makes this sentinel especially tense and apprehensive. Francisco's reply also suggests danger and fear.
Nay, answer me. Stand and unfold yourself.
These two sentinels are even frightened of each other. It turns out that there are two reasons for them to be especially wary. One is that there is some danger of an invasion by the army of Fortinbras, Prince of Norway. Denmark is on a warlike footing. The other reason is that these two men have seen a ghost on the previous night, and they are afraid it might come back again. As Bernardo is telling Horatio about their experience, the ghost actually does reappear. So the tension that is created by the opening line, "Who's there?" continues to escalate and to hold the audience in rapt attention. This preliminary dialogue before the ghost appears is effective because it helps to establish a mood of fear and also enables the audience to recognize the ghost as a ghost when it does appear.
The first line operates on several different levels. Dramatically, the line captures the attention of the audience, posing several questions. Firstly, who is the man speaking the line? He seems frightened, putting the audience on edge as well—they're wondering the same thing. This hooks the audience right away, giving them an unanswered question and creating intrigue.
Secondly, the question "Who's there?" also foreshadows the appearance of the ghost of King Hamlet and the ghost's ambivalent identity. No one—not the guards, not Hamlet, not the audience—ever really knows whether the ghost is truly the king's consciousness or a demon come to damn them.
The ambivalence extends to much of the play as well, which gives this brief opening line a great deal of power in hindsight. Like the guards in the opening scene, the audience is on edge as to what's going on in Denmark. Uncertainty about the ghost, the throne, the actions of Fortinbras, and the psychology of several of the characters permeates every scene of the play. Therefore, it's fitting that this most ambiguous of plays begins with a frightened man asking a question in the dark of night.
A brief addition: since the plays were performed in daylight, the line begins the "suspension of disbelief" by telling the audience that it is nighttime in the play's reality.
What a marvelous opening! It immediately sets the tension in the play. First, as Bernardo enters it is presumably dark. He is actually reporting for his guard duty post and ordinarily the guard on post would make the challenge, "Who's there?'" So who else would it be but Francisco? As we find out later there is a ghost stalking the ramparts. This is the source of Bernardo's ambivalence of what is the sound and faint vision of something before him. Is it the apparition or is it Bernardo?
Shakespeare adds to this uncertainty by having Bernardo rather than Francisco offer the challenge. We (the audience) are not sure who is actually on duty, i.e. who is there. Two actors enter from the opposite sides of the stage our initial impression is that the first to speak is the guard, but it isn't. We are immediately introduced to the theme of image and reality. But one component of this theme is the theme of stagecraft.
The question is posed to us the audience as much as it is to the other actor on stage. Shakespeare has tightly linked the beginning of the play to the end. There is a circularity in the play. As it ends Horatio has requested that this story of Hamlet's be presently performed. Fortinbras directs four captains to "bear Hamlet...to the stage." So it begins as it has for over 400 years.
Lastly, the opening line supports the theme of duality. Other than the ambiguity of the question along with the entrance of two guards and the question being posed to the audience and to the stage, this question is actually delivered twice. At about line 15 as two more characters make there entrance, Francisco finally offers the challenge, "Stand ho! Who is there?"