Hamlet was the prince of Denmark, son of the assassinated King Hamlet and Queen Gertrude, and nephew to Claudius. During this play, he goes through some very troubling situations in which he seems to act in an insane manner. However, I am convinced that he was " not in madness, but mad in craft." I also believe that he was a man of high moral standards, in fact, higher than most of the people in Denmark at that time.
Hamlet was bombarded by many situations at the start of the play which his psyche had to deal with. He was very upset with his father's murder and, at the same time, his mother's hurried remarriage. Out of anger, and perhaps for lack of a better release of emotions, Hamlet then forms a plot to kill his mother's new husband, his uncle. .
Hamlet, knowing that he will get into difficulty, needs to feign madness for the purpose of carrying out his mission. He rehearses this madness first with Ophelia, because even if he should fail in his act of simulation with her, that failure will not cause him any real harm. Soon enough, the manifestations of insanity that Hamlet will show become predictable - which is a sure sign that it is a simulated, and not real, insanity. .
When Hamlet is with a trustworthy friend, he is rational and symptom-free, but as soon as a person appears whom he wants to convince that he is mad, he changes his behavior - so as to give them explanations for his noticeable, irrational behavior. With Rosencrantz and Guildenstern, he rationalizes that his behavior is merely frustrated ambition; with the Queen and King, that it is their marriage that has upset him; and with Polonius and Ophelia, that it is frustrated love that has driven him mad. These rapid and clumsy changes, from rational speech with those he trusts to irrational conversation with those whom he wishes to impress, are strong evidence of fraud. However, Hamlet knows he must act mad if he wants Claudius to believe him, so Hamlet uses his confrontations with Ophelia to display it.