Dramatic Irony
Irony involves some sort of discrepancy, and dramatic irony occurs within a dramatic situation involving a mismatch (a discrepancy or lack of correspondence) between how one or more characters perceive the situation and the way the audience, with their privileged knowledge of the truth, perceive it.
When, for example, Odysseus's old swineherd Eumaios tells the disguised Odysseus that he misses his dead master, his words conflict with the truth of the situation, that he is now speaking to the man he says is dead, and we know the truth while he does not. However, there is not always any contradiction between the words spoken and the situation; in some cases the characters' ignorance produces speeches that are more true than they know, as, for example, when Milton's Samson says that he "will shortly be with them that rest." He is thinking that his servitude will soon kill him, but we, the audience, know that his death, although very near indeed, will come about not by enforced labor at the mill but rather by his pulling down the arena on the heads of his oppressors. It is not the speech but the idea behind the speech that is out of keeping with the true situation as we know it. The ironic discrepancy in the situation, although sometimes involving words vs. reality, always involves understanding vs. reality.
A second distinction is still more important. Although dramatic irony cannot occur unless the audience knows more than the characters, this situation is not in itself dramatic irony. In the same way, lightning can occur only if there is a significant difference in electrical polarity between the earth and a cloud or between two clouds, and yet this weather, even though it sometimes almost sizzles, is not in itself lightning; one may walk about in such a highly charged atmosphere and see not a sign of lightning for a long while. However, the moment something triggers the electrical discharge, lightning flashes out. Dramatic irony operates in the same way. Consider, for example, Athena's disguise as Mentor when she accompanies the young Telemachus on his voyage to Pylos. We know that Mentor is back home in Ithaca, but Telemachus and his crew do not. Nestor, too, is deceived by the disguise. Yet this ignorance does not produce dramatic irony until the disguised goddess, "Mentor," offers up a prayer to the gods and the narrator comments that this prayer is "graciously granted by herself." It is a rich joke that we can appreciate thanks to our privileged knowledge but which is lost on all the characters except Athena herself. The point is that dramatic irony can occur only if we are aware of something that one or more character in the scene in question does not know, and it occurs only when something occurs or is said that makes this discrepancy in knowledge jump out at us.
To clarify this distinction, consider a scene in an imaginary Hitchcock movie: The family sit at Thanksgiving dinner with Aunt Thelma, who has placed her purse, with her deadly little time bomb in it, beneath the table. We know the contents of the purse. So does Aunt Thelma, who is acting the part of the suicide bomber tonight as, smiling on her loathed kinsfolk, she simpers and chatters away. No one else knows of the bomb. It is a situation ripe for exploitation with dramatic irony, but no dramatic irony actually is experienced until Aunt Thelma offers a toast and the camera moves to the handbag while someone tells a joke about someone who "drank his enemies under the table." The thrill or shudder that is felt at that moment is dramatic irony.