Irony is a contrast between expectation and reality. This incongruity often has the effect of surprising the reader. The techniques of irony include exaggeration, understatement and sarcasm.
Dramatic irony occurs when the reader or viewer knows something that a character does not. This type of irony is commonly used in drama. This contrast between what a character thinks is happening and what is really happening build tension.
For example, in Act One of Macbeth, dramatic irony is found in Duncan’s words to Lady Macbeth upon his arrival at Macbeth’s castle.
Conduct me to mine host. We love him highly
And shall continue our graces toward him.
From these lines, the reader or viewer can tell that Duncan expects to be warmly welcomed by his host. Feeling love and generosity toward Macbeth, Duncan reasonably assumes that he will receive gracious hospitality from Macbeth. As Duncan speaks, however, the audience already knows that Macbeth is planning to murder him. Shakespeare has conveyed Macbeth’s plan to the audience through Macbeth’s words, actions and interactions with others.
Shakespeare – as well as other playwrights – use irony as a means of involving the audience. Knowing about events that are unknown to some characters in the play gives the audience a sense of connection or anticipation – will a character learn of the danger before another character acts to harm him?