During a forcible dialogue between Hamlet and Gertrude at the end of act 3, Polonius revealed his presence. The protagonist pierced the tapestry hoping that Claudius was hiding behind it. Therefore, one may say that the murder happened by accident.
Detailed answer:
An attentive reader may notice that William Shakespeare uses madness as a literary device. There are two versions regarding the insane state of Hamlet. They are whether it is real or pretense. For example, in Act 1, Hamlet communicated with the ghost of his father. After the king’s death and Gertrude’s new marriage, the protagonist wasn’t feeling well. The encounter with his deceased father and Ophelia’s betrayal could lead him to madness. Then, all his further actions are also due to insanity. However, being a skilled actor, Hamlet could consciously pretend. He realized that his madness could’ve helped him to accomplish his revenge plan. So, in the play, he could’ve fake his insanity for this purpose. Hamlet could rationalize his actions and reject the moral burden of guilt.
We will adhere to the point of view that the protagonist is genuinely insane. The question is what kind of mental disorder Hamlet has. Researchers point out that this is bipolar disorder. The presence of both manic and depressive behaviors hint at this. The reader may notice manic mental traits in the dialogue scene with Gertrude. A hint of depressive disorder occurs in Hamlet’s famous phrase. This phrase is “to be or not to be?” It expresses not only apathy and melancholy. It is also about the suicidal tendencies of the protagonist.
Polonius’s murder happened during the conversation in act 3, scene 4 when Hamlet scolded Gertrude. Before that moment, Hamlet was watching King Claudius pray. The protagonist intended to kill his sworn enemy. However, he refused to assassinate him since Hamlet came to a specific conclusion. It is that if he killed the king, now his soul would go to heaven. Imagine that your sworn enemy would have won psychologically and morally. Therefore, the last word would be left to him.
During the scene between Hamlet and Gertrude, the protagonist said that she could not leave while he is holding a mirror in front of her soul. Polonius was watching the conversation hiding. Polonius was there as he spied on Hamlet for Claudius. The king desired to find out the true intentions of the protagonist. Polonius also wanted to know why the protagonist behaves like a lunatic. Gertrude screamed in exertion, causing Polonius to shout out. This was a fateful moment when Hamlet pierced the tapestry with his sword. From Hamlet’s perspective, it happened instinctively.
The irony of the Polonius murder scene has two dimensions. First of all, death is ironic because Hamlet does not kill the person he intended. He sincerely thought that it is Claudius who was behind the tapestry:
I do repent: but heaven hath pleased it so,
To punish me with this and this with me,
That I must be their scourge and minister.
I will bestow him, and will answer well
The death I gave him. So, again, good night.
I must be cruel, only to be kind:
Thus bad begins and worse remains behind.
One word more, good lady.
(Act 3, Scene 4)
The murder of Polonius is accidental. Secondly, having killed Polonius, the protagonist metaphorically becomes his sworn enemy. Therefore, the man whose father was murdered becomes the killer of the father. This situation provoked feelings of guilt in Hamlet.