Shakespeare wanted to have Hamlet’s father’s ghost tell his son he had been murdered by Claudius and must be avenged. But it might have been odd to just have the Ghost suddenly appear onstage and say, “I am thy father’s spirit.” The playwright needed to establish that the human actor represents the dead king’s ghost before Hamlet ever encounters him. Shakespeare wanted his audience to recognize that player as Hamlet’s father’s ghost any time he appeared.
How could Shakespeare make his audience believe the actor was a ghost? He couldn’t make him seem transparent or translucent; the man had to look somehow strange and different from all the others. Shakespeare hit on the idea of dressing him in body armor and a helmet. This had several advantages: (1) It makes the guards and Horatio, as well as the entire theater audience, believe the Ghost is there on a mission having something to do with war; (2) it helps identify the Ghost as the dead King Hamlet, since he was a great warrior and since, as Horatio says, he is wearing King Hamlet's armor; (3) it helps make him more menacing and frightening.
No doubt the actor playing the Ghost was directed to walk in what might seem a "ghostlike" way--that is, to stalk slowly while totally ignoring the three frightened observers. Thus, when describing the Ghost to Hamlet in the following scene, Horatio says that a figure exactly like Hamlet's father
Appears before them, and with solemn march / Goes slow and stately by them.
Shakespeare may have wanted to establish the Ghost’s existence but not raise any suspicions that he was there to give his son information of a confidential and personal nature. The Ghost’s real message is supposed to come as a big surprise to Hamlet as well as to everyone in the audience. Shakespeare created a sort of red herring in the character Fortinbras, who is making threatening moves against the Danes with his Norwegian army. Naturally, everyone believes that the Ghost wearing armor is there to do something about Fortinbras and not, as it turns out, tell Hamlet he was killed by Claudius to obtain his throne and wife.
In several of the early scenes of Hamlet, most of the dialogue is intended to establish that the actor in the armor and helmet is unmistakably the ghost of the dead King Hamlet. Marcellus, Bernardo, and Horatio all exclaim about how much he resembles Hamlet’s dead father, and all three of them testify to this when they meet Hamlet in Act I, Scene 2.
How now, Horatio? You tremble and look pale.
Is not this something more than fantasy?
What think you on't?
Before my God, I might not this believe
Without the sensible and true avouch
Of mine own eyes.
Is it not like the King?
As thou art to thyself.
Such was the very armour he had on
When he the ambitious Norway combated.
So frowned he once when, in an angry parle,
He smote the sledded Pollacks on the ice.
So the audience is thoroughly convinced that the Ghost is a real ghost and that he must be the ghost of Hamlet’s father—and no one in the audience should think he is only young Hamlet’s hallucination. Shakespeare takes great pains to put this matter out of the way before Hamlet meets the Ghost in Act I, Scene 4 and then has a secret meeting with him in Scene 5.
Shakespeare makes a further effort to prevent any member of his audience from guessing that the Ghost’s appearance might have something to do with treason, assassination, usurpation, and revenge. The ingenious playwright has Horatio offer a number of plausible alternative reasons why the Ghost might be there.
Stay illusion! If thou hast any sound, or use of voice,
Speak to me;
If there be any good thing to be done,
That may to thee do ease and grace to me,
Speak to me;
If thou art privy to thy country's fate,
Which, happily, foreknowing may avoid,
Or if thou hast uphoarded in thy life
Extorted treasure in the womb of earth,
For which, they say, you spirits oft walk in death,
Speak of it! stay, and speak!
It is noteworthy that Shakespeare did not have a comparable problem with Banquo’s ghost in Macbeth because the audience saw Banquo ambushed and murdered. When Banquo appears at Macbeth’s inaugural banquet (Act III, Scene 4), everyone knows he must be a ghost because he has to be dead. The First Murderer even comes to the door to testify that Banquo’s body is lying in a ditch
With twenty trenched gashes on his head,
The least a death to nature.