In the play The Tragedy of Hamlet, Prince of Denmark by Shakespeare, it remains ambiguous till the end that whether the Ghost is actually the soul of deceased king of Denmark.
Though Horatio, Barnardo and Marcellus seem to have seen the ghost; they are unable to exchange a dialogue with it. It is only Hamlet who can talk to the ghost in detail and understand what it wants. This makes us ponder if Hamlet is having conversations with the ghost only in his imaginations.
Consider the following lines from the text,
…a spirit of health or goblin damned…
…attended by airs of heaven or blasts of hell…
Hamlet himself has misgivings for where the ghost came from. The Ghost appears at midnight and shrivels from daylight, which can’t be characteristic of a ghost from heaven or purgatory. Plus, spirits from purgatory do not command vengeance. If it is a spirit damned to hell, then killing Claudius will not ensure supreme justice but lead to Hamlet’s damnation. The intensions of the ghost also remain unclear. (…charitable or wicked…)
Looking from a different perspective, Hamlet is a protestant (In fact, Denmark is known to be a Protestant country and protestant reformation began at Witenberg, the same place where Hamlet went to study). Protestants challenged the concept of Purgatory. This keeps the status of the ghost under doubts.
When the ghost appears in Gertrude’s room, no one except Hamlet confronts it. Seeing Hamlet talking to nothing, Gertrude even thinks that Hamlet has gone mad. It is strange why so many people, barely related to the king, can see the spirit but Queen Gertrude, who is so dear to the king, is not able to sense it at all.
One might also think that why would the soul of a dead father force his only son to have revenge as the ultimate aim of his life.
Since Hamlet is deeply melancholy for his dead father and feels disgusted by his mother’s incest, the audience has an option to feel that the ghost highlights Hamlet’s confused mind and imagination.