At the Metropolitan Opera, Brett Dean and Matthew Jocelyn’s adaptation of “Hamlet” nods to different, surprising versions of Shakespeare’s text.“Hamlet” is our culture’s supreme emblem of a great artist’s freedom to create something radically new. Shakespeare found a way to represent the inner life as it had never been represented before: the pressure of compulsive, involuntary memories; the haunting presence of a dead father; a son’s angst in the wake of his mother’s remarriage; the suicidal thoughts of a young person forced to make impossible choices in a corrupt world. It is here, if anywhere, that Jorge Luis Borges could claim with a straight face that Shakespeare was God.In fact, the creation of “Hamlet,” which was first written and performed in late 1599 or 1600, took place within severe, all-too-human constraints. A part owner of his theater company, Shakespeare was almost certainly urged by his fellow shareholders to write a play about the Danish prince. They would have noted the success of at least one earlier stage version of an old revenge tale that was already well-known (and that continues to be recycled, as in the new film “The Northman”). In addition to writing for a commercial enterprise in a cutthroat mass-entertainment industry, he was working with an all-male cast of 12 that performed in the afternoons on a stage without scenery or lighting; he had to keep a wary eye on the government censors; and he had to please a large audience that ranged from the educated elite to the illiterate.Given these constraints, his achievement is all the more stunning. To see the originality of “Hamlet,” simply consider the astonishing number of words in the script that are used for the first time in print (and, in some instances, never again): fanged, fret, pander, compulsive, unnerved, unpolluted, besmirch, self-slaughter, blastment, chop-fallen, down-gyved, implorator, mobled, pajock, and many, many more. It is as if Shakespeare were driven to invent a whole new idiom to express what he had discovered in a familiar story.And it was not only a matter of unusual words. The play, written in characteristically supple iambic pentameter, has an unforgettable music of its own, a set of rhythmic surprises sprung in the opening spondee — “Who’s there?” — and developed in a thousand different ways. It is a music epitomized, even for those who have no idea that “Hamlet” is composed in verse, by the cadence of the most famous line in its most famous soliloquy: “To be, or not to be: that is the question.”Clayton, right, as Hamlet during a recent rehearsal at the Met.Sara Krulwich/The New York TimesNow imagine the challenge of trying to write an opera based on this of all plays — as Brett Dean has done with his “Hamlet,” which had its premiere at the Glyndebourne Festival in 2017 and arrives at the Metropolitan Opera on May 13.“Hamlet” is a musical challenge before which even Giuseppe Verdi hesitated. In 1887, in what is for me the greatest of all transformations of Shakespeare into opera, Verdi miraculously captured the music of “Othello.” With the help of the librettist Arrigo Boito, who radically cut the tragedy, the composer found a way to give the three protagonists sublime melodic expressions of their ardent, anxious desire, steadfast love and fathomless hatred.To make this transformation work successfully, of course, many things in Shakespeare’s text had to be jettisoned, and the motivations of the characters had above all to be clarified. In the play, for example, Iago’s rationale for destroying Othello is famously unclear; in the opera, “Otello,” Verdi gives Iago a stupendous, full-throated credo: “I believe in a cruel God who has created me in His image.”Small wonder that Verdi — who also adapted “Macbeth” and fashioned “Falstaff” out of “The Merry Wives of Windsor” and “Henry IV” — contemplated taking on “Hamlet” but ultimately changed his mind. What would he have done with a plot whose every action is plagued by uncertainty, and with characters whose every motivation is ambivalent?A handful of composers, most notably Ambroise Thomas in the mid-19th century, ventured into this territory, but none of them managed to penetrate very far into its forbidding depths. That is, until Dean wrote his adaptation, which captures something of the authentic “Hamlet” music — in all its strangeness, dissonance and haunting beauty.But the word “authentic,” in relation to “Hamlet,” is misleading. The opera’s gifted librettist, Matthew Jocelyn, grasped what Shakespeare scholars have come to understand, that there is no single definitive text of the play. It survives in three early printings that have at least some claim to authority: the brief version (Q1), published in 1603 in the small-format size known as a quarto; the much longer quarto version (Q2), published the following year; and the version included in the celebrated First Folio (F) of 1623.Each text differs from the others in crucial ways, and almost all modern editions of the play adopt elements from more than one of them. (Even editors who dismiss Q1 as hopelessly defective usually follow it in having the ghost appear in the famous closet scene not in armor, but in his nightgown.) Moreover, the texts of Q2 and F are each too long to fit comfortably into what Shakespeare called “the two hours’ traffic of our stage.” From the beginning, the playwright seems to have expected any given production to pick and choose, shaping “Hamlet” for its particular time and occasion. All versions are the result of choices, cuts, alterations.All of this clearly lies behind Jocelyn’s evident sense of freedom in refashioning the text, which in any case would have had to be reduced in length to serve as the libretto. Only about 20 percent of the lines in the full-length play make it into the opera, leaving room for the music, as Dean has said, to be the protagonist.What is striking, given the drastic cuts, is how much of what has obsessed the readers and audiences of “Hamlet” over the past several hundred years powerfully resonates in this operatic reimagining. Hamlet’s voice reaches the edge of desperation then swoops into bitter comedy before veering toward tenderness and back to manic grief. The murderer Claudius has a gift for smoothness and authority that lightly conceals something like false notes. The countertenors, Rosencrantz and Guildenstern, thinly flatter and echo both each other and their interlocutors. Ophelia’s descent into madness releases in her an erotic aggression that astonishes and alarms Gertrude. Chords in the orchestra and chorus are extended, drawn out and dispersed, as if they were searching for a resolution that eludes them.John Tomlinson, above, as the Ghost of Old Hamlet, and Clayton in the Glyndebourne production.Glyndebourne Productions Ltd.; Richard Hubert SmithJocelyn also cunningly reweaves the text, an intervention apparent from the opera’s first moments. An offstage chorus sings a funeral chant for the old king made up of words and phrases — “noble dust,” “quintessence of dust,” and the like — that come from very different places in the play. Hamlet enters alone and, half-singing, half-speaking, intones the words “or not to be … or not to be … or not to be.” The fragment from the celebrated Act III soliloquy is followed in this opening aria by fragments taken from his other soliloquies, along with a line — “What ceremony else?” — lifted from a different character, Laertes, who speaks it in Act V, at Ophelia’s grave.From the start, then, it is made clear that we are not to expect that the opera will work its way dutifully through the text or develop individual characters in the way that Shakespeare’s play does, most famously through soliloquies. Rather, we have entered what we might call “The Hamlet Zone.” Here, words do not stay in their place or belong only to the character who speaks them. In his death throes, Polonius sings the lines about the play-within-the-play that both he and the chorus have earlier sung.When Hamlet asks the visiting players to give him a passionate speech from their very best play, they begin to sing “To be or not to be.” And in Ophelia’s madness, she sings not her words alone but words that Hamlet has spoken to her, words that weigh like rocks dragging her down to a muddy death. “The Hamlet Zone” is a place in which words are broken up, transferred and shared, and in which the voice of one character is woven together, in both harmony and dissonance, with that of another.Such, after all, is the special power of opera.Dean does eventually give us one of Hamlet’s soliloquies more or less in its entirety, and it is the soliloquy we have been waiting for since the opening fragment “or not to be.” But there is a surprise in store. Not only does Hamlet drop the opening “To be” — as if he were already too far along toward not being — but the speech also takes an unexpected turn:… or not to be… or not to be… or not to beTo be … ay, there’s the point.Is this faithful to Shakespeare? Yes, in a way. Jocelyn has chosen the version of the soliloquy that appears in Q1. Scholars typically cite this to demonstrate why they call this text of the play the “Bad Quarto.” My students at Harvard usually laugh when I show it onscreen. But it is not the least bit funny here. As Hamlet sings it, the monosyllabic “point” works perfectly, in a way that “question” would not. A play and an opera, however deeply bound up with each other, are not the same. Ay, there’s the point.Stephen Greenblatt is the author, among other books, of “Will in the World: How Shakespeare Became Shakespeare” and “Hamlet in Purgatory.” He is the Cogan University Professor of the Humanities at Harvard and the general editor “The Norton Shakespeare.” More