When Sophocles wrote Oedipus Rex, he used three forms of irony; verbal, situational, and dramatic.
Sarcasm is a form of verbal irony when a person says something but it means or is interpreted as something else, usually the opposite. We find verbal irony in the character's speeches. Teiresias and Oedipus have a conversation in which Teiresias uses sarcasm. He refuses to “reveal the troubling things inside me, which I can call your grief as well.” Teiresias is trying to tell Oedipus that he will not divulge that Oedipus is the one who killed Laois. Oedipus does not understand this he thinks that Teiresias is withholding information about impending doom.
Another type of irony that Sophocles used was situational or tragic irony which entails the action in the play. Situational irony occurs when an unexpected event takes place. Oedipus runs away from his parents, but ends up getting closer to his real parents. He blames others for killing of Laios, but he finds out he is the one who murdered him.
Dramatic irony happens when the audience is privy to information that a character is not.In the case of Oedipus Rex, the audience is told in the introduction that he is the murderer, but Oedipus himself does not know this and blames others. The irony occurs when he learns that he was the actual murderer.
Sophocles uses irony throughout Oedipus Rex to both amuse and teach. He attempts to instruct the audience about the strength of fate, and that one can never be too sure of oneself. He warns people to be humble because you never know when you could be in the wrong.
There are so many ironies. I will list three of them.
First, here is a pithy sentence uttered by Oedipus: "I know of him by hearsay. I have not seen him." (105) Oedipus is speaking of the former king of Thebes, Laius. He not only has seen him, but he also killed him. More importantly, Laius is his father.
Second, Oedipus is passionate about banishing whoever killed Laius. He says this many times. He believes by doing this, he will serve himself. Little does he know by finding the murder, he will find that he is guilty and will, therefore, have to punish himself. Here is what he says: "For when I drive pollution from the land I will not serve a distant friend’s advantage, but act in my own interest." (137-139)
Third, he calls a curse down upon the killer. He uses rather strong language to do so. As he does this, he seals his fate and causes greater misery for himself. Here is what he says: "Upon the murderer I invoke this curse-whether he is one man and all unknown, or one of many-may he wear out his life in misery to miserable doom!" (246-249)
Blindness and self-assurance is the perfect formula for irony!