A tragic hero would not be as tragic were they not to realize the truth or become enlightened in the end. At the end of Oedipus Rex, Oedipus comes to terms with himself and the truth from which he had been avoiding. The things that shape Oedipus throughout the story are what make him this thing we call a tragic character. The way he reacts and changes his perception all the while is what creates and characterizes Oedipus the King.
At the beginning of Oedipus Rex, Oedipus is the king of Thebes. He has all the adoration and acclaim he could ever desire. "The world knows my name; I am Oedipus", is the biggest indication that he is getting a big head about things. The people are coming to him for help with the most recent plague. They are, once again, calling on him to solve the problem. His confidence in himself is most noticeable for his has already sent his brother-in-law Creon to talk to the Oracle at Delphi. Oedipus thinks he can handle the plague by himself, he seems to not be relying whatsoever on the gods and their wisdom. Instead he is taking his own measures to solve the problem and when Creon returns he finds that things aren't exactly going his way.
When Tiresias comes on the scene he knows exactly what will happen saying, "what will come will come". This angers Oedipus and he rants and raves only making Tiresias even madder. Oedipus? short temper, one of his tragic flaws, is stirring up trouble. He tries to have Creon killed and accuses him of trying to overthrow him. Creon tells him he is concocting fantasies and the chorus gently tells him the same. Still, Oedipus believes what he wants to and is resolute in his conclusions and unmoving in his fury. Here the reader begins to see how Oedipus really is and how his knowledge is great yet limited and his ignorance of his past is most tragic.
When Jocasta comes in and brakes up the fight amongst Creon and Oedipus we find that he is a whipped man.