Hamlet

Hamlet was a play written by William Shakespeare. It was also the name of the titular character, a prince of Denmark.

Inspirations
The Tenth Doctor and Martha Jones visited Shakespeare in 1599. They inspired him to write about father-son relationships, a main theme of Hamlet. Shakespeare also mentioned the name of his deceased son, Hamnet. (TV: The Shakespeare Code)

The idea to focus on Hamlet specifically was first discussed at the court of Elizabeth I. The First Doctor, Ian Chesterton, Barbara Wright and Vicki Pallister used the Time-Space Visualiser to witness Shakespeare's initial rejection of Francis Bacon's thoughts on writing a play about Hamlet, who told Bacon the story was "not quite in [his] style". However, they then saw Shakespeare appear to warm to the idea after he'd left Bacon's presence. (TV: The Chase) When Ian asked if Barbara had discovered what she wanted to know, she responded that she wasn't sure, having wondered if Shakespeare had really written his own plays or if Bacon had been their real author, a theory that literary scholars had argued about for centuries. (PROSE: The Chase)

Drafts
In his first thoughts about the play, Shakespeare wrote that Hamlet would be the son of a dead King who discovered that his uncle murdered his father and married his mother to steal the throne. He also decided Elsinore would be the main setting, which was in Denmark, or possibly Finland.

Shakespeare considered several possibilities for how Hamlet would find out his uncle's crimes, including hidden papers - although that plot device was "never very satisfactory", a confession from his mother, a confession from his uncle, and a guess before settling on a magician telling him. He drafted this scene in his notes, the character clearly being based upon the Eleventh Doctor. (PROSE: Notes on a Play)

The First Doctor collaborated with Shakespeare between drafts one and two (PROSE: Byzantium!) and the Fourth Doctor claimed to have helped him write down the final draft after Shakespeare sprained his wrist writing sonnets. This manuscript was acquired by Scaroth in the 20th century. (TV: City of Death, PROSE: The Stranger, The Writer, His Wife and the Mixed Metaphor) By the time of the final draft, the magician character had been written out of the play with his role now fulfilled by the ghost of Hamlet's father. (PROSE: Notes on a Play)

Performances
Act III Scene I featured Hamlet's famous soliloquy, which included the line "To be or not to be – that is the question". The earliest known copy of the soliloquy was handwritten, with critical annotations in the same handwriting from the Fourth Doctor. (PROSE: Hamlet's Soliloquy)

The transcript of Hamlet from the first performance showed some "interesting" variation from the accepted text, in particular during Act V Scene I when a gravedigger exhumed the skull of Yorick in the presence of Hamlet and Horatio. A "clown" appeared and identified the skull not as Yorick's but the missing second skull of the Fendahl, which had been lost for centuries. He also identified the gravedigger as "Lord Grathanve of the Erstwhile Collision" and briefly fought with him for custody of the skull before the clown tripped him up with his scarf and quickly departed. This clown was clearly a representation of the Fourth Doctor. (PROSE: Hamlet)

Hamlet was performed at the New Regency Theatre on numerous occasions before the theatre was destroyed in the Blitz on 12 October 1940. Sarah Bernhardt starred in one such production. (AUDIO: Swan Song)

A caged temporal predator who had been taught to recite "the most famed soliloquy from Hamlet" was one of the items on sale at the First Auction in Heaven. (PROSE: Going Once, Going Twice)

The Doctor
The Fourth Doctor later attempted to teach his companion Leela about poetry by introducing her to Hamlet. (AUDIO: The Foe from the Future) Upon finding a number of Nimon, the Fourth Doctor quoted Hamlet in saying, "Oh my prophetic soul." (TV: The Horns of Nimon) He again quoted the play when describing the odds of all the animals in the London Zoo trying to escape on the same morning. (PROSE: Stanley)

The Sixth Doctor heard a verse from the work, declaimed by a dying Oscar Botcherby, a wannabe actor whose dream had been to play the main role. After Oscar died, the Sixth Doctor quoted half of the last line of the play "Good Night Sweet Prince". (TV: The Two Doctors)

On Heaven, the Seventh Doctor quoted a line from Hamlet to Bernice Summerfield, who pointed out that it was a mixed metaphor. (PROSE: Love and War)

Others
The Monk believed that his meddling would enable Shakespeare to have Hamlet premiere on television. (TV: "Checkmate")

The Valeyard quoted a verse from scene one of act three of the work to the Sixth Doctor. (TV: The Ultimate Foe)

The Daleks quoted various lines from Hamlet while working on a time machine with Professor Osric. (AUDIO: The Time of the Daleks)

Behind the scenes

 * In The Chase, Bacon speaks of Hamlet as if he's common knowledge. Indeed, Shakespeare warms to the idea without ever having been told who Hamlet was. The direct implication is that Hamlet is a real person in the DWU. This marks a clear distinction between the DWU and our world. In the real world, Shakespeare never intended that Hamlet be taken as a biography. The character of Hamlet is an entire fiction. However, in the real world it is theorised Shakespeare wrote Hamlet in response to a less successful play about Hamlet. This would have been based on the story of, a legendary Danish Prince.
 * In The Mark of the Rani, the Sixth Doctor quotes a famous verse from the work ("There are more things in heaven and earth, than are dreamt of in your philosophy"), even if it is not explicitly attributed to it.

Doctor Who actors in Hamlet

 * In 1947, the first telecast version of the play also saw the television debut of actor Patrick Troughton in the role of Horatio.
 * A 1948 was the cinematic debut of Patrick Troughton in the role of the Player King. The film also had the first major film role for Peter Cushing who played Osric.
 * In 1980, Derek Jacobi played Hamlet, Lalla Ward played Ophelia, and Claire Bloom played Gertrude in a BBC TV production of the play, opposite Patrick Stewart as Claudius. The production also included one more Time Lord: Geoffrey Beevers was the murderer in the play within the play.
 * In 1996, Jacobi took the role of Claudius in a film that starred Kenneth Branagh as Hamlet. Brian Blessed, who had previously played Yrcanos in Mindwarp, played the ghost of King Hamlet. Richard Briers, who had played the Chief Caretaker in Paradise Towers, played Polonius. Nicholas Farrell, who would go on to play Brian Green in Children of Earth, played Horatio.
 * In 2002, Christopher Eccleston played the Hamlet at the West Yorkshire Playhouse.
 * In 2008, David Tennant took on the role of Hamlet in a Royal Shakespeare Company mounting of the play — opposite Stewart who once again played Claudius.