The Tragedy of Hamlet, Prince of Denmark is a tragedy written by William Shakespeare between 1599 and 1602. Set in the Kingdom of Denmark, the play dramatizes the revenge Prince Hamlet exacts on his uncle Claudius for murdering King Hamlet, Claudius's brother and Prince Hamlet's father, and then succeeding to the throne and taking as his wife Gertrude, the old king's widow and Prince Hamlet's mother. The play vividly portrays both true and feigned madnessfrom overwhelming grief to seething rageand explores themes of treachery, revenge, incest, and moral corruption.