Hamlet is a tragedy by William Shakespeare believed to have been written between 1599 and 1601. The play set in Denmark recounts how Prince Hamlet exacts revenge on his uncle Claudius who has murdered Hamlet s father the King and then taken the throne and married Hamlet s mother. The play vividly charts the course of real and feigned madness?from overwhelming grief to seething rage?and explores themes of treachery revenge incest and moral corruption.