There is significant dramatic irony in this scene of Shakespeare's tragedy, which is when the murder of Duncan is discovered and exposed. Let us remember that dramatic irony is when one or more characters on stage and the audience know something that other characters do not. This of course appears in this scene through our knowledge of who really killed King Duncan. Even though Macbeth and Lady Macbeth clearly know too, they act as if they were innocent. Consider Macbeth's response to seeing Duncan's corpse:
Had I but died an hour before this chance,
I had liv'd a blessed time; for, from this instant,
There's nothing serious in mortality;
All is but toys: renown, and grace, is dead;
the wine of life is drawn, and the mere lees
Is left this vault to brag of.
The dramatic irony lies in the way that we know, just as Macbeth himself knows, that this speech is not at all sincere, and he is playing a part, trying to maintain his innocence. However, at this moment in the play, the other charactes are reduced to shock and amazement at the crime of regicide that has been committed among them.
In dramatic irony, the irony relies on the reader or spectator having information which a certain character does not. In Act 2 Scene 3, Macduff rings the bell to signal Duncan's death. Lady Macbeth asks why the bell is ringing and Macduff says,"O, gentle lady, 'tis not for you to hear what I can speak: The repetition, in a woman's ear, Would murder as it fell." Thus, he is saying that what has happened is so horrible that it should not be repeated to a women. We know that it is Lady Macbeth herself who helped plan the murder and who smeared Duncun's blood on the grooms. Macduff, however, does not know this.
Another instance of dramatic irony is that Macbeth tells Lennox and Macduff that in his fury he has killed the grooms. However, we as readers (viewers) know that Macbeth actually killed the grooms so that they could not deny killing Duncan
Macbeth had planned to be in his chamber pretending to be sound asleep when the King’s body was discovered, but the prolonged knocking finally forced him to put in an appearance in his nightgown to find out what somebody wasn’t opening the gate. Just before he arrives, the drunken Porter admits Macduff. Thus Macbeth is forced against his will to be present when Macduff finds the King’s bloody body.
We all know from personal experience, if only as children, how difficult it is to act natural when we feel guilty. It is easy to act natural when we are being natural, but it is very hard to remember how it feels to be natural when we are not feeling natural. So we can understand what Macbeth is going through. This is perhaps the worst experience of his life. He is trying to act natural and doing a very poor job of it. He looks rigid, cold, and expressionless. He speaks in very brief sentences consisting mostly of monosyllables.
Macduff tells Lennox, “Our knocking has awaked him. Here he comes.” When Macbeth greets them with such an apparently cold manner, Macduff assumes that he is angry at being awakened by all of Macduff’s pounding on the gate. The dramatic irony throughout this part of the scene is mostly contained in the fact that only the audience knows why Macbeth is acting so strangely. He has simply forgotten how to act like an innocent man. It is nearly impossible to act innocent if you are guilty.
For his part, Macduff completely misinterprets Macbeth’s behavior, since Macduff is innocent and has no suspicion that anything is amiss. Part of the reason for the insertion of the comical scene with the Porter is to reassure Macduff and Lennox that there is nothing unusual going on inside the castle. Everyone is sound asleep. Macduff would naturally become alarmed if he kept knocking at the gate and nobody answered. This would only cause him to knock louder and longer, which was the only way Shakespeare could think of to have Macbeth present when the body was discovered. Macbeth goes through agony waiting for Macduff to enter the King’s chamber and then come running out shouting to wake up everybody in the castle.
Later Macduff will remember Macbeth's behavior and will feel convinced that Macbeth is guilty of Duncan's assassination. Macduff will refuse to attend Macbeth's coronation and will flee to England to help raise an army to invade Scotland and depose Macbeth.