The ghost of Hamlet's father appears and tells Hamlet to avenge his death by killing his uncle, the new king, but to leave his mother alone. Hamlet swears revenge but is unsure if the ghost is good or evil, so he decides to feign madness and stage a play enacting his father's death to gauge the king's reaction and confirm his guilt before acting further.