Readers who think that Hamlet is sincerely expressing his own thoughts and feelings in this scene tend to interpret his cruelty to Ophelia as arising out of his disgust with his mother Gertrude for marrying her husband’s murderer, which he has generalized to the whole of her sex (“Frailty, thy name is woman!”).
As editors rarely fail to note in gloss, ‘nunnery’ was Elizabethan slang for ‘brothel’, so Hamlet really tells Ophelia to go to a whorehouse, where, he believes, she belongs. Why does the virtuous Ophelia belong, in Hamlet’s judgement, in a whorehouse? A frequent answer has been that Hamlet so relegates her because of his disillusionment with women resulting from the revelation of his mother’s lustfulness; Gertrude belongs in a whorehouse, since she has been ‘whor’d’ by Claudius (V. ii. 64). Because Gertrude has become a whore, so will Ophelia—and so, in fact, will all women, in the estimation not only of Hamlet but also of those many men of various generations who have quoted—I would say prostituted—the line for the purpose of smugly concurring (and implying Shakespeare’s concurrence) with Hamlet’s estimation of woman’s whorish nature.
Kay Stanton (1994). ‘Hamlet’s Whores’. In Mark Thornton Burnett and John Manning, eds. New Essays on Hamlet, p. 167. New York: AMS.
But in reading the “nunnery” scene, we have to remember the context, which is that Claudius and Polonius have told Ophelia to engage Hamlet in conversation so that they may eavesdrop, and so discover whether Hamlet is really mad.
KING. Sweet Gertrude, leave us too,
For we have closely sent for Hamlet hither,
That he, as ’twere by accident, may here
Her father and myself, lawful espials,
Will so bestow ourselves that, seeing unseen,
We may of their encounter frankly judge,
And gather by him, as he is behav’d,
If’t be th’affliction of his love or no
That thus he suffers for.
Our interpretation of Hamlet’s words in the scene is therefore going to depend on whether we think Hamlet guesses that he is being spied on, and there are a couple of hints that he does guess: his questions “Are you honest?” and “Where’s your father?” could be interpreted in this way. So if we think that Hamlet has guessed that he is spied upon, then everything he says has to be interpreted under the constraint of his need to dissemble for the benefit of the eavesdroppers.
So a possible interpretation of the scene is that Hamlet “must be cruel, only to be kind”: that is, he knows that violence is portending, and in order to persuade Ophelia to break her association with him and so get out of harm’s way (while not able to say so plainly due to the constraint of being spied on), he abuses her cruelly.
[Ophelia] is most deject and wretched, but without even a suspicion of being badly treated. Nor is she badly treated. The resentment of neglected love may inflame his dazzling satire, but under the circumstance, ‘Get thee to a nunnery’ was the best and only advice he could give her. A nunnery was her best and only refuge from the impending storm. Destruction for himself and all else around him; but, for her the cloisters’ timely shelter. There is no telling when the fierce wrath may seize him: when he may shake down the pillars of that guilty palace. But not if he can help it, on her fair head shall the ruin fall! Since the grave is opening for him let the Convent open for her. Not his, but never another’s! O wonderful poet! Could she not guess, had she not some shadowy perception of the jealous, selfish, masculine love, which despite their fell divorce, would wall her from the world, and mark her with the seal of God, to save her from the violation of man?
George Henry Miles (1907). A Review of Hamlet, pp. 101–102. New York: Longmans.
However, I have to say that I don’t find Miles’ interpretation at all plausible. There are two problems: first, if Hamlet’s intention is to get Ophelia to safety, then he completely bungles it; and second, if Hamlet guesses that he is being spied on by Polonius, then it is likely that he also thinks that Ophelia is complicit in her father’s plot.
Dover Wilson considered this last possibility in detail in his book What Happens in Hamlet, starting from the theory that Hamlet might have overheard Polonius plotting with Claudius in II.1:
POLONIUS. At such a time I’ll loose my daughter to him.
Be you and I behind an arras then,
Mark the encounter.
This is only a few lines before Hamlet’s entrance so it would be easy to stage him overhearing it. Polonius’ use of “loose” here is significant: he means “set free” in the sense of a hunter with a hawk, but the word also has the sense “unchaste, wanton, dissolute, immoral” which suggests that Polonius is pandering his daughter to sexually entrap the prince. Wilson goes on to consider the “nunnery” scene in the light of this theory:
But now [Hamlet] is thoroughly awake, and sees it all. Here is the lobby and the decoy, playing a part, only too unblushingly; and there at the back is the arras […] Everything he says for the rest of the scene is intended for the ears of the eavesdroppers. As for the daughter who has been “loosed” to him, she will only get what she deserves. For play-acting has completed her downfall in his eyes. First the abrupt breaking-off of all intercourse between them, without any reason given, then the failure to meet his last appeal, then the overhearing of the plot in which she was to take a leading part, and last this willing and all too facile participation: is it surprising that to an imagination “as foul as Vulcan’s stithy” such things should appear in the worst possible light, or that he should treat her from henceforth as the creature he believes her to be? He puts her to one final test before the scene is over; but the dice are loaded against her. Thus, through a chain of misconceptions, due to nothing worse than narrowness of vision and over-readiness to comply with her father’s commands, Ophelia blackens her own character in her lover’s eyes.
J. Dover Wilson (1960). What Happens in Hamlet, pp. 130–131. Cambridge University Press.