The three Theban tragedies of Sophocles were not produced on the same occasion as a trilogy but all belong to the same mythical background. The myths concerning Oedipus and his children are centered in Thebes, a place that was "mythical" in the Athenian mind in the colloquial sense of "other than real" and "abnormal." Every kind of crime was committed there.
Theban myth is organized as the story of the ruling dynasty. The father of Oedipus, Laius, was a descendant of the founder of Thebes. As the result of an oracle he received at Delphi warning that he would be murdered by his own son, Laius mutilated the feet of his infant son Oedipus and exposed him on Mount Cithaeron, expecting that he would die. He was rescued, however, and grew up in Corinth as the son of the king and queen of that city. As a young man, having received an oracle at Delphi warning that he would kill his father and marry his mother, he left Corinth. At a crossroads outside of Thebes, Oedipus had an altercation with and murdered a stranger. It was Laius. Proceeding on his way, he solved the riddle of the Sphinx, a monster who was plaguing Thebes. As a reward, he was given the widowed queen, Jocasta, his mother. They had four children, Polyneices, Eteocles, Antigone, and Ismene. As with several other aspects of the myth, there are different versions of the discovery of Oedipus' identity and of his crimes. In Sophocles tragedy, a plague starts the process and the discovery is the result of a self-investigation on the Oedipus' part. (For this reason, the scars on his feet have a very minor importance. At the very end, they are corroborating evidence.)
The ancient sources for the myth vary most concerning the aftermath of the discovery. Jocasta either commits suicide, as in Sophocles, or lives on up to the time of the Seven Against Thebes (see below). Oedipus is either blinded by others or blinds himself. Oedipus either lives on in Thebes and dies and is buried there, or goes into exile and dies outside of Thebes (cf. the prophecies of Teiresias in the First Episode of Oedipus the King). Sophocles' Oedipus at Colonus is the only version in which Oedipus dies in Athens. At some point, different in different sources, Oedipus curses his sons. It is a curse of strife for the throne of Thebes. The curse results in the usurpation of the throne by one of them, Eteocles, and the return to Thebes of the other, Polyneices, at the head of an army. The two brothers kill one another in combat. Oedipus at Colonus dramatizes the curse, which is placed on Polyneices. In Antigone, the regent, Creon, forbids the burial of Polyneices, who is considered a traitor, and Antigone defies his decree.
Oedipus at Colonus presents a special problem. The
arrival of Oedipus at Athens looks suspiciously like an invention on Sophocles'
part. But there is an independent fourth-century source for this
mythical "fact." Further, there is some slight evidence that, after
Oedipus came to Colonus and was buried there, he once appeared when the
Thebans were attacking and inspired the Athenians to rally and defeat them.
A historical event with which this report can be combined is a raid against
Athens led by the Spartan king Agis in which Boeotian cavalry participated;
the Athenian cavalry routed the Boeotian (410 or 407 B.C.E.). The
dating of the attack fits well with the proposed date of the composition
of Oedipus at Colonus. Furthermore, the place of the attack would
have been somewhere north of Athens proper in the vicinity of Colonus.
The inspiring apparition is not unparalleled. There was the belief,
for example, that Theseus rose out of the ground at the battle of Marathon.