When Shakespeare wrote Hamlet and the stories that inspired him.
Dating the play
When was Hamlet written? In 1602 an entry was made in the Stationers' Register of 'A book called the Revenge of Hamlet prince of Denmark as it was lately acted by the Lord Chamberlain his Servants'. At this time, only members of the Stationers' Company were permitted to publish material for sale: any member wishing to print a book had to enter its title in advance in the Register. Some of the titles were never actually printed and remained only entries but the Register has proved an invaluable fund of information for later students of literature.
A further clue to the date of Shakespeare's play is the topical reference, in Act 2 Scene 2, to 'an eyrie of children, little eyases', performing children who have stolen the applause of theatre-goers from their elders and betters. In London in 1601, a company of boy players were enjoying great success at the Blackfriars Theatre, at the expense of the adult companies performing at other venues. So 1601 is the likeliest date of composition. At this time, Shakespeare was also writing Twelfth Night.
Shakespeare's sources for Hamlet
The immediate source of Hamlet is an earlier play dramatising the same story of Hamlet, the Danish prince who must avenge his father. No printed text of this play survives and it may well have been seen only in performance and never in print. References from the late 1580s through to the mid 1590s testify to its popularity and to the presence of a ghost crying out for revenge. There is general scholarly agreement that the author of this early version of Hamlet was Thomas Kyd, famous as the writer of the revenge drama, The Spanish Tragedy. This play did survive in print and was a huge theatrical hit in the late 1580s and 90s, delighting the contemporary taste for intrigue, bloodshed and ghostly presences.
Ancient Scandinavian sagas
Kyd and Shakespeare were the latest spinners of an age-old yarn originating in the ancient sagas of Scandinavia. It was written down in manuscript form in the twelfth century by the Danish scholar, Saxo Grammaticus, in his Historia Danica and it finally found its way into print in 1514. It is the story of the murder of a Danish ruler by his brother (Fengo), swiftly followed by the marriage of the widowed queen (Gerutha) to the murderous brother, the assumed madness of the dead king's son (Amleth) and his voyage to England during which he alters the letters bearing his death warrant, and his return to avenge himself upon his father's killer.
Belleforest's Histoires Tragiques
Elizabethan readers gained access to this story, in French, through its inclusion by Francois de Belleforest in his widely read Histoires Tragiques in 1570. Belleforest made the significant addition of the queen's adultery with her brother-in-law, during her marriage to the king. Kyd's lost dramatic version of Belleforest's account was the next stage in the reshaping of the story until we come to Shakespeare's astonishing transformation of the material into a profound and psychologically-acute investigation of private and public morality and the nature of our dealings with life and death.
As he wrote Hamlet, Shakespeare must have found stimulating reading in the works of Montaigne. Hamlet's intellectual curiosity and wide-ranging philosophical questioning ally him with the French essayist. At the time of Hamlet's composition, Montaigne's Essays were as yet unavailable in translation but we know from other instances of his use of source material that Shakespeare was literate not only in French but in Italian, too.
The literature of melancholy
Hamlet's melancholy would have struck a chord with many Elizabethans - books on melancholy were popular and widely read at the time. One particular example of such a book is Timothy Bright's Treatise on Melancholy, printed in 1586, in which the characteristics of the melancholy man resemble those of Hamlet as he struggles to come to terms with the task of revenge: he is 'doubtful before, and long in deliberation: suspicious, painful in study, and circumspect'.
In Pierce Pennilesse His Supplication to the Devil, written by Thomas Nashe and printed in 1592, Shakespeare could have found a description of the drunkenness of the Danish court that corresponds interestingly with his depiction of Claudius's nightly drunken carousing.