The dramatic irony was a handy tool for the writers of Greek tragedies because they based their plays on some well-known myths. The audience as such knew in advance what would be the outcome of the play. They could easily understand the error of the character's understanding of the dramatic situation and the actuality behind their speech and actions.
Irony is a basic part of the very theme of the drama of Oedipus. The play of Oedipus Rex is based on a single all-pervasive irony that Oedipus seeks to find the murderer which is but himself. Ironically, his curse falls upon himself, and his quest ends in the tragic realization of his failure to overcome fate. Ironically, he has run madly into the very ditch which he has been running so madly to avoid throughout his life. It is ironical that he has blinded his inner eyes by trusting too much in his external eyes. It is also ironical that Oedipus is such a good man who wholeheartedly puts his life in escaping the doom, but is also such a bad man who is so arrogant and proud that he challenges the invincible. How ironical it is that he obeys the voice of his conscience to disobey the gods and commit the unwitting crimes; not fearing that fate may work beyond the powers of his understanding, he kills of killing a man old enough to be his father and marries a woman old enough to be his mother. And how ironical and even puzzlingly paradoxical it is that he escaped from Corinth because he believed in the dangers of fate, and also because he didn't believe that it was not possible to overcome fate! Oedipus, having achieved a vision of the terrible truth, blinds himself. Out of this single but powerful irony, several other ironic situations have been developed.
The success of Oedipus Rex as one of the greatest Sophoclean tragedies is largely due to the brilliant interplay of dramatic irony in the play. From the beginning of the play Oedipus is ignorant of the dreadful acts he has committed: the murder of his father and marrying his mother. But the audience watching the play is well aware of these facts. Therefore, every word, every reaction of Oedipus with regards to the murder lends itself to dramatic irony.
Oedipus speech demanding the people to reveal the murderer in the initial part of the play is an important instance of dramatic irony. Little does he realize that in cursing Laius' murderer to live in wretchedness, he is cursing himself. This curse does indeed come true when in the end of the play Oedipus and his family are doomed to a life of pain and suffering. Another important instance of dramatic irony is a little later in this same section when the old soothsayer visits the king. When Oedipus beings to ridicules Teiresias' blindness, he is turn predicts and unusual circumstance. The angry prophet warns that while Oedipus can see, he is actually 'blind' (that means he will be denied the truth) whereas when he will turn blind (i.e. lose his eyesight) only then will he be able to see (or realize) the truth. It is also ironic that old Teiresias who has no eyesight can perceive reality accurately.
There are many other instances of dramatic irony in the play. In the very first scene (the prologue), Oedipus praises himself as a great and famous king, and he says that "once more I must bring what is dark to light". But for a spectator who knows the myth of Oedipus in advance, Oedipus’s confidence and self-appreciation itself is ironic. When he adds that he will act on his own interest "and not as though it were for some distant friend/ but for my own sake, to be rid of evil", we understand the bitter and the unconscious dramatic irony. We understand that he is actually going to get rid of the evil of arrogantly taking fate in his hands and deliberately doing things that he doesn't understand, though he means it in quite another sense. Without realizing the darkness forthcoming in his life, he proclaims what is to be done to the murderer, and he decks a number of curses upon his own head! The curse is painfully ironic:
I pray to God -
I pray that that man's life be consumed in evil and wretchedness.
And as for me, this curse applies no less If it should turn out that the culprit is my guest here...
Oedipus is pitiably ignorant that the curses are going to fall upon himself. Oedipus's failure to understand Teiresias and also the reluctance of the old shepherd are ironic too. Oedipus's flight from Corinth is the most fatal irony in the life of Oedipus. He is in a lifelong project of escaping the horrible fate, but fate has disposed his plan and his life. These ironic instances evoke pity in the heart of the spectators, yet they can do nothing but pity the poor man who has nevertheless tried his best. What we can say to console ourselves is that 'doing the best is life itself’.
In Oedipus Rex, Irony is not only a means and mode of communicating the thematic messages, it is the theme of the play itself. It is what gives a new life to a familiar old mythical story. There are, in fact, many ways in which irony works in this play. The central/thematic irony is that Oedipus's quest for knowledge and truth, like every human being's, is in the end absurd, at least when it is pushed beyond the reasonable extent. The future can never be known. If there is something that knows the future and tells us that, we are still helpless, simply because chances can be beyond our control, and reality goes beyond our understanding. So, the irony of Oedipus, the man's attempt to run away from the future and his running into it, is the content and the theme of the drama itself.
Oedipus believes that he is the wisest of all Thebans: he has solved the riddle of the sphinx, and is now ruling them. Everyone praises him, and so does he! But what he does is to bring to himself the realization of the utter darkness he was in. He accuses Teiresias of lying and scolds him: "you sightless, witless, senseless, mad and old man!" But Oedipus proves himself to be the most blind in his belief and actions. He has been ignoring the inward eye in his trust and confidence of the outward eye. That is perhaps why he destroys the outward eyes at the end of the play.
Oedipus unconsciously speaks the truth in oblique ways: "I say I take the son's part, just as though… "He moves from false confidence to partial truth, and to disillusionment and complete realization of his fatal mistake of disbelieving fate. Things are revealed ironically. He is bent on proving what he never can! Everything he wants to prove comes out to be the reverse. The thematic reality is therefore the gap between the reality and man's understanding of it.
The audience is always more knowledgeable than Oedipus, who believes to be omniscient. One blunder he makes raises doubts in us about the next attempt he makes. In the end, however, even the audience realizes that no human being is free from the ironical "situation" much of which is beyond their control. The irony of Oedipus is universal, and so no one should smugly smile at Oedipus. Indeed, the tragic irony of Oedipus terrifies everyone who really thinks it over.
When irony is used structurally in a novel or a play, it is sometimes called "tragic" or "dramatic" irony. In Oedipus Rex, Oedipus attempts to find the murderer of Laios, king of Thebes, unaware that he himself is the culprit, and moreover the culprit to unwittingly kill Laios his father and marry his own mother lokaste. The audience, which knows the truth, perceives the reality of his tragedy early in the play and anticipates the consequences that Oedipus does not expect. His statements become unconsciously ironic — as when he says:
I must flee from Thebes...
For fear of joining my mother in marriage
And killing Polybos, my father
He does not know yet that he has done both! These cases of dramatic irony lend pathos to the entire tragedy and enable the reader of the play or the audience to sympathize with the ignorant and the ill-fated protagonist. The effect of the tragedy is therefore more profound and long lasting.