I perchance hereafter shall think meet
To put an antic disposition on
(I.v.)

When the Ghost tells Hamlet about Claudius’s murder, Hamlet responds strangely: he tells his friend Horatio and the watchman Marcellus that he is going to pretend to be mad. He has no obvious reason to fake insanity, and Horatio, at least, seems to think that Hamlet is already behaving strangely: he describes Hamlet’s words as ‘wild and whirling’ (I.v.132). Hamlet’s ‘antic disposition’ is one of the play’s great mysteries. As the play continues, Hamlet behaves more and more eccentrically, and neither the audience nor Hamlet’s other characters can be certain whether Hamlet is pretending or not. Hamlet refuses to make straightforward distinctions between madness and sanity, or between reality and pretense.

I am but mad north-north-west. When the wind is
southerly, I know a hawk from a handsaw.
(II.ii.312–13)

Hamlet directs these lines to Rosencrantz and Guildenstern. His words imply that, just as the wind only occasionally blows from the north-north-west, so too is he only occasionally struck by madness. These words also contain a warning. When Hamlet uses the proverbial expression "I know a hawk from a handsaw," he indicates that he remains mostly in control of his faculties and that he can still distinguish between like and unlike things. In effect, Hamlet is warning his companions that he can tell the difference between a friend and an enemy.

The body is with the King, but the King is not with the
body.
(IV.ii.23–24)

Hamlet says this to Rosencrantz and Guildenstern. His words sound like an example of madness, and his two companions appear to take it as such. However, as with many other examples of Hamlet's double-speak, there is a method to the (apparent) madness. Here Hamlet refers to the metaphysical distinction between the king's physical body and the body of the state for which he serves as the head. The first half of the sentence may refer to either of these two understandings of body, but the second half seems to refer directly to Polonius, a "king" who's been separated from his body through death.

Her speech is nothing,
Yet the unshapèd use of it doth move
The hearers to collection. They yawn at it
And botch the words up fit to their own thoughts,
Which, as her winks and nods and gestures yield them,
Indeed would make one think there might be thought,
Though nothing sure, yet much unhappily.
(IV.v.7–13)

In these lines a gentleman reports to Gertrude and Horatio concerning Ophelia's descent into madness and her incoherence—that is, her "unshapèd use" of language. What's interesting here is the gentleman's emphasis on how others strive to make sense of her bewildering language. Ophelia seems to act in a way that implies her words carry intentional meaning, and so those around her seek to rearrange (i.e., "botch") the words in order to make some sense of them. But the gentleman persists in thinking that her words represent pure madness. Thus, "Her speech is nothing."

Young men will do’t if they come to’t,
By Cock they are to blame
(IV.v.)

Unlike Hamlet’s madness, Ophelia’s madness is unquestionably genuine. Nevertheless there is a mystery about her mental condition. In her madness, Ophelia sings snatches of songs, most of which sound like popular songs of Shakespeare’s day. Her choice of songs seems to reveal two obsessions. The first is with the death of fathers and old men, which isn’t surprising, because her father has just died. The second is with young men who seduce young women but don’t marry them. Many readers have wondered whether she is thinking of Hamlet—but it’s impossible to know for sure.

Was 't Hamlet wronged Laertes? Never Hamlet.
If Hamlet from himself be ta'en away,
And when he's not himself does wrong Laertes,
Then Hamlet does it not. Hamlet denies it.
Who does it, then? His madness.
(V.ii.203–7)

Just before they begin their fencing match, Hamlet acknowledges the pain he has caused Laertes. In these lines, however, Hamlet also denies responsibility for having killed Laertes' father. He indicates that his fit of madness effectively separated himself from himself, and he underscores this sense of distance from himself by speaking in the third person. Having been separated from himself, Hamlet argues that he cannot be held responsible for any act that his madness, in fact, committed.