He suspects that they are not his true friends, asking, " Were you not sent for? Is it / Your own inclining? Is it a free visitation?" (2. 2. 277-278). They eventually tell him they were sent for, finding it difficult to lie to the forceful Hamlet, and Hamlet then seems to open up, telling them "I have of late, --but / Wherefore I know not, --lost all my mirth, forgone / All custom of exercises" .
(2. 2. 299-301). Hamlet is setting Rosencrantz and Guildenstern up, he knows that they will report back to the king so they will continue to think he is crazy, then Hamlet is free to get his revenge.
After the "Mousetrap," Hamlet has made up his mind. He takes advantage of the first opportunity he sees to kill the king. Thinking that the king would be the only one in her room, Hamlet kills Polonius accidentally, when he is summoned to his mother's chambers. After discovering his mistake, Hamlet says " I took thee for thy better," (3. 4. 32) meaning he thought Polonius was the king. This act has serious consequences.
Ophelia's madness starts when she is rejected by Hamlet; he confuses her by saying "I did love you once" and then "I loved you not" a moment later (3. 1. 115-119). She really believes something is seriously wrong with Hamlet, and that his "noble mind is here o"er thrown" (3. 1. 153). After Hamlet kills her father, Ophelia really loses touch with reality. She wanders around singing about love and death. The king talks to the queen, and blames her condition on " First, her father slain; / Next, your son gone," (4. 5. 79-80), but this is just the beginning. Ophelia drowns, and it is unclear whether it was an accident or suicide. This is the last straw that pushes her faithful brother Laertes to consider murder.
Laertes comes back to Denmark when he hears of his father's death, and is prepared to see Polonius" murderer punished. The king explains that the queen and the people love Hamlet, so it will not be that easy to punish him.