Let me tell you a sad, bloody story of the kind only the Greeks could write. You probably all know the story of the Trojan war and how Agamemnon sailed away to help his brother, Menelaus, retrieve his wife from Paris. What the movie doesn't tell you, is that in order to get there, Agamemnon had to sacrifice his daughter, Iphigenia, to Artemis in recompense for slaying one of her sacred animals. Well, as you can imagine, Agamemnon's wife, Clytemnestra, wasn't too happy about this. So while Agamemnon was off to war, Clytemnestra seduced Agamemnon's cousin, Aegisthus, and convinced Aegisthus to kill Agamemnon after Agamemnon's return from Troy. Agamemnon returns home with a prophetess that he has taken to be his concubine and goes up into his palace with her. Shortly after, Aegisthus murders them both. Orestes, Agamemnon's son, returns home after his father's murder, and, with his sister's encouragement, murders his adulterous mother and Aegisthus. But because he killed his own flesh and blood, the furies chase him all over Greece and drive him mad until he finds sanctuary in Athena's temple. He ends up having a happy ending, being pardoned by the newly established legal system. The myth explains how the Greek legal system was set up by the goddess Athena.
Reading Hamlet again after reading the Oresteia made me realize just how similar these two stories are. Perhaps Shakespeare was setting up his own version of the Oresteia, which would explain why so many things are left ambiguous. Shakespeare wouldn't need to go into so much detail because he was simply retelling an old story, similar to how the play Wicked includes next to no knowledge on Dorothy, the main character of the Wizard of Oz, the story that Wicked was based off of. Because the audience is assumed to already know the old story, there are a lot of details that don't need to be added. I am not implying that all of Shakespeare's audience would know the Oresteia, but certainly some of the wealthier, more educated patrons did. Even if you don't know the original story, you don't feel as if you were missing anything, but your understanding of Hamlet is deepened by the knowledge.
Orestes was called upon to avenge his father because the gods themselves demanded retribution. In Greek culture, if your close blood relative was murdered, you were bound to take revenge or be punished in the afterlife. Likewise, Hamlet is plagued by unrest and anger until he avenges his father. His father's ghost cries out to him to seek vengeance and he feels obligated to comply.
Gertrude may have also played a greater role in the murder of the old king, possibly asking Claudius to kill for her. Gertrude as Clytemnestra is somewhat believable through her relationship with Hamlet; Clytemnestra knows that Orestes wants to kill her for his father's sake, yet she will not lay a hand on her child, merely pointing out that she carried, nursed, and raised him. And telling him that the furies would come for him if he hurt her. But over all, she stays in her motherly role and looks upon Orestes as her son and wishes him to be happy and accepting of his new step-dad.
Claudius is certainly a parallel to Aegisthus, the murderer, the bad guy. But instead of pointing him out, saying that he is truly the villain, Shakespeare delves into his conscience and explores his mind, giving him positive qualities so that the audience doesn't have complete hatred for him.
It isn't hard to find a trait connecting Ophelia and Electra; Ophelia could easily be said to have an Electra complex, devoted to her father's wishes.
Although it may not be a perfect match, there certainly are some interesting similarities.